Class CallAnalyse
java.lang.Object
org.nuiton.util.CallAnalyse
Cette classe permet de faire des analyses sur les appels de methode
En debut de methode on appelle la methode
enter(String), et en fin de methode
la methode exit(String).
Ensuite on peut récuperer les statistiques par Thread ou de tous les threads
On a comme statistique
- le temps d'execution
- la memore utilisé
- le nombre d'appels
- Author:
- Benjamin Poussin - poussin@codelutin.com
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCallStatistics is the class which handles values on excecution time and memory usage.static classThis class is collecting data from different CallStatistics classes by using the methodCallAnalyse.CallStatisticsSummary.addCallStats(org.nuiton.util.CallAnalyse.CallStatistics).static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidactivate()Permet d'activer les statistiques, pour le thread courantstatic voidPermet de desactiver les statistiques, pour le thread courantstatic voidstatic voidIndique la sortie de l'appel, name doit avoir ete utilisé lors d'un enterstatic List<CallAnalyse.ThreadStatistics> static Map<String, CallAnalyse.CallStatisticsSummary> This method will get all the statistics from all the threads and put it all together in aMapwhich key is the name of the watched element and the value is its instance ofCallAnalyse.CallStatisticsSummarystatic CallAnalyse.ThreadStatisticsstatic booleanPermet de savoir si les statistiques sont activées ou non, pour le thread courant
-
Constructor Details
-
CallAnalyse
public CallAnalyse()
-
-
Method Details
-
activate
public static void activate()Permet d'activer les statistiques, pour le thread courant -
desactivate
public static void desactivate()Permet de desactiver les statistiques, pour le thread courant -
isActivate
public static boolean isActivate()Permet de savoir si les statistiques sont activées ou non, pour le thread courant- Returns:
- FIXME
-
enter
- Parameters:
name- le nom de l'appel a monitorer
-
exit
Indique la sortie de l'appel, name doit avoir ete utilisé lors d'un enter- Parameters:
name- le nom de l'appel a monitorer, doit etre identique a celui utilisé pour la methode enter
-
getThreadStatistics
- Returns:
- the statistics for the current thread
-
getAllThreadStatistics
- Returns:
- the statistics for all threads
-
getSummary
This method will get all the statistics from all the threads and put it all together in aMapwhich key is the name of the watched element and the value is its instance ofCallAnalyse.CallStatisticsSummary- Returns:
- A map with all collected statistics
-