public class RuntimeReport
extends java.lang.Object
Algorithm
Modifier and Type | Field and Description |
---|---|
private Algorithm |
algo
The algorithm these runtimes were measured for.
|
private long |
canonTime
Canonization time for the algorithm (nanoseconds)
|
private long |
nativeSetupTime
Native setup time for the algorithm (nanoseconds).
|
private long |
setupTime
Setup time for the algorithm (nanoseconds).
|
private long |
totalTime
Raw execution time (nanoseconds).
|
Modifier | Constructor and Description |
---|---|
protected |
RuntimeReport(Algorithm algo,
long[] times,
long total)
Constructs a new runtime report for the given algorithm
with the given runtime information.
|
Modifier and Type | Method and Description |
---|---|
protected static java.lang.String |
formatNanos(long nanos)
Formats the given number of nanoseconds as a string breaking
the time up into units of increasing magnitude as required.
|
Algorithm |
getAlgorithm()
Gets the algorithm that was executed to generate this report.
|
long |
getCanonizationTime()
Gets the time spent by the algorithm computing the
canonical representation of the input graph.
|
long |
getNativeSetupTime()
Gets the time spent on the side of the native implementation
preparing all the input data for the canonization step.
|
long |
getOtherTime()
Gets the total time spend on other tasks.
|
long |
getSetupTime()
Gets the time spent Java side transforming the input
CPQ query graph into a form suitable for the algorithm.
|
long |
getTotalTime()
Gets the total time spent running the
Algorithm.time(dev.roanh.gmark.util.Graph) method. |
void |
print()
Prints a runtime report with all the times formatted.
|
void |
print(java.io.PrintStream out)
Prints a runtime report with all the times formatted.
|
void |
writeData(java.io.PrintStream out)
Writes the data for this report as a single line to the given stream.
|
private Algorithm algo
private long setupTime
private long nativeSetupTime
private long canonTime
private long totalTime
protected RuntimeReport(Algorithm algo, long[] times, long total)
algo
- The algorithm that was execute.times
- An array with runtimes, the array is
expected to contain in order the setup time
native setup time and lastly the canonization
time. All times are expected to be in nanoseconds.total
- The total number of nanoseconds spent executing
the algorithm and all associated transforms.public long getSetupTime()
public long getNativeSetupTime()
public long getCanonizationTime()
public long getTotalTime()
Algorithm.time(dev.roanh.gmark.util.Graph)
method.public long getOtherTime()
public Algorithm getAlgorithm()
public void print()
public void print(java.io.PrintStream out)
out
- The stream to write to.public void writeData(java.io.PrintStream out)
out
- The stream to write to.protected static final java.lang.String formatNanos(long nanos)
nanos
- The nanosecond time to format.