public abstract class AbstractProfiler extends Object implements Profiler
Constructor and Description |
---|
AbstractProfiler() |
AbstractProfiler(PrintStream out) |
AbstractProfiler(PrintStream out,
TimeUnit timeUnit) |
AbstractProfiler(TimeUnit timeUnit) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear all data.
|
void |
clear(String key)
Clear data attached to the specfied key.
|
Set<Map.Entry<String,Object>> |
entrySet() |
Object |
get(String key)
Get data/time attached to the specified key.
|
Map<String,Object> |
getMap() |
protected abstract long |
getTime()
Return time in nanoseconds
|
TimeUnit |
getTimeUnit() |
void |
incr(String key,
int value)
Increment an integer attached to the specified key.
|
boolean |
isProfilingEnabled() |
Set<String> |
keySet() |
void |
put(String key,
Object value)
Map miscellaneous data on the specified key.
|
void |
setDateFormat(String pattern)
Defines the date format used for displaying when the output stream is
set.
|
void |
setOutputStream(PrintStream out)
Sets the output stream.
|
void |
start(String key)
Start a timer with a specified key/identifier.
|
void |
stop(String key)
Stop the timer with the specified key.
|
String |
toString() |
void |
trace(String... strings)
If the output stream is set, print this strings.
|
public AbstractProfiler()
public AbstractProfiler(PrintStream out)
public AbstractProfiler(TimeUnit timeUnit)
public AbstractProfiler(PrintStream out, TimeUnit timeUnit)
public boolean isProfilingEnabled()
isProfilingEnabled
in interface Profiler
public void setDateFormat(String pattern)
setDateFormat
in interface Profiler
public void setOutputStream(PrintStream out)
setOutputStream
in interface Profiler
out
- public TimeUnit getTimeUnit()
getTimeUnit
in interface Profiler
TimeUnit
in used.public void start(String key)
public void stop(String key)
public void put(String key, Object value)
public void incr(String key, int value)
public Object get(String key)
Profiler
public void clear(String key)
public void trace(String... strings)
protected abstract long getTime()
Copyright © 2014–2018 GraphIK (INRIA - LIRMM). All rights reserved.