com.atlassian.greenhopper.service.lexorank
Class LexoRankStatisticsAgent

java.lang.Object
  extended by com.atlassian.greenhopper.service.lexorank.LexoRankStatisticsAgent

@Service
public class LexoRankStatisticsAgent
extends java.lang.Object

This class collects LexoRankService statistics. This is done by calling the startOperation, endOperation at the start and end of rank operations, and calling startOperationStep and endOperationStep at the start nad end of operation steps. The agent will then have enough information to determine the frequency and duration of these operations and operation steps. Operation steps are nested within operations, eg startOperation(RANK_AFTER) startOperationStep(HEAL_RANKVALUE) endOperationStep(HEAL_RANKVALUE) startOperationStep(BACKOFF_YIELD) endOperationStep(BACKOFF_YIELD) endOperation(RANK_AFTER)


Nested Class Summary
static class LexoRankStatisticsAgent.CollectorJob
          A scheduled job that generates a report of the collected statistics.
static class LexoRankStatisticsAgent.Operation
          Operations currently supported by the statistics agent.
static class LexoRankStatisticsAgent.OperationStep
           
protected static class LexoRankStatisticsAgent.StatsEvent
           
 
Field Summary
protected static LoggerWrapper log
           
 
Constructor Summary
LexoRankStatisticsAgent()
           
 
Method Summary
 void endOperation(LexoRankStatisticsAgent.Operation operation)
          End a statistics operation.
 void endOperationStep(LexoRankStatisticsAgent.OperationStep operationStep)
           
 java.lang.String generateReport()
          Finish processing any outstanding statistics events, and then generate a report.
 void start()
          Start the statistics agent.
 void startOperation(LexoRankStatisticsAgent.Operation operation)
           
 void startOperationStep(LexoRankStatisticsAgent.OperationStep operationStep)
          Start a statistics operation.
 void stop()
          Stop the statistics agent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final LoggerWrapper log
Constructor Detail

LexoRankStatisticsAgent

public LexoRankStatisticsAgent()
Method Detail

start

public void start()
Start the statistics agent.


stop

public void stop()
Stop the statistics agent.


startOperation

public void startOperation(LexoRankStatisticsAgent.Operation operation)

startOperationStep

public void startOperationStep(LexoRankStatisticsAgent.OperationStep operationStep)
Start a statistics operation.

Parameters:
operationStep - is the operation step name.

endOperation

public void endOperation(LexoRankStatisticsAgent.Operation operation)
End a statistics operation.

Parameters:
operation - is the operation name.

endOperationStep

public void endOperationStep(LexoRankStatisticsAgent.OperationStep operationStep)

generateReport

public java.lang.String generateReport()
Finish processing any outstanding statistics events, and then generate a report.

Returns:
the report.


Copyright © 2007-2014 Atlassian. All Rights Reserved.