Package io.ultreia.java4all.util
Class CallAnalyse
- java.lang.Object
-
- io.ultreia.java4all.util.CallAnalyse
-
public class CallAnalyse extends Object
Cette classe permet de faire des analyses sur les appels de methode En debut de methode on appelle la methodeenter(java.lang.String), et en fin de methode la methodeexit(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
- Since:
- 1.0.12
- Author:
- Benjamin Poussin - poussin@codelutin.com, Tony Chemit - dev@tchemit.fr
- See Also:
Created: 25 aout 2005 14:09:22 CEST Created on 10/06/2021.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCallAnalyse.CallStatisticsCallStatistics is the class which handles values on execution time and memory usage.static classCallAnalyse.CallStatisticsSummaryThis class is collecting data from different CallStatistics classes by using the methodCallAnalyse.CallStatisticsSummary.addCallStats(CallAnalyse.CallStatistics).static classCallAnalyse.ThreadStatistics
-
Constructor Summary
Constructors Constructor Description CallAnalyse()
-
Method Summary
All Methods Static Methods Concrete Methods 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(String name)static voidexit(String name)Indique la sortie de l'appel, name doit avoir ete utilisé lors d'un enterstatic List<CallAnalyse.ThreadStatistics>getAllThreadStatistics()static Map<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
-
-
-
Method Detail
-
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(String name)
- Parameters:
name- le nom de l'appel a monitorer
-
exit
public static void exit(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
public static CallAnalyse.ThreadStatistics getThreadStatistics()
- Returns:
- the statistics for the current thread
-
getAllThreadStatistics
public static List<CallAnalyse.ThreadStatistics> getAllThreadStatistics()
- Returns:
- the statistics for all threads
-
getSummary
public static Map<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.CallStatisticsSummary- Returns:
- A map with all collected statistics
-
-