mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-04-25 10:32:14 +00:00
fix: record tracked map clears (#1085)
Record the size of a map after we `.clear()` it.
This commit is contained in:
parent
bbdd559a02
commit
b4b432406e
@ -38,6 +38,12 @@ class TrackedMap extends Map {
|
|||||||
this._metrics.updateComponentMetric(this._component, this._name, this.size)
|
this._metrics.updateComponentMetric(this._component, this._name, this.size)
|
||||||
return deleted
|
return deleted
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clear () {
|
||||||
|
super.clear()
|
||||||
|
|
||||||
|
this._metrics.updateComponentMetric(this._component, this._name, this.size)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user