mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
allow activity metrics to be named directly
This commit is contained in:
parent
038ba7e363
commit
5209f6e7bc
@ -125,6 +125,17 @@ public class ActivityMetrics {
|
|||||||
return registeredTimer;
|
return registeredTimer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Timer timer(String fullMetricName) {
|
||||||
|
NicerTimer timer = get().register(fullMetricName, new NicerTimer(
|
||||||
|
fullMetricName,
|
||||||
|
new DeltaHdrHistogramReservoir(
|
||||||
|
fullMetricName,
|
||||||
|
_HDRDIGITS
|
||||||
|
))
|
||||||
|
);
|
||||||
|
return timer;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Create an HDR histogram associated with an activity.</p>
|
* <p>Create an HDR histogram associated with an activity.</p>
|
||||||
*
|
*
|
||||||
@ -151,6 +162,17 @@ public class ActivityMetrics {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Histogram histogram(String fullname) {
|
||||||
|
NicerHistogram histogram = get().register(fullname, new NicerHistogram(
|
||||||
|
fullname,
|
||||||
|
new DeltaHdrHistogramReservoir(
|
||||||
|
fullname,
|
||||||
|
_HDRDIGITS
|
||||||
|
)
|
||||||
|
));
|
||||||
|
return histogram;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Create a counter associated with an activity.</p>
|
* <p>Create a counter associated with an activity.</p>
|
||||||
* <p>This method ensures that if multiple threads attempt to create the same-named metric on a given activity,
|
* <p>This method ensures that if multiple threads attempt to create the same-named metric on a given activity,
|
||||||
|
Loading…
Reference in New Issue
Block a user