static void |
BenchmarkUtils.addProfileInfo(Collection<ProfileDiagnostic> profileStages,
String stage,
long nanos,
long memory) |
|
static String |
BenchmarkUtils.formatExecutionStages(Iterable<ProfileDiagnostic> profileInfo) |
|
static String |
BenchmarkUtils.formatExecutionTimes(Iterable<ProfileDiagnostic> profileInfo) |
|
static String |
BenchmarkUtils.formatMemoryConsumption(Iterable<ProfileDiagnostic> profileInfo,
ProfileDiagnostic.MemoryUnit units) |
|
static ProfileDiagnostic |
BenchmarkUtils.getProfileStageByName(Collection<ProfileDiagnostic> profileInfo,
String stageName) |
Finds the stage for the given name.
|
static Duration |
BenchmarkUtils.getTotalExecutionTimeFrom(Collection<ProfileDiagnostic> profiledStages) |
Sums the execution times of the execution stages.
|
static long |
BenchmarkUtils.measureAndAddGCTime(Collection<ProfileDiagnostic> profileInfo) |
|
static void |
BenchmarkUtils.profileExecutionStage(Collection<ProfileDiagnostic> profileInfo,
String description,
Runnable code) |
|
static <T> void |
BenchmarkUtils.profileExecutionStage(Collection<ProfileDiagnostic> profileInfo,
String description,
Consumer<T> code,
T argument) |
|
static <T,R> R |
BenchmarkUtils.profileExecutionStage(Collection<ProfileDiagnostic> profileInfo,
String description,
Function<T,R> code,
T argument) |
|
static <R> R |
BenchmarkUtils.profileExecutionStage(Collection<ProfileDiagnostic> profileInfo,
String description,
Supplier<R> code) |
|
static <T,E extends Exception> void |
BenchmarkUtils.profileExecutionStage(Collection<ProfileDiagnostic> profileInfo,
String description,
CheckedConsumer<T,E> code,
T argument) |
|
static <T,R,E extends Exception> R |
BenchmarkUtils.profileExecutionStage(Collection<ProfileDiagnostic> profileInfo,
String description,
CheckedFunction<T,R,E> code,
T argument) |
Creates a new ProfileDiagnostic and adds it to the collection of
profiled stages, measuring execution time and memory consumption.
|
static <E extends Exception> void |
BenchmarkUtils.profileExecutionStage(Collection<ProfileDiagnostic> profileInfo,
String description,
CheckedRunnable<E> code) |
|
static <R,E extends Exception> R |
BenchmarkUtils.profileExecutionStage(Collection<ProfileDiagnostic> profileInfo,
String description,
CheckedSupplier<R,E> code) |
|
static ProfileDiagnostic |
BenchmarkUtils.removeGCTimeFromStage(Collection<ProfileDiagnostic> profileInfo,
String stageName) |
Performs a Runtime.gc() , takes into account the time taken to do so
and subtracts it from the given stage, identified by its name.
|