-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi,
thanks for your great job. I just tried to clean all event counter but it seems does not work. I wrote some code to reproduce this issue hope it helps.
zero specified event(zero({eventObj: '123456'})
in my case) works perfectly
"redis-metrics": "^2.0.0"
...
const hitCounter = metrics.counter('anchorQueryHit', { timeGranularity: 'day' });
...
describe.only('#zero', () => {
it('should clean all', function(done) {
hitCounter.incr({eventObj:'123456'}).then((data) => {
return hitCounter.count({eventObj: '123456'})
}).then(count => {
// count.should.equal(1);
return hitCounter.zero(); // <--- expect all counter cleaned, include '123456's
}).then(() => {
return hitCounter.count({eventObj: '123456'});
}).then(count => {
count.should.equal(0); // <--- no, it does not
done();
}).catch(done)
})
})
Metadata
Metadata
Assignees
Labels
No labels