Add field for last GC pause time (#2121)
This commit is contained in:
parent
fbdb8b83d6
commit
c02828322c
|
@ -27,6 +27,7 @@ in their config file.
|
||||||
- [#2079](https://github.com/influxdata/telegraf/pull/2079): Enable setting ClientID in MQTT output.
|
- [#2079](https://github.com/influxdata/telegraf/pull/2079): Enable setting ClientID in MQTT output.
|
||||||
- [#2001](https://github.com/influxdata/telegraf/pull/2001): MongoDB input plugin: Improve state data.
|
- [#2001](https://github.com/influxdata/telegraf/pull/2001): MongoDB input plugin: Improve state data.
|
||||||
- [#2078](https://github.com/influxdata/telegraf/pull/2078): Ping input: add standard deviation field.
|
- [#2078](https://github.com/influxdata/telegraf/pull/2078): Ping input: add standard deviation field.
|
||||||
|
- [#2121](https://github.com/influxdata/telegraf/pull/2121): Add GC pause metric to InfluxDB input plugin.
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
|
|
||||||
|
|
|
@ -118,6 +118,7 @@ type memstats struct {
|
||||||
NextGC int64 `json:"NextGC"`
|
NextGC int64 `json:"NextGC"`
|
||||||
LastGC int64 `json:"LastGC"`
|
LastGC int64 `json:"LastGC"`
|
||||||
PauseTotalNs int64 `json:"PauseTotalNs"`
|
PauseTotalNs int64 `json:"PauseTotalNs"`
|
||||||
|
PauseNs [256]int64 `json:"PauseNs"`
|
||||||
NumGC int64 `json:"NumGC"`
|
NumGC int64 `json:"NumGC"`
|
||||||
GCCPUFraction float64 `json:"GCCPUFraction"`
|
GCCPUFraction float64 `json:"GCCPUFraction"`
|
||||||
}
|
}
|
||||||
|
@ -202,6 +203,7 @@ func (i *InfluxDB) gatherURL(
|
||||||
"next_gc": m.NextGC,
|
"next_gc": m.NextGC,
|
||||||
"last_gc": m.LastGC,
|
"last_gc": m.LastGC,
|
||||||
"pause_total_ns": m.PauseTotalNs,
|
"pause_total_ns": m.PauseTotalNs,
|
||||||
|
"pause_ns": m.PauseNs[(m.NumGC+255)%256],
|
||||||
"num_gc": m.NumGC,
|
"num_gc": m.NumGC,
|
||||||
"gcc_pu_fraction": m.GCCPUFraction,
|
"gcc_pu_fraction": m.GCCPUFraction,
|
||||||
},
|
},
|
||||||
|
|
|
@ -86,6 +86,7 @@ func TestInfluxDB(t *testing.T) {
|
||||||
"frees": int64(381008),
|
"frees": int64(381008),
|
||||||
"heap_idle": int64(15802368),
|
"heap_idle": int64(15802368),
|
||||||
"pause_total_ns": int64(5132914),
|
"pause_total_ns": int64(5132914),
|
||||||
|
"pause_ns": int64(127053),
|
||||||
"lookups": int64(77),
|
"lookups": int64(77),
|
||||||
"heap_sys": int64(33849344),
|
"heap_sys": int64(33849344),
|
||||||
"mcache_sys": int64(16384),
|
"mcache_sys": int64(16384),
|
||||||
|
|
Loading…
Reference in New Issue