Skip to content

Commit

Permalink
added default levels for time measures
Browse files Browse the repository at this point in the history
  • Loading branch information
ennerf committed Sep 25, 2023
1 parent b1b3731 commit e6f4e3b
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,30 @@ public interface MeasurementRecorder {
*/
TimeMeasure newTime(String tag, IntSupplier level);

/**
* @param tag a descriptive name to disambiguate multiple measures
* @return an info level time measure
*/
default TimeMeasure newTime(String tag) {
return newTime(tag, BenchLevel.Info);
}

/**
* @param tag a descriptive name to disambiguate multiple measures
* @return a debug level time measure
*/
default TimeMeasure newDebugTime(String tag) {
return newTime(tag, BenchLevel.Debug);
}

/**
* @param tag a descriptive name to disambiguate multiple measures
* @return a trace level time measure
*/
default TimeMeasure newTraceTime(String tag) {
return newTime(tag, BenchLevel.Trace);
}

/**
* @param tag a descriptive name to disambiguate multiple measures
* @param level the detail level of the measured value
Expand Down

0 comments on commit e6f4e3b

Please sign in to comment.