mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 17:15:56 +00:00
Add 'ns' units to query history runtime json
This commit is contained in:
parent
8c28a5f8ca
commit
7ffc103777
1 changed files with 8 additions and 7 deletions
15
tracker.go
15
tracker.go
|
|
@ -29,12 +29,13 @@ type ActiveQueryStatus struct {
|
|||
}
|
||||
|
||||
type PastQueryStatus struct {
|
||||
PQL string `json:"PQL"`
|
||||
SQL string `json:"SQL,omitempty"`
|
||||
Node string `json:"nodeID"`
|
||||
Index string `json:"index"`
|
||||
Start time.Time `json:"start"`
|
||||
Runtime time.Duration `json:"runtime"`
|
||||
PQL string `json:"PQL"`
|
||||
SQL string `json:"SQL,omitempty"`
|
||||
Node string `json:"nodeID"`
|
||||
Index string `json:"index"`
|
||||
Start time.Time `json:"start"`
|
||||
Runtime time.Duration `json:"runtime"` // deprecated
|
||||
RuntimeNs time.Duration `json:"runtimeNanoseconds"`
|
||||
}
|
||||
|
||||
type activeQuery struct {
|
||||
|
|
@ -190,7 +191,7 @@ func (t *queryTracker) PastQueries() []PastQueryStatus {
|
|||
queries := t.history.slice()
|
||||
out := make([]PastQueryStatus, len(queries))
|
||||
for i, v := range queries {
|
||||
out[i] = PastQueryStatus{v.PQL, v.SQL, v.node, v.index, v.started, v.runtime}
|
||||
out[i] = PastQueryStatus{v.PQL, v.SQL, v.node, v.index, v.started, v.runtime, v.runtime}
|
||||
}
|
||||
return out
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue