Hi, it doesn't make sense:
xlog("L_INFO","--- time pre http: $Tf - $Ts\n"); http_query("/test1.html", "r_uri=$(ru{s.escape.param})&f_uri=$(fu{s.escape.param})", "$var(result)"); xlog("L_INFO","--- time post http: $Tf - $Ts\n");
I always get:
--- time pre http: Mon Nov 24 14:37:25 2008 - 1227533845 --- time post http: Mon Nov 24 14:37:25 2008 - 1227533845
Of course it's just impossible that the http query takes 0.000 seconds.
I could use 'benchmark' module fot this stuf, but I wonder why $Tf returns the same value in any place of the script. Maybe it is just computed at the script start for each message?
Thanks.
Hello,
On 11/24/08 15:40, Iñaki Baz Castillo wrote:
Hi, it doesn't make sense:
xlog("L_INFO","--- time pre http: $Tf - $Ts\n"); http_query("/test1.html", "r_uri=$(ru{s.escape.param})&f_uri=$(fu{s.escape.param})", "$var(result)"); xlog("L_INFO","--- time post http: $Tf - $Ts\n");
I always get:
--- time pre http: Mon Nov 24 14:37:25 2008 - 1227533845 --- time post http: Mon Nov 24 14:37:25 2008 - 1227533845
Of course it's just impossible that the http query takes 0.000 seconds.
I could use 'benchmark' module fot this stuf, but I wonder why $Tf returns the same value in any place of the script. Maybe it is just computed at the script start for each message?
it is computed first time is called for each message. The goal was to be able to print the time for each message and do time based routing. In such cases it is need to hold same value for many possible operation.
Discussing with some people, a need of PV to give the system time upon each call could be useful. It is pretty simple, should be there until next release.
However, for your case, benchmark is more indicated, it has better accuracy (mili-seconds, nano-seconds).
Cheers, Daniel
El Lunes, 24 de Noviembre de 2008, Daniel-Constantin Mierla escribió:
I could use 'benchmark' module fot this stuf, but I wonder why $Tf returns the same value in any place of the script. Maybe it is just computed at the script start for each message?
it is computed first time is called for each message. The goal was to be able to print the time for each message and do time based routing. In such cases it is need to hold same value for many possible operation.
Discussing with some people, a need of PV to give the system time upon each call could be useful. It is pretty simple, should be there until next release.
However, for your case, benchmark is more indicated, it has better accuracy (mili-seconds, nano-seconds).
Thanks a lot.
Hello,
On 11/24/08 15:54, Iñaki Baz Castillo wrote:
El Lunes, 24 de Noviembre de 2008, Daniel-Constantin Mierla escribió:
I could use 'benchmark' module fot this stuf, but I wonder why $Tf returns the same value in any place of the script. Maybe it is just computed at the script start for each message?
it is computed first time is called for each message. The goal was to be able to print the time for each message and do time based routing. In such cases it is need to hold same value for many possible operation.
Discussing with some people, a need of PV to give the system time upon each call could be useful. It is pretty simple, should be there until next release.
the pv module has now two new pseudo-variables that return the value of the system time upon each call: - $TS - timestamp - $TF - formatted time
Cheers, Daniel
However, for your case, benchmark is more indicated, it has better accuracy (mili-seconds, nano-seconds).
Thanks a lot.