@@ -94,32 +94,33 @@ type point struct {
94
94
}
95
95
96
96
type memstats struct {
97
- Alloc int64 `json:"Alloc"`
98
- TotalAlloc int64 `json:"TotalAlloc"`
99
- Sys int64 `json:"Sys"`
100
- Lookups int64 `json:"Lookups"`
101
- Mallocs int64 `json:"Mallocs"`
102
- Frees int64 `json:"Frees"`
103
- HeapAlloc int64 `json:"HeapAlloc"`
104
- HeapSys int64 `json:"HeapSys"`
105
- HeapIdle int64 `json:"HeapIdle"`
106
- HeapInuse int64 `json:"HeapInuse"`
107
- HeapReleased int64 `json:"HeapReleased"`
108
- HeapObjects int64 `json:"HeapObjects"`
109
- StackInuse int64 `json:"StackInuse"`
110
- StackSys int64 `json:"StackSys"`
111
- MSpanInuse int64 `json:"MSpanInuse"`
112
- MSpanSys int64 `json:"MSpanSys"`
113
- MCacheInuse int64 `json:"MCacheInuse"`
114
- MCacheSys int64 `json:"MCacheSys"`
115
- BuckHashSys int64 `json:"BuckHashSys"`
116
- GCSys int64 `json:"GCSys"`
117
- OtherSys int64 `json:"OtherSys"`
118
- NextGC int64 `json:"NextGC"`
119
- LastGC int64 `json:"LastGC"`
120
- PauseTotalNs int64 `json:"PauseTotalNs"`
121
- NumGC int64 `json:"NumGC"`
122
- GCCPUFraction float64 `json:"GCCPUFraction"`
97
+ Alloc int64 `json:"Alloc"`
98
+ TotalAlloc int64 `json:"TotalAlloc"`
99
+ Sys int64 `json:"Sys"`
100
+ Lookups int64 `json:"Lookups"`
101
+ Mallocs int64 `json:"Mallocs"`
102
+ Frees int64 `json:"Frees"`
103
+ HeapAlloc int64 `json:"HeapAlloc"`
104
+ HeapSys int64 `json:"HeapSys"`
105
+ HeapIdle int64 `json:"HeapIdle"`
106
+ HeapInuse int64 `json:"HeapInuse"`
107
+ HeapReleased int64 `json:"HeapReleased"`
108
+ HeapObjects int64 `json:"HeapObjects"`
109
+ StackInuse int64 `json:"StackInuse"`
110
+ StackSys int64 `json:"StackSys"`
111
+ MSpanInuse int64 `json:"MSpanInuse"`
112
+ MSpanSys int64 `json:"MSpanSys"`
113
+ MCacheInuse int64 `json:"MCacheInuse"`
114
+ MCacheSys int64 `json:"MCacheSys"`
115
+ BuckHashSys int64 `json:"BuckHashSys"`
116
+ GCSys int64 `json:"GCSys"`
117
+ OtherSys int64 `json:"OtherSys"`
118
+ NextGC int64 `json:"NextGC"`
119
+ LastGC int64 `json:"LastGC"`
120
+ PauseTotalNs int64 `json:"PauseTotalNs"`
121
+ PauseNs [256 ]uint64 `json:"PauseNs"`
122
+ NumGC int64 `json:"NumGC"`
123
+ GCCPUFraction float64 `json:"GCCPUFraction"`
123
124
}
124
125
125
126
// Gathers data from a particular URL
@@ -202,6 +203,7 @@ func (i *InfluxDB) gatherURL(
202
203
"next_gc" : m .NextGC ,
203
204
"last_gc" : m .LastGC ,
204
205
"pause_total_ns" : m .PauseTotalNs ,
206
+ "pause_ns" : m .PauseNs [(m .NumGC + 255 )% 256 ],
205
207
"num_gc" : m .NumGC ,
206
208
"gcc_pu_fraction" : m .GCCPUFraction ,
207
209
},
0 commit comments