зеркало из https://github.com/microsoft/statsd.git
Changed stats.js to use delete
Changed stats.js to use delete instead of setting the values to undefined in order to save some memory.
This commit is contained in:
Родитель
24390eef6e
Коммит
c03f33910e
2
stats.js
2
stats.js
|
@ -57,7 +57,7 @@ function flushMetrics() {
|
|||
conf.deleteCounters = conf.deleteCounters || false;
|
||||
for (key in metrics.counters) {
|
||||
if (conf.deleteCounters) {
|
||||
metrics.counters[key] = undefined;
|
||||
delete(metrics.counters[key]);
|
||||
} else {
|
||||
metrics.counters[key] = 0;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче