-
Notifications
You must be signed in to change notification settings - Fork 19
Adding NullStatsReporter and TestScope #69
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you just need to add a single if statement:
if (!(reporter instanceof NullStatsReporter) {
scheduler.scheduleWithFixedDelay(scope.new ReportLoop(uncaughtExceptionHandler), 0, interval.toMillis(), TimeUnit.MILLISECONDS);
}
| * TestScope is a metrics collector that has no reporting, ensuring that | ||
| * all emitted values have a given prefix or set of tags. | ||
| */ | ||
| interface TestScope extends Scope { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This interface needs to be public, so that the Snapshot can be consumed externally.
|
How would |
NullStatsReporterto report no metrics when it is used byScopeBuilder.TestScopeto snapshot metrics for tests.