Package org.nuiton.util
Class CallAnalyse
java.lang.Object
org.nuiton.util.CallAnalyse
public class CallAnalyse
extends java.lang.Object
Cette classe permet de faire des analyses sur les appels de methode
En debut de methode on appelle la methode
enter(java.lang.String), et en fin de methode
la methode exit(java.lang.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:
Created: 25 aout 2005 14:09:22 CEST
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCallAnalyse.CallStatisticsCallStatistics is the class which handles values on excecution time and memory usage.static classCallAnalyse.CallStatisticsSummaryThis class is collecting data from different CallStatistics classes by using the methodCallAnalyse.CallStatisticsSummary.addCallStats(org.nuiton.util.CallAnalyse.CallStatistics).static classCallAnalyse.ThreadStatistics -
Constructor Summary
Constructors Constructor Description CallAnalyse() -
Method Summary
Modifier and Type Method Description static voidactivate()Permet d'activer les statistiques, pour le thread courantstatic voiddesactivate()Permet de desactiver les statistiques, pour le thread courantstatic voidenter(java.lang.String name)static voidexit(java.lang.String name)Indique la sortie de l'appel, name doit avoir ete utilisé lors d'un enterstatic java.util.List<CallAnalyse.ThreadStatistics>getAllThreadStatistics()static java.util.Map<java.lang.String,CallAnalyse.CallStatisticsSummary>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.CallStatisticsSummarystatic CallAnalyse.ThreadStatisticsgetThreadStatistics()static booleanisActivate()Permet 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
public static void enter(java.lang.String name)- Parameters:
name- le nom de l'appel a monitorer
-
exit
public static void exit(java.lang.String name)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
-