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