nsmcp::EpisodeOverview method capacityHighlights (protected)

 <instance of nsmcp::EpisodeOverview[i]> capacityHighlights \
    historyFields from bucket

Defined in /usr/local/ns/tcl/nsmcp/episode-overview.tcl

Parameters:
historyFields (required)
from (required)
bucket (required)

Testcases:
No testcase defined.
Source code:
lassign [:field $historyFields poolThreads] type threads
if {$type ne "object"} {
    return {available boolean false reason string thread-history-unavailable}
}
lassign [:field $threads from] type value
if {$type eq "number"} {set from $value}
lassign [:field $threads bucketSeconds] type value
if {$type eq "number" && $value>0} {set bucket $value}
lassign [:field $threads pools] type pools
if {$type ne "object" || $pools eq {}} {
    return {available boolean false reason string pool-history-unavailable}
}
set peaks {}
foreach {name type fields} $pools {
    if {$type ne "object"} {continue}
    set sampled false
    foreach count [:series $fields slotSampleCount] {
        if {[string is integer -strict $count] && $count>0} {
            set sampled true
            break
        }
    }
    if {$sampled} {
        set peak [:peak $fields capacityReachedSamples  {connectionSlotsUsedMax maxConnections slotSampleCount waitingMax busyMax} $from $bucket]
    } else {
        set peak {available boolean false reason string no-valid-capacity-samples}
    }
    lappend peaks $name object $peak
}
lassign [:field $threads driverBacklog] type driver
if {$type eq "object"} {
    set driverPeak [:peak $driver waitingMax {sampleCount} $from $bucket]
} else {
    set driverPeak {available boolean false reason string driver-history-unavailable}
}
return [list available boolean true from number $from bucketSeconds number $bucket  pools object $peaks driverWaitingPeak object $driverPeak]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: