org.eclipse.osgi.internal.profile
Class DefaultProfileLogger

java.lang.Object
  extended by org.eclipse.osgi.internal.profile.DefaultProfileLogger
All Implemented Interfaces:
ProfileLogger

public class DefaultProfileLogger
extends java.lang.Object
implements ProfileLogger


Nested Class Summary
protected static class DefaultProfileLogger.AccumPerfData
           
protected static class DefaultProfileLogger.AccumPerfScope
           
protected  class DefaultProfileLogger.TimeEntry
           
 
Field Summary
protected  int bufferSize
           
protected static int DEFAULT_BUFFER_SIZE
           
protected static java.lang.String DEFAULTPROFILE_OPTION
           
protected static java.lang.String DEFAULTPROFILE_PROP
           
protected  int indent
           
protected  long launchTime
           
protected  java.io.File logFile
           
protected  java.lang.String logFileName
           
protected  boolean logSynchronously
           
protected static java.lang.String OPTION_BUFFERSIZE
           
protected static java.lang.String OPTION_FILENAME
           
protected static java.lang.String OPTION_LOGSYNCHRONOUSLY
           
protected static java.lang.String PROP_BUFFERSIZE
           
protected static java.lang.String PROP_FILENAME
           
protected static java.lang.String PROP_LOGSYNCHRONOUSLY
           
protected  java.util.Stack<DefaultProfileLogger.AccumPerfScope> scopeStack
           
protected  java.util.Map<java.lang.String,DefaultProfileLogger.AccumPerfData> scopeToAccumPerfDataMap
           
protected  long startTime
           
protected  int timeEntriesIndex
           
protected  java.lang.StringBuffer timelog
           
protected  DefaultProfileLogger.TimeEntry[] timeLogEntries
           
protected  int timePaddingLength
           
 
Constructor Summary
DefaultProfileLogger()
           
 
Method Summary
protected  java.lang.String accumEntryReport(DefaultProfileLogger.AccumPerfData d)
           
 void accumLogEnter(java.lang.String scope)
           
 void accumLogExit(java.lang.String scope)
           
protected  java.lang.String entryReport(DefaultProfileLogger.TimeEntry entry, DefaultProfileLogger.TimeEntry compareWith)
           
protected  DefaultProfileLogger.TimeEntry findCompareEntry(int index, java.lang.String id, int flag)
           
protected  int getBufferSize()
           
protected  long getLaunchTime()
           
protected  long getMainStartTime()
           
 java.lang.String getProfileLog()
           
protected  java.io.File getProfileLogFile()
           
protected  java.lang.String getProfileLogReport()
           
protected  long getRelativeTime(long absoluteTime)
           
protected  long getStartTime()
           
protected  long getTime()
           
protected  long getTimerFrequency()
           
 void initProps()
           
protected  void logInitMessages()
           
 void logTime(int flag, java.lang.String id, java.lang.String msg, java.lang.String description)
           
protected  void makeLog()
           
protected  java.lang.String pad(java.lang.String str, int size)
           
protected  DefaultProfileLogger.TimeEntry timeEntryFactory()
           
protected  void writeToProfileLogFile(java.lang.String log)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULTPROFILE_PROP

protected static final java.lang.String DEFAULTPROFILE_PROP
See Also:
Constant Field Values

PROP_FILENAME

protected static final java.lang.String PROP_FILENAME
See Also:
Constant Field Values

PROP_LOGSYNCHRONOUSLY

protected static final java.lang.String PROP_LOGSYNCHRONOUSLY
See Also:
Constant Field Values

PROP_BUFFERSIZE

protected static final java.lang.String PROP_BUFFERSIZE
See Also:
Constant Field Values

DEFAULTPROFILE_OPTION

protected static final java.lang.String DEFAULTPROFILE_OPTION
See Also:
Constant Field Values

OPTION_FILENAME

protected static final java.lang.String OPTION_FILENAME
See Also:
Constant Field Values

OPTION_LOGSYNCHRONOUSLY

protected static final java.lang.String OPTION_LOGSYNCHRONOUSLY
See Also:
Constant Field Values

OPTION_BUFFERSIZE

protected static final java.lang.String OPTION_BUFFERSIZE
See Also:
Constant Field Values

logSynchronously

protected boolean logSynchronously

startTime

protected long startTime

DEFAULT_BUFFER_SIZE

protected static final int DEFAULT_BUFFER_SIZE
See Also:
Constant Field Values

timeLogEntries

protected DefaultProfileLogger.TimeEntry[] timeLogEntries

timeEntriesIndex

protected int timeEntriesIndex

timelog

protected java.lang.StringBuffer timelog

launchTime

protected long launchTime

bufferSize

protected int bufferSize

logFileName

protected java.lang.String logFileName

logFile

protected java.io.File logFile

indent

protected int indent

timePaddingLength

protected int timePaddingLength

scopeStack

protected java.util.Stack<DefaultProfileLogger.AccumPerfScope> scopeStack

scopeToAccumPerfDataMap

protected java.util.Map<java.lang.String,DefaultProfileLogger.AccumPerfData> scopeToAccumPerfDataMap
Constructor Detail

DefaultProfileLogger

public DefaultProfileLogger()
Method Detail

logInitMessages

protected void logInitMessages()

getLaunchTime

protected long getLaunchTime()

getMainStartTime

protected long getMainStartTime()

initProps

public void initProps()
Specified by:
initProps in interface ProfileLogger
See Also:
Profile.initProps()

logTime

public void logTime(int flag,
                    java.lang.String id,
                    java.lang.String msg,
                    java.lang.String description)
Specified by:
logTime in interface ProfileLogger
See Also:
Profile.logTime(int, String, String, String)

getProfileLog

public java.lang.String getProfileLog()
Specified by:
getProfileLog in interface ProfileLogger
See Also:
Profile.getProfileLog()

accumLogEnter

public void accumLogEnter(java.lang.String scope)
Specified by:
accumLogEnter in interface ProfileLogger
See Also:
Profile.accumLogEnter(String)

accumLogExit

public void accumLogExit(java.lang.String scope)
Specified by:
accumLogExit in interface ProfileLogger
See Also:
Profile.accumLogExit(String)

getTime

protected long getTime()

getTimerFrequency

protected long getTimerFrequency()

findCompareEntry

protected DefaultProfileLogger.TimeEntry findCompareEntry(int index,
                                                          java.lang.String id,
                                                          int flag)

entryReport

protected java.lang.String entryReport(DefaultProfileLogger.TimeEntry entry,
                                       DefaultProfileLogger.TimeEntry compareWith)

accumEntryReport

protected java.lang.String accumEntryReport(DefaultProfileLogger.AccumPerfData d)

makeLog

protected void makeLog()

pad

protected java.lang.String pad(java.lang.String str,
                               int size)

getProfileLogReport

protected java.lang.String getProfileLogReport()

writeToProfileLogFile

protected void writeToProfileLogFile(java.lang.String log)

getProfileLogFile

protected java.io.File getProfileLogFile()

getStartTime

protected long getStartTime()

getRelativeTime

protected long getRelativeTime(long absoluteTime)

getBufferSize

protected int getBufferSize()

timeEntryFactory

protected DefaultProfileLogger.TimeEntry timeEntryFactory()


Copyright © 2007-2012 FuseSource, Corp.. All Rights Reserved.