Closed doujiang24 closed 1 year ago
Now, the previous data is weird, not in human-readable order. 79 and 70 should be the last value.
79
70
2022-09-26 17:00:02,934 [ERROR] [holmes.cpu] [Holmes] pprof dump cpu, config_min : 30, config_diff : 25, config_abs : 100, config_max : 0, previous : [13 13 13 13 79 13 13 14 14 13], current: 79 2022-09-26 17:11:02,938 [ERROR] [holmes.cpu] [Holmes] pprof dump cpu, config_min : 30, config_diff : 25, config_abs : 100, config_max : 0, previous : [16 12 13 12 13 13 70 13 13 13], current: 70
This is due to, we print the data from a ringbuffer directly, we should print them in nature order: https://github.com/mosn/holmes/blob/master/ring.go#L21
Maybe we can introduce a data method for ring, which returns the data in the natural order, so that we can use data() instead of ring.data.
ring
data()
ring.data
Now, the previous data is weird, not in human-readable order.
79
and70
should be the last value.This is due to, we print the data from a ringbuffer directly, we should print them in nature order: https://github.com/mosn/holmes/blob/master/ring.go#L21
Maybe we can introduce a data method for
ring
, which returns the data in the natural order, so that we can usedata()
instead ofring.data
.