-
Notifications
You must be signed in to change notification settings - Fork 18
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
Adding NullStatsReporter and TestScope #69
base: master
Are you sure you want to change the base?
Conversation
Duration interval, | ||
Thread.UncaughtExceptionHandler uncaughtExceptionHandler | ||
) { | ||
if (reporter instanceof NullStatsReporter) { |
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 |
NullStatsReporter
to report no metrics when it is used byScopeBuilder
.TestScope
to snapshot metrics for tests.