Package org.apache.sysds.utils
Class Statistics
java.lang.Object
org.apache.sysds.utils.Statistics
This class captures all statistics.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic longstatic booleanstatic longstatic long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaccumulateOOCEvictionWriteBytes(long bytes) static voidaccumulateOOCEvictionWriteTime(long nanos) static voidaccumulateOOCLoadFromDiskBytes(long bytes) static voidaccumulateOOCLoadFromDiskTime(long nanos) static voidaddCPMemObject(int hash, double sizeof) static voidstatic voidstatic Stringdisplay()Returns statistics of the DML program that was recently completed as a stringstatic Stringdisplay(int maxHeavyHitters) Returns statistics as a stringstatic Stringstatic voidstatic StringgetCommonNGrams(NGramBuilder<String, Statistics.NGramStats> builder, int num) static longstatic Stringstatic longgetCPHeavyHitterCount(String opcode) static StringgetCPHeavyHittersMem(int num) static Optional<Map.Entry<String,LineageItem>> static longstatic longstatic StringgetHeavyHitters(int num) Obtain a string tabular representation of the heavy hitter instructions that displays the time, instruction count, and optionally GPU stats about each instruction.static longReturns the total time of asynchronous JIT compilation in milliseconds.static longstatic longstatic StringgetNGramAvgTimes(Statistics.NGramStats[] stats, int offset, int prec) static StringgetNGramStdDevs(Statistics.NGramStats[] stats, int offset, int prec, boolean displayZero) static longstatic longstatic longstatic StringgetOOCHeavyHitters(int num) static longReturns the total time of run in nanoseconds.static doublestatic longstatic longstatic longstatic voidstatic voidincrementFunRecompileTime(long delta) static voidincrementJITCompileTime(long time) static voidincrementJVMgcCount(long delta) static voidincrementJVMgcTime(long time) static voidstatic voidstatic voidstatic voidincrementOOCEvictionGet(int incr) static voidstatic voidstatic voidstatic voidstatic voidstatic voidstatic voidmaintainCPFuncCallStats(String instName) static voidmaintainCPHeavyHitters(String instName, long timeNanos) "Maintains" or adds time to per instruction/op timers, also increments associated countstatic voidmaintainCPHeavyHittersMem(String name, double sizeof) Helper method which keeps track of the heaviest weight objects (by total memory used) throughout execution of the program.static voidmaintainNGrams(String instName, long timeNanos) static voidmaintainNGramsFromLineage(Instruction tmp, ExecutionContext ec, long t0) static voidstatic voidmaintainOOCHeavyHitter(String op, long timeNanos) static NGramBuilder<String,Statistics.NGramStats>[] static StringnGramToCSV(NGramBuilder<String, Statistics.NGramStats> mbuilder) static voidstatic voidremoveCPMemObject(int hash) Helper method to remove a memory object which has become unpinnedstatic voidreset()static voidstatic voidstatic voidstatic voidstatic voidresetNoOfCompiledJobs(int count) static voidstatic voidstatic voidstatic voidStarts the timer, should be invoked immediately before invoking Program.execute()static voidstatic voidStops the timer, should be invoked immediately after invoking Program.execute()static voidtoCSVStream(NGramBuilder<String, Statistics.NGramStats> mbuilder, Consumer<String> lineConsumer) static String[]
-
Field Details
-
recomputeNNZTime
public static long recomputeNNZTime -
examSparsityTime
public static long examSparsityTime -
allocateDoubleArrTime
public static long allocateDoubleArrTime -
allowWorkerStatistics
public static boolean allowWorkerStatistics
-
-
Constructor Details
-
Statistics
public Statistics()
-
-
Method Details
-
getNoOfExecutedSPInst
public static long getNoOfExecutedSPInst() -
incrementNoOfExecutedSPInst
public static void incrementNoOfExecutedSPInst() -
decrementNoOfExecutedSPInst
public static void decrementNoOfExecutedSPInst() -
getNoOfCompiledSPInst
public static long getNoOfCompiledSPInst() -
incrementNoOfCompiledSPInst
public static void incrementNoOfCompiledSPInst() -
getTotalUIPVar
public static long getTotalUIPVar() -
incrementTotalUIPVar
public static void incrementTotalUIPVar() -
getTotalLixUIP
public static long getTotalLixUIP() -
incrementTotalLixUIP
public static void incrementTotalLixUIP() -
getTotalLix
public static long getTotalLix() -
incrementTotalLix
public static void incrementTotalLix() -
resetNoOfCompiledJobs
public static void resetNoOfCompiledJobs(int count) -
resetNoOfExecutedJobs
public static void resetNoOfExecutedJobs() -
incrementJITCompileTime
public static void incrementJITCompileTime(long time) -
incrementJVMgcTime
public static void incrementJVMgcTime(long time) -
incrementJVMgcCount
public static void incrementJVMgcCount(long delta) -
incrementFunRecompileTime
public static void incrementFunRecompileTime(long delta) -
incrementFunRecompiles
public static void incrementFunRecompiles() -
startCompileTimer
public static void startCompileTimer() -
stopCompileTimer
public static void stopCompileTimer() -
getCompileTime
public static long getCompileTime() -
startRunTimer
public static void startRunTimer()Starts the timer, should be invoked immediately before invoking Program.execute() -
stopRunTimer
public static void stopRunTimer()Stops the timer, should be invoked immediately after invoking Program.execute() -
getRunTime
public static long getRunTime()Returns the total time of run in nanoseconds.- Returns:
- run time in nanoseconds
-
resetOOCEvictionStats
public static void resetOOCEvictionStats() -
getOOCHeavyHitters
-
maintainOOCHeavyHitter
-
incrementOOCEvictionGet
public static void incrementOOCEvictionGet() -
incrementOOCEvictionGet
public static void incrementOOCEvictionGet(int incr) -
incrementOOCEvictionPut
public static void incrementOOCEvictionPut() -
incrementOOCLoadFromDisk
public static void incrementOOCLoadFromDisk() -
incrementOOCEvictionWrite
public static void incrementOOCEvictionWrite() -
accumulateOOCLoadFromDiskTime
public static void accumulateOOCLoadFromDiskTime(long nanos) -
accumulateOOCLoadFromDiskBytes
public static void accumulateOOCLoadFromDiskBytes(long bytes) -
accumulateOOCEvictionWriteTime
public static void accumulateOOCEvictionWriteTime(long nanos) -
accumulateOOCEvictionWriteBytes
public static void accumulateOOCEvictionWriteBytes(long bytes) -
displayOOCEvictionStats
-
reset
public static void reset() -
resetJITCompileTime
public static void resetJITCompileTime() -
resetJVMgcTime
public static void resetJVMgcTime() -
resetJVMgcCount
public static void resetJVMgcCount() -
resetCPHeavyHitters
public static void resetCPHeavyHitters() -
getCPHeavyHitterCode
-
addCPMemObject
public static void addCPMemObject(int hash, double sizeof) -
removeCPMemObject
public static void removeCPMemObject(int hash) Helper method to remove a memory object which has become unpinned- Parameters:
hash- hash of data object
-
maintainCPHeavyHittersMem
Helper method which keeps track of the heaviest weight objects (by total memory used) throughout execution of the program. Only reported if JMLC memory statistics are enabled and finegrained statistics are enabled. We only keep track of the -largest- instance of data associated with a particular string identifier so no need to worry about multiple bindings to the same name- Parameters:
name- String denoting the variables namesizeof- objects size (estimated bytes)
-
maintainCPHeavyHitters
"Maintains" or adds time to per instruction/op timers, also increments associated count- Parameters:
instName- name of the instruction/optimeNanos- time in nano seconds
-
prepareNGramInst
-
getCurrentLineageItem
-
clearNGramRecording
public static void clearNGramRecording() -
extendLineageItem
-
getExtendedLineage
-
maintainNGramsFromLineage
-
maintainNGramsFromLineage
-
maintainNGrams
-
mergeNGrams
-
getNGramStdDevs
public static String getNGramStdDevs(Statistics.NGramStats[] stats, int offset, int prec, boolean displayZero) -
getNGramAvgTimes
-
toCSVStream
public static void toCSVStream(NGramBuilder<String, Statistics.NGramStats> mbuilder, Consumer<String> lineConsumer) -
nGramToCSV
-
getCommonNGrams
-
maintainCPFuncCallStats
-
getCPHeavyHitterOpCodes
-
getCPHeavyHitterCount
-
getHeavyHittersHashMap
-
getHeavyHitters
Obtain a string tabular representation of the heavy hitter instructions that displays the time, instruction count, and optionally GPU stats about each instruction.- Parameters:
num- the maximum number of heavy hitters to display- Returns:
- string representing the heavy hitter instructions in tabular format
-
getCPHeavyHittersMem
-
getJITCompileTime
public static long getJITCompileTime()Returns the total time of asynchronous JIT compilation in milliseconds.- Returns:
- JIT compile time
-
getJVMgcTime
public static long getJVMgcTime() -
getJVMgcCount
public static long getJVMgcCount() -
getFunRecompileTime
public static long getFunRecompileTime() -
getFunRecompiles
public static long getFunRecompiles() -
getNumPinnedObjects
public static long getNumPinnedObjects() -
getSizeofPinnedObjects
public static double getSizeofPinnedObjects() -
display
Returns statistics of the DML program that was recently completed as a string- Returns:
- statistics as a string
-
wrap
-
display
Returns statistics as a string- Parameters:
maxHeavyHitters- The maximum number of heavy hitters that are printed- Returns:
- statistics as string
-