xla
Fix clear counter
#4143
Merged

Fix clear counter #4143

JackCaoG merged 3 commits into master from fix_clear_counter
JackCaoG
JackCaoG2 years ago

My previous implementation clear the vector<CounterData> and vector<MetricsData> directly, but this is incorrect. Counters and Metrics and declared as static variable in different places of code, and won't get recreated if being deleted. What we can do is to reset the value of those counters and make sure they don't show up in report if value is zero. Added additional test to account for this case.

JackCaoG Fix clear counter
b92cff21
JackCaoG Fix metrics
627ccba6
JackCaoG JackCaoG requested a review from alanwaketan alanwaketan 2 years ago
alanwaketan
alanwaketan approved these changes on 2022-11-01
alanwaketan2 years ago

LGTM.

JackCaoG linter
c3a3a69f
JackCaoG JackCaoG merged 6675ada5 into master 2 years ago

Login to write a write a comment.

Login via GitHub

Reviewers
Assignees
No one assigned
Labels
Milestone