fix: record tracked map clears (#1085)

Record the size of a map after we `.clear()` it.
This commit is contained in:
Alex Potsides 2021-12-27 07:14:27 +01:00 committed by GitHub
parent bbdd559a02
commit b4b432406e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}
}
/**