fr.ifremer.isisfish.util
Class Trace

java.lang.Object
  extended by fr.ifremer.isisfish.util.Trace

public class Trace
extends java.lang.Object

Permet de tracer les appels aux methodes utilisateur ainsi que l'execution a ces methodes. La difference entre les deux est lors de l'utilisation du cache les appels seront superieur a l'execution car certaine valeur seront reutilisé dans le cache.

Version:
$Revision: 2599 $ Last update: $Date: 2009-09-11 12:13:35 +0200 (ven., 11 sept. 2009) $ by : $Author: chatellier $
Author:
poussin

Field Summary
protected  java.util.Stack<long[]> callStack
          array : [nest e call, start time, start time with child]
protected  java.lang.String name
           
static int STAT_CALL
          nombre d'appel Cache inclus
static int STAT_CALL_NEST_METHOD
          nombre d'appel vers une autre e depuis cette methode
static int STAT_COMPUTATION
          nombre d'appel reel qui a fait le calcul
static int STAT_TIME_MAX
          temps max d'execution de cette methode (sans le temps des autres methodes)
static int STAT_TIME_MIN
          temps mini d'execution de cette methode (sans le temps des autres methodes)
static int STAT_TIME_TOTAL
          temps total d'execution de cette methode (sans le temps des autres methodes)
static int STAT_TIME_TOTAL_NEST_METHOD
          temps total d'execution de cette methode (avec le temps des autres methodes)
protected  java.util.Map<java.lang.String,long[]> statistics
          array : [call's numbers, call do, min time, max time, total time, total time with child]
 
Constructor Summary
Trace(java.lang.String name)
           
 
Method Summary
 long[] getStatistics(java.lang.Object e)
           
 java.lang.String printStatisticAndClear()
           
protected  void traceAfter(java.lang.Object e, boolean computation)
           
 void traceAfterCall(java.lang.Object e)
           
 void traceAfterComputation(java.lang.Object e)
           
 void traceBefore()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STAT_CALL

public static final int STAT_CALL
nombre d'appel Cache inclus

See Also:
Constant Field Values

STAT_COMPUTATION

public static final int STAT_COMPUTATION
nombre d'appel reel qui a fait le calcul

See Also:
Constant Field Values

STAT_CALL_NEST_METHOD

public static final int STAT_CALL_NEST_METHOD
nombre d'appel vers une autre e depuis cette methode

See Also:
Constant Field Values

STAT_TIME_MIN

public static final int STAT_TIME_MIN
temps mini d'execution de cette methode (sans le temps des autres methodes)

See Also:
Constant Field Values

STAT_TIME_MAX

public static final int STAT_TIME_MAX
temps max d'execution de cette methode (sans le temps des autres methodes)

See Also:
Constant Field Values

STAT_TIME_TOTAL

public static final int STAT_TIME_TOTAL
temps total d'execution de cette methode (sans le temps des autres methodes)

See Also:
Constant Field Values

STAT_TIME_TOTAL_NEST_METHOD

public static final int STAT_TIME_TOTAL_NEST_METHOD
temps total d'execution de cette methode (avec le temps des autres methodes)

See Also:
Constant Field Values

name

protected java.lang.String name

statistics

protected java.util.Map<java.lang.String,long[]> statistics
array : [call's numbers, call do, min time, max time, total time, total time with child]


callStack

protected java.util.Stack<long[]> callStack
array : [nest e call, start time, start time with child]

Constructor Detail

Trace

public Trace(java.lang.String name)
Method Detail

getStatistics

public long[] getStatistics(java.lang.Object e)

traceBefore

public void traceBefore()

traceAfterCall

public void traceAfterCall(java.lang.Object e)

traceAfterComputation

public void traceAfterComputation(java.lang.Object e)

traceAfter

protected void traceAfter(java.lang.Object e,
                          boolean computation)

printStatisticAndClear

public java.lang.String printStatisticAndClear()


Copyright © 1999-2010 CodeLutin. All Rights Reserved.