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 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 String DEFAULTPROFILE_OPTION
           
protected static String DEFAULTPROFILE_PROP
           
protected  int indent
           
protected  long launchTime
           
protected  File logFile
           
protected  String logFileName
           
protected  boolean logSynchronously
           
protected static String OPTION_BUFFERSIZE
           
protected static String OPTION_FILENAME
           
protected static String OPTION_LOGSYNCHRONOUSLY
           
protected static String PROP_BUFFERSIZE
           
protected static String PROP_FILENAME
           
protected static String PROP_LOGSYNCHRONOUSLY
           
protected  Stack<DefaultProfileLogger.AccumPerfScope> scopeStack
           
protected  Map<String,DefaultProfileLogger.AccumPerfData> scopeToAccumPerfDataMap
           
protected  long startTime
           
protected  int timeEntriesIndex
           
protected  StringBuffer timelog
           
protected  DefaultProfileLogger.TimeEntry[] timeLogEntries
           
protected  int timePaddingLength
           
 
Constructor Summary
DefaultProfileLogger()
           
 
Method Summary
protected  String accumEntryReport(DefaultProfileLogger.AccumPerfData d)
           
 void accumLogEnter(String scope)
           
 void accumLogExit(String scope)
           
protected  String entryReport(DefaultProfileLogger.TimeEntry entry, DefaultProfileLogger.TimeEntry compareWith)
           
protected  DefaultProfileLogger.TimeEntry findCompareEntry(int index, String id, int flag)
           
protected  int getBufferSize()
           
protected  long getLaunchTime()
           
protected  long getMainStartTime()
           
 String getProfileLog()
           
protected  File getProfileLogFile()
           
protected  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, String id, String msg, String description)
           
protected  void makeLog()
           
protected  String pad(String str, int size)
           
protected  DefaultProfileLogger.TimeEntry timeEntryFactory()
           
protected  void writeToProfileLogFile(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 String DEFAULTPROFILE_PROP
See Also:
Constant Field Values

PROP_FILENAME

protected static final String PROP_FILENAME
See Also:
Constant Field Values

PROP_LOGSYNCHRONOUSLY

protected static final String PROP_LOGSYNCHRONOUSLY
See Also:
Constant Field Values

PROP_BUFFERSIZE

protected static final String PROP_BUFFERSIZE
See Also:
Constant Field Values

DEFAULTPROFILE_OPTION

protected static final String DEFAULTPROFILE_OPTION
See Also:
Constant Field Values

OPTION_FILENAME

protected static final String OPTION_FILENAME
See Also:
Constant Field Values

OPTION_LOGSYNCHRONOUSLY

protected static final String OPTION_LOGSYNCHRONOUSLY
See Also:
Constant Field Values

OPTION_BUFFERSIZE

protected static final 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 StringBuffer timelog

launchTime

protected long launchTime

bufferSize

protected int bufferSize

logFileName

protected String logFileName

logFile

protected File logFile

indent

protected int indent

timePaddingLength

protected int timePaddingLength

scopeStack

protected Stack<DefaultProfileLogger.AccumPerfScope> scopeStack

scopeToAccumPerfDataMap

protected Map<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,
                    String id,
                    String msg,
                    String description)
Specified by:
logTime in interface ProfileLogger
See Also:
Profile.logTime(int, String, String, String)

getProfileLog

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

accumLogEnter

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

accumLogExit

public void accumLogExit(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,
                                                          String id,
                                                          int flag)

entryReport

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

accumEntryReport

protected String accumEntryReport(DefaultProfileLogger.AccumPerfData d)

makeLog

protected void makeLog()

pad

protected String pad(String str,
                     int size)

getProfileLogReport

protected String getProfileLogReport()

writeToProfileLogFile

protected void writeToProfileLogFile(String log)

getProfileLogFile

protected File getProfileLogFile()

getStartTime

protected long getStartTime()

getRelativeTime

protected long getRelativeTime(long absoluteTime)

getBufferSize

protected int getBufferSize()

timeEntryFactory

protected DefaultProfileLogger.TimeEntry timeEntryFactory()


Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.