|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.nuiton.profiling.LutinTrace
public class LutinTrace
Permet de tracer les appels aux methodes.
Pour l'utiliser il faut définir un fichier XML qui intercepte les methodes souhaiter.<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE aspectwerkz PUBLIC "-//AspectWerkz//DTD//EN" "http://aspectwerkz.codehaus.org/dtd/aspectwerkz2.dtd"> <aspectwerkz> <system id="sample"> <aspect class="fr.ifremer.isisfish.aspect.TraceIsis"> <pointcut name="executeMethod"> execution(* fr.ifremer.isisfish.datastore.ResultStorage.*(..)) || execution(* fr.ifremer.isisfish.aspect.Cache.*(..)) || execution(* fr.ifremer.isisfish.aspect.Trace.*(..)) || execution(* org.nuiton.topia..*(..)) || execution(* org.nuiton.math.matrix..*(..)) || execution(* fr.ifremer.isisfish.types..*(..)) || execution(* org.apache.commons.collections..*(..)) </pointcut> </aspect> </system> </aspectwerkz>Ensuite il faut lancer la JVM avec deux options
| Field Summary | |
|---|---|
protected java.util.Stack<long[]> |
callStack
array : [nest method call, start time, start time with child] |
static int |
STAT_CALL
nombre d'appel |
static int |
STAT_CALL_NEST_METHOD
nombre d'appel vers une autre method depuis cette methode |
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.reflect.Method,long[]> |
statistiques
array : [call's numbers, call do, min time, max time, total time, total time with child] |
| Constructor Summary | |
|---|---|
LutinTrace()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
getStatistiqueAndClear()
|
long[] |
getStatistiques(java.lang.reflect.Method method)
|
static void |
printStatistiqueAndClear()
|
void |
traceAfterExecute(org.codehaus.aspectwerkz.joinpoint.JoinPoint jp)
|
void |
traceAfterThrowingExecute(org.codehaus.aspectwerkz.joinpoint.JoinPoint jp)
|
void |
traceBeforeExecute(org.codehaus.aspectwerkz.joinpoint.JoinPoint jp)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int STAT_CALL
public static final int STAT_CALL_NEST_METHOD
public static final int STAT_TIME_MIN
public static final int STAT_TIME_MAX
public static final int STAT_TIME_TOTAL
public static final int STAT_TIME_TOTAL_NEST_METHOD
protected java.util.Map<java.lang.reflect.Method,long[]> statistiques
protected java.util.Stack<long[]> callStack
| Constructor Detail |
|---|
public LutinTrace()
| Method Detail |
|---|
public long[] getStatistiques(java.lang.reflect.Method method)
public void traceBeforeExecute(org.codehaus.aspectwerkz.joinpoint.JoinPoint jp)
public void traceAfterThrowingExecute(org.codehaus.aspectwerkz.joinpoint.JoinPoint jp)
public void traceAfterExecute(org.codehaus.aspectwerkz.joinpoint.JoinPoint jp)
public static java.lang.String getStatistiqueAndClear()
public static void printStatistiqueAndClear()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||