Top Inners Fields Constructors Methods
com.sun.webkit.perf

public final Class PerfLogger

extends Object
Class Inheritance
Imports
com.sun.javafx.logging.PlatformLogger, .PlatformLogger.Level, java.util.ArrayList, .Collections, .Comparator, .HashMap, .Map

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
PerfLogger.ProbeStat

The class contains perf statistics for a registered probe.

Field Summary

Modifier and TypeField and Description
private final Comparator<T>
private final boolean
private final PlatformLogger
private static Map<PlatformLogger, PerfLogger>
private final HashMap<String, PerfLogger.ProbeStat>
private static Thread
private final Comparator<T>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private synchronized String
public static synchronized PerfLogger
getLogger(PlatformLogger
associated Logger
log
)

Finds or creates a logger with the given log.

public static synchronized PerfLogger
getLogger(String
the PerfLogger short name
name
)

Finds or creates a logger with Logger named com.sun.webkit.perf.

public synchronized PerfLogger.ProbeStat
public boolean
public synchronized void
log(StringBuffer buf)

Prints perf statistics to the buffer.

public synchronized void
log()

Logs perf statistics.

private synchronized void
log(boolean useLogger)

public static synchronized void
logAll()

Logs perf statistics of all loggers.

private synchronized PerfLogger.ProbeStat
public synchronized void
reset()

Resets perf statistics.

public static synchronized void
public synchronized void
resumeCount(String probe)

Resumes count statistics for the probe, or starts if it's not yet started.

public synchronized void
startCount(String probe)

Starts count statistics for the probe with zero initial data.

public synchronized void
suspendCount(String probe)

Suspends count statistics for the probe.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

countComparatorback to summary
private final Comparator<T> countComparator
isEnabledback to summary
private final boolean isEnabled
logback to summary
private final PlatformLogger log
loggersback to summary
private static Map<PlatformLogger, PerfLogger> loggers
probesback to summary
private final HashMap<String, PerfLogger.ProbeStat> probes
shutdownHookback to summary
private static Thread shutdownHook
timeComparatorback to summary
private final Comparator<T> timeComparator

Constructor Detail

PerfLoggerback to summary
private PerfLogger(PlatformLogger log)

Method Detail

fullNameback to summary
private synchronized String fullName(String probe)
getLoggerback to summary
public static synchronized PerfLogger getLogger(PlatformLogger log)

Finds or creates a logger with the given log. In order the logger be enabled the log should be loggable.

Parameters
log:PlatformLogger

associated Logger

getLoggerback to summary
public static synchronized PerfLogger getLogger(String name)

Finds or creates a logger with Logger named com.sun.webkit.perf.name.

Parameters
name:String

the PerfLogger short name

getProbeStatback to summary
public synchronized PerfLogger.ProbeStat getProbeStat(String probe)
isEnabledback to summary
public boolean isEnabled()
logback to summary
public synchronized void log(StringBuffer buf)

Prints perf statistics to the buffer.

logback to summary
public synchronized void log()

Logs perf statistics.

logback to summary
private synchronized void log(boolean useLogger)
logAllback to summary
public static synchronized void logAll()

Logs perf statistics of all loggers.

registerProbeback to summary
private synchronized PerfLogger.ProbeStat registerProbe(String probe)
resetback to summary
public synchronized void reset()

Resets perf statistics.

resetAllback to summary
public static synchronized void resetAll()
resumeCountback to summary
public synchronized void resumeCount(String probe)

Resumes count statistics for the probe, or starts if it's not yet started.

startCountback to summary
public synchronized void startCount(String probe)

Starts count statistics for the probe with zero initial data.

suspendCountback to summary
public synchronized void suspendCount(String probe)

Suspends count statistics for the probe.

com.sun.webkit.perf back to summary

public final Class PerfLogger.ProbeStat

extends Object
Class Inheritance

The class contains perf statistics for a registered probe.

Field Summary

Modifier and TypeField and Description
private int
private boolean
private final String
private long
private long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int
public String
public long
private void
private void
private void
private void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

countback to summary
private int count
isRunningback to summary
private boolean isRunning
probeback to summary
private final String probe
startTimeback to summary
private long startTime
totalTimeback to summary
private long totalTime

Constructor Detail

ProbeStatback to summary
private ProbeStat(String probe)

Method Detail

getCountback to summary
public int getCount()
getProbeback to summary
public String getProbe()
getTotalTimeback to summary
public long getTotalTime()
resetback to summary
private void reset()
resumeback to summary
private void resume()
snapshotback to summary
private void snapshot()
suspendback to summary
private void suspend()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override