org.semanticweb.elk.util.logging
Class Statistics

java.lang.Object
  extended by org.semanticweb.elk.util.logging.Statistics

public class Statistics
extends Object

Collection of several static methods that help in taking and logging statistical information.

Author:
Yevgeny Kazakov, Markus Kroetzsch

Constructor Summary
Statistics()
           
 
Method Summary
static void logMemoryUsage(org.apache.log4j.Logger logger)
          Log the current total memory usage using DEBUG priority.
static void logMemoryUsage(org.apache.log4j.Logger logger, org.apache.log4j.Priority priority)
          Log the current total memory usage with the specified priority.
static void logOperationFinish(String operationName, org.apache.log4j.Logger logger)
          Log the end of a particular operation the beginning of which has been logged using logOperationStart(), using INFO priority.
static void logOperationFinish(String operationName, org.apache.log4j.Logger logger, org.apache.log4j.Priority priority)
          Log the end of a particular operation the beginning of which has been logged using logOperationStart(), using the given logging priority.
static void logOperationStart(String operationName, org.apache.log4j.Logger logger)
          Log the start of a particular operation with INFO priority.
static void logOperationStart(String operationName, org.apache.log4j.Logger logger, org.apache.log4j.Priority priority)
          Log the start of a particular operation with the given priority.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Statistics

public Statistics()
Method Detail

logOperationStart

public static void logOperationStart(String operationName,
                                     org.apache.log4j.Logger logger)
Log the start of a particular operation with INFO priority. This method should be used for long-running tasks and is mainly intended. Multiple threads can independently log operations of the same name, but (obviously) no single thread should use the same operation name to record the start and end of overlapping code.

Parameters:
operationName -
logger -

logOperationStart

public static void logOperationStart(String operationName,
                                     org.apache.log4j.Logger logger,
                                     org.apache.log4j.Priority priority)
Log the start of a particular operation with the given priority. This method should be used for long-running tasks and is mainly intended. Multiple threads can independently log operations of the same name, but (obviously) no single thread should use the same operation name to record the start and end of overlapping code.

Parameters:
operationName -
logger -
priority -

logOperationFinish

public static void logOperationFinish(String operationName,
                                      org.apache.log4j.Logger logger)
Log the end of a particular operation the beginning of which has been logged using logOperationStart(), using INFO priority.

Parameters:
operationName -
logger -

logOperationFinish

public static void logOperationFinish(String operationName,
                                      org.apache.log4j.Logger logger,
                                      org.apache.log4j.Priority priority)
Log the end of a particular operation the beginning of which has been logged using logOperationStart(), using the given logging priority.

Parameters:
operationName -
logger -
priority -

logMemoryUsage

public static void logMemoryUsage(org.apache.log4j.Logger logger)
Log the current total memory usage using DEBUG priority.

Parameters:
logger -

logMemoryUsage

public static void logMemoryUsage(org.apache.log4j.Logger logger,
                                  org.apache.log4j.Priority priority)
Log the current total memory usage with the specified priority.

Parameters:
logger -
priority -


Copyright © 2011-2013 Department of Computer Science, University of Oxford. All Rights Reserved.