mirror of
https://github.com/bytedance/g3.git
synced 2026-05-19 16:28:21 +00:00
g3-histogram: fix mem usage
This commit is contained in:
parent
7b303b86ee
commit
2e145dbacb
2 changed files with 2 additions and 0 deletions
|
|
@ -103,6 +103,7 @@ where
|
|||
for v in buf.iter().take(count) {
|
||||
let _ = self.inner.record(v.as_u64());
|
||||
}
|
||||
buf.clear();
|
||||
stats.update(self.inner());
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ where
|
|||
for v in buf.iter().take(n) {
|
||||
let _ = self.inner.record(v.as_u64());
|
||||
}
|
||||
buf.clear();
|
||||
}
|
||||
_ = rotate_interval.tick() => {
|
||||
if !self.inner.is_empty() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue