Class OProfilerData
java.lang.Object
com.orientechnologies.agent.profiler.OProfilerData
Profiling utility class. Handles chronos (times), statistics and counters. By default it's used
as Singleton but you can create any instances you want for separate profiling contexts.
To start the recording use call startRecording(). By default record is turned off to avoid a run-time execution cost.
- Author:
- Luca Garulli
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanchronoToJSON(StringBuilder buffer, String iFilter, boolean firstItem, String k, OProfilerEntry chrono) voidclear()voiddump()protected StringdumpEntries(ConcurrentMap<String, OProfilerEntry> iValues, StringBuilder iBuffer) longString[]longgetCounter(String iStatName) String[]getHooks()getHookValue(String iName) protected String[]getMetricAsString(ConcurrentMap<String, ?> iMetrics) longlonggetStats()String[]protected booleannumberValueToJSON(StringBuilder buffer, String iFilter, boolean firstItem, String k, Long counter) voidvoidsetTip(String iMessage, AtomicInteger counter) protected booleanstatToJSON(StringBuilder buffer, String iFilter, boolean firstItem, String k) longstopChrono(String iName, long iStartTime, String iPayload, String user) protected booleanstringToJSON(StringBuilder buffer, String iFilter, boolean firstItem, String k, String value) voidtoJSON(StringBuilder buffer, String iFilter) voidupdateCounter(String iStatName, long iPlus) protected longupdateEntry(ConcurrentMap<String, OProfilerEntry> iValues, String iName, long iValue, String iPayload, String user) longupdateStat(String iName, long iValue)
-
Constructor Details
-
OProfilerData
public OProfilerData()
-
-
Method Details
-
clear
public void clear() -
clear
-
endRecording
public long endRecording() -
getRecordingTo
public long getRecordingTo() -
toJSON
-
numberValueToJSON
protected boolean numberValueToJSON(StringBuilder buffer, String iFilter, boolean firstItem, String k, Long counter) -
stringToJSON
protected boolean stringToJSON(StringBuilder buffer, String iFilter, boolean firstItem, String k, String value) -
statToJSON
-
chronoToJSON
protected boolean chronoToJSON(StringBuilder buffer, String iFilter, boolean firstItem, String k, OProfilerEntry chrono) -
dump
-
updateCounter
-
getCounter
-
dumpCounters
-
stopChrono
-
dumpChronos
-
updateStat
-
dumpStats
-
getHookValue
-
setHookValues
-
getCountersAsString
-
getChronosAsString
-
getStatsAsString
-
getCounters
-
getHooks
-
getChronos
-
getStats
-
getStat
-
getChrono
-
getRecordingFrom
public long getRecordingFrom() -
setTip
-
getTip
-
updateEntry
protected long updateEntry(ConcurrentMap<String, OProfilerEntry> iValues, String iName, long iValue, String iPayload, String user) -
dumpEntries
-
getMetricAsString
-