Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pinba_reset does not delete existing timers #41

Open
gggeek opened this issue Dec 8, 2022 · 0 comments
Open

pinba_reset does not delete existing timers #41

gggeek opened this issue Dec 8, 2022 · 0 comments

Comments

@gggeek
Copy link

gggeek commented Dec 8, 2022

Tested on pinba-php from Ubuntu Focal:

$t1 = pinba_timer_start(array('timerNr' => '1'));
pinba_tag_set('yo', 'lo');
var_dump(count(pinba_timers_get())); // 1
var_dump(count(pinba_tags_get())); // 1
pinba_reset();
echo "--\n";
var_dump(count(pinba_timers_get())); // 1 !!!
var_dump(count(pinba_tags_get())); // 0

I am not 100% sure about the intended behaviour, but I'd say that a "reset" function should clean up everything.

ATM, the workaround I found, is: in order to delete all timers, ini_set pinba_enabled to 0, call flush(), then reset pinba_enabled to its original value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant