ns::stats::Sampler method sampling status (public)
<instance of ns::stats::Sampler> sampling status
Return the process-wide sampler configuration and status, including running state, scheduler identifier, interval, process instance, collection errors and readiness of the latest interval sample. latestAt is in epoch seconds; ageSeconds is the elapsed time since the latest publication. Both are empty before the first sample. Does not collect new observations or modify sampler state.
- Testcases:
- No testcase defined.
Source code: set result [nsv_get ns_stats control] dict unset result busy dict unset result generation set sample [nsv_get ns_stats pair] dict set result ready [expr {$sample ne "" && [dict get $sample sampling ready]}] dict set result latestAt {} dict set result ageSeconds {} if {$sample ne ""} { set stamp [dict get $sample timestamp] dict set result latestAt [expr {$stamp/1000000.0}] dict set result ageSeconds [expr {max(0,([clock microseconds]-$stamp)/1000000.0)}] } return $resultXQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)