mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-17 08:57:24 +00:00
Compare commits
2 Commits
dependabot
...
PMM-12548-
Author | SHA1 | Date | |
---|---|---|---|
![]() |
824ba7e80a | ||
![]() |
c9bb7a260d |
@@ -8,103 +8,104 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// docsExamined is renamed from nscannedObjects in 3.2.0
|
// docsExamined is renamed from nscannedObjects in 3.2.0
|
||||||
|
// json tags are used for PMM purposes
|
||||||
// https://docs.mongodb.com/manual/reference/database-profiler/#system.profile.docsExamined
|
// https://docs.mongodb.com/manual/reference/database-profiler/#system.profile.docsExamined
|
||||||
type SystemProfile struct {
|
type SystemProfile struct {
|
||||||
AllUsers []interface{} `bson:"allUsers"`
|
AllUsers []interface{} `bson:"allUsers" json:"allUsers"`
|
||||||
Client string `bson:"client"`
|
Client string `bson:"client" json:"client"`
|
||||||
CursorExhausted bool `bson:"cursorExhausted"`
|
CursorExhausted bool `bson:"cursorExhausted" json:"cursorExhausted"`
|
||||||
ExecStats struct {
|
ExecStats struct {
|
||||||
Advanced int `bson:"advanced"`
|
Advanced int `bson:"advanced" json:"advanced"`
|
||||||
ExecutionTimeMillisEstimate int `bson:"executionTimeMillisEstimate"`
|
ExecutionTimeMillisEstimate int `bson:"executionTimeMillisEstimate" json:"executionTimeMillisEstimate"`
|
||||||
InputStage struct {
|
InputStage struct {
|
||||||
Advanced int `bson:"advanced"`
|
Advanced int `bson:"advanced" json:"advanced"`
|
||||||
Direction string `bson:"direction"`
|
Direction string `bson:"direction" json:"direction"`
|
||||||
DocsExamined int `bson:"docsExamined"`
|
DocsExamined int `bson:"docsExamined" json:"docsExamined"`
|
||||||
ExecutionTimeMillisEstimate int `bson:"executionTimeMillisEstimate"`
|
ExecutionTimeMillisEstimate int `bson:"executionTimeMillisEstimate" json:"executionTimeMillisEstimate"`
|
||||||
Filter struct {
|
Filter struct {
|
||||||
Date struct {
|
Date struct {
|
||||||
Eq string `bson:"$eq"`
|
Eq string `bson:"$eq" json:"$eq"`
|
||||||
} `bson:"date"`
|
} `bson:"date" json:"date"`
|
||||||
} `bson:"filter"`
|
} `bson:"filter" json:"filter"`
|
||||||
Invalidates int `bson:"invalidates"`
|
Invalidates int `bson:"invalidates" json:"invalidates"`
|
||||||
IsEOF int `bson:"isEOF"`
|
IsEOF int `bson:"isEOF" json:"isEOF"`
|
||||||
NReturned int `bson:"nReturned"`
|
NReturned int `bson:"nReturned" json:"nReturned"`
|
||||||
NeedTime int `bson:"needTime"`
|
NeedTime int `bson:"needTime" json:"needTime"`
|
||||||
NeedYield int `bson:"needYield"`
|
NeedYield int `bson:"needYield" json:"needYield"`
|
||||||
RestoreState int `bson:"restoreState"`
|
RestoreState int `bson:"restoreState" json:"restoreState"`
|
||||||
SaveState int `bson:"saveState"`
|
SaveState int `bson:"saveState" json:"saveState"`
|
||||||
Stage string `bson:"stage"`
|
Stage string `bson:"stage" json:"stage"`
|
||||||
Works int `bson:"works"`
|
Works int `bson:"works" json:"works"`
|
||||||
} `bson:"inputStage"`
|
} `bson:"inputStage" json:"inputStage"`
|
||||||
Invalidates int `bson:"invalidates"`
|
Invalidates int `bson:"invalidates" json:"invalidates"`
|
||||||
IsEOF int `bson:"isEOF"`
|
IsEOF int `bson:"isEOF" json:"isEOF"`
|
||||||
LimitAmount int `bson:"limitAmount"`
|
LimitAmount int `bson:"limitAmount" json:"limitAmount"`
|
||||||
NReturned int `bson:"nReturned"`
|
NReturned int `bson:"nReturned" json:"nReturned"`
|
||||||
NeedTime int `bson:"needTime"`
|
NeedTime int `bson:"needTime" json:"needTime"`
|
||||||
NeedYield int `bson:"needYield"`
|
NeedYield int `bson:"needYield" json:"needYield"`
|
||||||
RestoreState int `bson:"restoreState"`
|
RestoreState int `bson:"restoreState" json:"restoreState"`
|
||||||
SaveState int `bson:"saveState"`
|
SaveState int `bson:"saveState" json:"saveState"`
|
||||||
Stage string `bson:"stage"`
|
Stage string `bson:"stage" json:"stage"`
|
||||||
Works int `bson:"works"`
|
Works int `bson:"works" json:"works"`
|
||||||
DocsExamined int `bson:"docsExamined"`
|
DocsExamined int `bson:"docsExamined" json:"docsExamined"`
|
||||||
} `bson:"execStats"`
|
} `bson:"execStats" json:"execStats"`
|
||||||
KeyUpdates int `bson:"keyUpdates"`
|
KeyUpdates int `bson:"keyUpdates" json:"keyUpdates"`
|
||||||
KeysExamined int `bson:"keysExamined"`
|
KeysExamined int `bson:"keysExamined" json:"keysExamined"`
|
||||||
Locks struct {
|
Locks struct {
|
||||||
Collection struct {
|
Collection struct {
|
||||||
AcquireCount struct {
|
AcquireCount struct {
|
||||||
Read int `bson:"R"`
|
Read int `bson:"R" json:"R"`
|
||||||
ReadShared int `bson:"r"`
|
ReadShared int `bson:"r" json:"r"`
|
||||||
} `bson:"acquireCount"`
|
} `bson:"acquireCount" json:"acquireCount"`
|
||||||
} `bson:"Collection"`
|
} `bson:"Collection" json:"Collection"`
|
||||||
Database struct {
|
Database struct {
|
||||||
AcquireCount struct {
|
AcquireCount struct {
|
||||||
ReadShared int `bson:"r"`
|
ReadShared int `bson:"r" json:"r"`
|
||||||
} `bson:"acquireCount"`
|
} `bson:"acquireCount" json:"acquireCount"`
|
||||||
AcquireWaitCount struct {
|
AcquireWaitCount struct {
|
||||||
ReadShared int `bson:"r"`
|
ReadShared int `bson:"r" json:"r"`
|
||||||
} `bson:"acquireWaitCount"`
|
} `bson:"acquireWaitCount" json:"acquireWaitCount"`
|
||||||
TimeAcquiringMicros struct {
|
TimeAcquiringMicros struct {
|
||||||
ReadShared int64 `bson:"r"`
|
ReadShared int64 `bson:"r" json:"r"`
|
||||||
} `bson:"timeAcquiringMicros"`
|
} `bson:"timeAcquiringMicros" json:"timeAcquiringMicros"`
|
||||||
} `bson:"Database"`
|
} `bson:"Database" json:"Database"`
|
||||||
Global struct {
|
Global struct {
|
||||||
AcquireCount struct {
|
AcquireCount struct {
|
||||||
ReadShared int `bson:"r"`
|
ReadShared int `bson:"r" json:"r"`
|
||||||
WriteShared int `bson:"w"`
|
WriteShared int `bson:"w" json:"w"`
|
||||||
} `bson:"acquireCount"`
|
} `bson:"acquireCount" json:"acquireCount"`
|
||||||
} `bson:"Global"`
|
} `bson:"Global" json:"Global"`
|
||||||
MMAPV1Journal struct {
|
MMAPV1Journal struct {
|
||||||
AcquireCount struct {
|
AcquireCount struct {
|
||||||
ReadShared int `bson:"r"`
|
ReadShared int `bson:"r" json:"r"`
|
||||||
} `bson:"acquireCount"`
|
} `bson:"acquireCount" json:"acquireCount"`
|
||||||
} `bson:"MMAPV1Journal"`
|
} `bson:"MMAPV1Journal" json:"MMAPV1Journal"`
|
||||||
} `bson:"locks"`
|
} `bson:"locks" json:"locks"`
|
||||||
Millis int `bson:"millis"`
|
Millis int `bson:"millis" json:"durationMillis"`
|
||||||
Nreturned int `bson:"nreturned"`
|
Nreturned int `bson:"nreturned" json:"nreturned"`
|
||||||
Ns string `bson:"ns"`
|
Ns string `bson:"ns" json:"ns"`
|
||||||
NumYield int `bson:"numYield"`
|
NumYield int `bson:"numYield" json:"numYield"`
|
||||||
Op string `bson:"op"`
|
Op string `bson:"op" json:"op"`
|
||||||
PlanSummary string `bson:"planSummary"`
|
PlanSummary string `bson:"planSummary" json:"planSummary"`
|
||||||
Protocol string `bson:"protocol"`
|
Protocol string `bson:"protocol" json:"protocol"`
|
||||||
Query bson.D `bson:"query"`
|
Query bson.D `bson:"query" json:"query"`
|
||||||
UpdateObj bson.D `bson:"updateobj"`
|
UpdateObj bson.D `bson:"updateobj" json:"updateobj"`
|
||||||
Command bson.D `bson:"command"`
|
Command bson.D `bson:"command" json:"command"`
|
||||||
OriginatingCommand bson.D `bson:"originatingCommand"`
|
OriginatingCommand bson.D `bson:"originatingCommand" json:"originatingCommand"`
|
||||||
ResponseLength int `bson:"responseLength"`
|
ResponseLength int `bson:"responseLength" json:"reslen"`
|
||||||
Ts time.Time `bson:"ts"`
|
Ts time.Time `bson:"ts" json:"ts"`
|
||||||
User string `bson:"user"`
|
User string `bson:"user" json:"user"`
|
||||||
WriteConflicts int `bson:"writeConflicts"`
|
WriteConflicts int `bson:"writeConflicts" json:"writeConflicts"`
|
||||||
DocsExamined int `bson:"docsExamined"`
|
DocsExamined int `bson:"docsExamined" json:"docsExamined"`
|
||||||
QueryHash string `bson:"queryHash"`
|
QueryHash string `bson:"queryHash" json:"queryHash"`
|
||||||
Storage struct {
|
Storage struct {
|
||||||
Data struct {
|
Data struct {
|
||||||
BytesRead int64 `bson:"bytesRead"`
|
BytesRead int64 `bson:"bytesRead" json:"bytesRead"`
|
||||||
TimeReadingMicros int64 `bson:"timeReadingMicros"`
|
TimeReadingMicros int64 `bson:"timeReadingMicros" json:"timeReadingMicros"`
|
||||||
} `bson:"data"`
|
} `bson:"data" json:"data"`
|
||||||
} `bson:"storage"`
|
} `bson:"storage" json:"storage"`
|
||||||
AppName string `bson:"appName"`
|
AppName string `bson:"appName" json:"appName"`
|
||||||
Comments string `bson:"comments"`
|
Comments string `bson:"comments" json:"comments"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewExampleQuery(doc SystemProfile) ExampleQuery {
|
func NewExampleQuery(doc SystemProfile) ExampleQuery {
|
||||||
|
Reference in New Issue
Block a user