org.nuiton.util
Class CallAnalyse

java.lang.Object
  extended by org.nuiton.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 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


    Nested Class Summary
    static class CallAnalyse.CallStatistics
              CallStatistics is the class which handles values on excecution time and memory usage.
    static class CallAnalyse.CallStatisticsSummary
              This class is collecting data from different CallStatistics classes by using the method CallAnalyse.CallStatisticsSummary.addCallStats(org.nuiton.util.CallAnalyse.CallStatistics).
    static class CallAnalyse.ThreadStatistics
               
     
    Constructor Summary
    CallAnalyse()
               
     
    Method Summary
    static void activate()
              Permet d'activer les statistiques, pour le thread courant
    static void desactivate()
              Permet de desactiver les statistiques, pour le thread courant
    static void enter(String name)
               
    static void exit(String name)
              Indique la sortie de l'appel, name doit avoir ete utilisé lors d'un enter
    static 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 a Map which key is the name of the watched element and the value is its instance of CallAnalyse.CallStatisticsSummary
    static CallAnalyse.ThreadStatistics getThreadStatistics()
               
    static boolean isActivate()
              Permet de savoir si les statistiques sont activées ou non, pour le thread courant
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    CallAnalyse

    public CallAnalyse()
    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


    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 a Map which key is the name of the watched element and the value is its instance of CallAnalyse.CallStatisticsSummary

    Returns:
    A map with all collected statistics


    Copyright © 2004-2009 CodeLutin. All Rights Reserved.