This procedure is defined in the server but not documented via ad_proc or proc_doc and may be intended as a private interface.
The procedure is defined as:
proc ::nsmcp::accessSummaryTriples {summary} {
set data [list server string [dict get $summary server]]
foreach key {windowHandle intervalUTC} {
if {[dict exists $summary $key]} {lappend data $key string [dict get $summary $key]}
}
foreach key {from to bucketSeconds requestCount responseBytes fallbackCount excludedPaths timingCount acceptTotal queueTotal filterTotal runTotal runMax} {
lappend data $key number [dict get $summary $key]
}
lappend data pathCountsComplete boolean [dict get $summary pathCountsComplete]
foreach key {pools methods statuses} {
set fields {}
dict for {name count} [dict get $summary $key] {lappend fields $name number $count}
lappend data $key object $fields
}
set paths {}; set index 0; set ranked {}
dict for {path count} [dict get $summary paths] {lappend ranked [list $count $path]}
foreach row [lrange [lsort -integer -decreasing -index 0 $ranked] 0 19] {
lassign $row count path
lappend paths $index object [list path string $path count number $count]
incr index
}
lappend data topPaths array $paths
set buckets {}; set index 0
foreach start [lsort -integer [dict keys [dict get $summary buckets]]] {
set count [dict get $summary buckets $start]
lappend buckets $index object [list from number $start count number $count]
incr index
}
lappend data buckets array $buckets
set coverage {}
dict for {key value} [dict get $summary coverage] {
set type number
if {$key in {scanIncomplete pending minuteAligned windowComplete historyIncomplete seekPending completionOrderAssumed evictionOverlap sourceCaughtUp liveTailIncomplete historicalBackfillPending parseErrorScopeUnknown oversizedScopeUnknown peerCountsComplete}} {set type boolean}
if {$key eq "incompleteReasons"} {
set items {}; set i 0
foreach reason $value {lappend items $i string $reason; incr i}
lappend coverage $key array $items
continue
}
if {$key eq "source"} {set type string}
if {$value eq ""} {set type null}
lappend coverage $key $type $value
}
if {[dict exists $summary filters]} {
set fields {}; dict for {key value} [dict get $summary filters] {lappend fields $key [expr {$key eq "status" ? "number" : "string"}] $value}
lappend data filters object $fields
}
if {[dict exists $summary statusTimings]} {
set rows {}; set i 0
foreach row [dict get $summary statusTimings] {
set fields {}; dict for {key value} $row {lappend fields $key number $value}
lappend rows $i object $fields; incr i
}
lappend data statusTimings array $rows
}
if {[dict exists $summary peerBurst]} {
set fields {}
dict for {key value} [dict get $summary peerBurst] {
set type [expr {$key eq "peerAddress" ? "string" : "number"}]
if {$value eq ""} {set type null}
lappend fields $key $type $value
}
lappend data peerBurst object $fields
}
if {[dict exists $summary evictions]} {
set events {}; set i 0
foreach event [dict get $summary evictions] {
set fields {}
dict for {key value} $event {lappend fields $key [expr {$key eq "reason" ? "string" : "number"}] $value}
lappend events $i object $fields; incr i
}
lappend data evictions array $events
}
lappend data coverage object $coverage
return $data
}