nsmcp::CodexQuestionRun method toolTiming (protected)

 <instance of nsmcp::CodexQuestionRun[i]> toolTiming item triple

Defined in /usr/local/ns/tcl/nsmcp/question-backend.tcl

Parameters:
item (required)
triple (required)

Testcases:
No testcase defined.
Source code:
set timing {}
# JSON strings/booleans/null are not provider duration measurements.
if {![catch {ns_json triples gettype -path durationMs -- $triple} type] && $type eq "number"} {
    set timing [::nsmcp::questionToolTiming [dict create durationMs [dict get $item durationMs] durationSource codex-reported]]
}
if {[dict exists $item id] && [dict exists ${:toolStarts} [dict get $item id]]} {
    set start [dict get ${:toolStarts} [dict get $item id]]
    dict unset :toolStarts [dict get $item id]
    set server {}; if {[dict exists $item server]} {set server [dict get $item server]}
    if {$timing eq {} && [dict get $start tool] eq [dict get $item tool] && [dict get $start server] eq $server} {
        set timing [::nsmcp::questionToolTiming [dict create durationMs [expr {[clock clicks -milliseconds]-[dict get $start at]}] durationSource codex-observed]]
    }
}
return $timing
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: