|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.nuiton.profiling.NuitonTrace
public class NuitonTrace
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 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 Map<Method,long[]> |
statistics
array : [call's numbers, call do, min time, max time, total time, total time with child] |
| Constructor Summary | |
|---|---|
NuitonTrace()
|
|
| Method Summary | |
|---|---|
long[] |
getStatistics(Method method)
|
static String |
getStatisticsAndClear()
|
static void |
printStatisticsAndClear()
|
static void |
printStatisticsAndClear(PrintStream printer)
|
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 Map<Method,long[]> statistics
protected Stack<long[]> callStack
| Constructor Detail |
|---|
public NuitonTrace()
| Method Detail |
|---|
public long[] getStatistics(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 String getStatisticsAndClear()
public static void printStatisticsAndClear()
public static void printStatisticsAndClear(PrintStream printer)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||