Index: openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl,v diff -u -r1.55.2.8 -r1.55.2.9 --- openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl 28 Apr 2016 12:53:20 -0000 1.55.2.8 +++ openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl 22 May 2016 19:22:11 -0000 1.55.2.9 @@ -227,7 +227,8 @@ if { [nsv_exists ds_request $::ad_conn(request).conn] } { array set conn [nsv_get ds_request $::ad_conn(request).conn] if { [info exists conn(startclicks)] } { - append out "Page served in [format "%.f" [expr { ([clock clicks -milliseconds] - $conn(startclicks)) }]] ms
\n" + set time [format "%.f" [expr { ([clock clicks -microseconds] - $conn(startclicks))/1000.0 }]] + append out "Page served in $time ms
\n" } } @@ -276,7 +277,7 @@ if { [nsv_exists ds_request $::ad_conn(request).conn] } { array set conn [nsv_get ds_request $::ad_conn(request).conn] if { [info exists conn(startclicks)] } { - set result [format "%.f" [expr { ([clock clicks -milliseconds] - $conn(startclicks)) }]] + set result [format "%.f" [expr { ([clock clicks -microseconds] - $conn(startclicks))/1000.0 }]] } } } @@ -316,6 +317,7 @@ ds_add start [ns_time] ds_add conn startclicks [ad_conn start_clicks] + for { set i 0 } { $i < [ns_set size [ad_conn headers]] } { incr i } { ds_add headers [ns_set key [ad_conn headers] $i] [ns_set value [ad_conn headers] $i] } @@ -666,13 +668,13 @@ if { $tag eq "" } { error "Tag parameter is required" } - set ::ds_profile__start_clock($tag) [clock clicks -milliseconds] + set ::ds_profile__start_clock($tag) [clock clicks -microeconds] } stop { if { [info exists ::ds_profile__start_clock($tag)] && $::ds_profile__start_clock($tag) ne "" } { ds_add prof $tag \ - [expr {[clock clicks -milliseconds] - $::ds_profile__start_clock($tag)}] + [expr {[clock clicks -microseconds] - $::ds_profile__start_clock($tag)}] unset ::ds_profile__start_clock($tag) } else { ns_log Warning "ds_profile stop called without a corresponding call to ds_profile start, with tag $tag" Index: openacs-4/packages/acs-developer-support/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-developer-support/www/index.tcl,v diff -u -r1.22.2.1 -r1.22.2.2 --- openacs-4/packages/acs-developer-support/www/index.tcl 10 Sep 2015 08:21:23 -0000 1.22.2.1 +++ openacs-4/packages/acs-developer-support/www/index.tcl 22 May 2016 19:22:11 -0000 1.22.2.2 @@ -122,15 +122,16 @@ unset conn } array set conn [nsv_get ds_request $request] - + ns_log notice "conn= [array get conn]" if { [catch { set start [ns_fmttime [lindex [nsv_get ds_request "$id.start"] 0] "%T"] }] } { set start "?" } if { [info exists conn(startclicks)] && [info exists conn(endclicks)] } { - set duration "[expr { ($conn(endclicks) - $conn(startclicks))}] ms" + set duration "[expr { ($conn(endclicks) - $conn(startclicks)) / 1000.0 }] ms" + ns_log notice "{ $conn(endclicks) - $conn(startclicks) } -> $duration" } else { set duration "" } Index: openacs-4/packages/acs-developer-support/www/request-info.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-developer-support/www/request-info.tcl,v diff -u -r1.21.2.1 -r1.21.2.2 --- openacs-4/packages/acs-developer-support/www/request-info.tcl 10 Sep 2015 08:21:24 -0000 1.21.2.1 +++ openacs-4/packages/acs-developer-support/www/request-info.tcl 22 May 2016 19:22:11 -0000 1.21.2.2 @@ -114,10 +114,10 @@ continue } - set duration [format "%.1f ms" [expr { $endclicks - $startclicks }]] + set duration [format "%.1f ms" [expr { ($endclicks - $startclicks)/1000.0 }]] if { [info exists conn(startclicks)] } { - append body "
  • [format "%+06.1f" [expr { ($startclicks - $conn(startclicks)) }]] ms: " + append body "
  • [format "%+06.1f" [expr { ($startclicks - $conn(startclicks))/1000.0 }]] ms: " } else { append body "
  • " }