java.lang.Object
com._1c.g5.v8.dt.internal.profiling.ui.view.methodlist.MethodStatistic

public class MethodStatistic extends Object
Object with method statistics:
  • Method name
  • Pragmas
  • Method parameters
  • Module name
  • The number of line where method starts
  • Amount of method calls
  • Pure and full time of method calls
  • Pure and full percentage of work time with reference to overall time of work
  • Flag determining whether the method is exported from module
  • Module ID
  • Debug targets this method was executed on
  • Server call signal
  • Module owner class
  • Project this method belongs to.
  • Constructor Details

    • MethodStatistic

      public MethodStatistic(ILineProfilingResult lineResult)
      Creates new method statistics object using LineProfilingResult.
      Parameters:
      lineResult - Line result to be used. Cannot be null.
  • Method Details

    • addStats

      public void addStats(ILineProfilingResult lineResult)
      Sums existing statistics with the ones from passed line result.
      Parameters:
      lineResult - Line result with stats to be added. Cannot be null.
    • clearFrequencies

      public void clearFrequencies()
      Clears frequencies.
    • getFirstLineNo

      public int getFirstLineNo()
      Gets the number of first line in method.
      Returns:
      The number of first line added to this method statistics result.
    • getMethodName

      public String getMethodName()
      Gets method name.
      Returns:
      Method name. Never null.
    • getPureDurability

      public long getPureDurability()
      Gets pure durability of execution of this method.
      Returns:
      Pure durability of execution of this method. Always greater of equal to 0.
    • getPureDurabilities

      public Map<DebugTargetType,Long> getPureDurabilities()
      Gets pure durabilities of this method's calls grouped by debug targets.
      Parameters:
      side - Compare side to get pure durabilities of calls for. Cannot be null.
      Returns:
      Map with pure durabilities of calls grouped by debug targets. Never null.
    • getFrequency

      public Optional<Long> getFrequency()
      Gets amount of calls of this method.
      Returns:
      Amount of calls. Can be empty optional if cannot be calculated properly.
    • getFrequencies

      public Map<DebugTargetType,Long> getFrequencies()
      Gets amount of this method's calls grouped by debug targets.
      Returns:
      Map with amount of calls grouped by debug targets. Never null. Values can be absent if the amount of calls can't be calculated properly.
    • getDurability

      public long getDurability()
      Gets full time of execution of this method.
      Returns:
      Full time of execution. Always greater or equal to 0.
    • getDurabilities

      public Map<DebugTargetType,Long> getDurabilities()
      Gets durabilities of this method's calls grouped by debug targets.
      Returns:
      Map with durabilities of calls grouped by debug targets. Never null.
    • getPercentage

      public double getPercentage()
      Gets this method's part of execution time (with reference to overall time of program execution).
      Returns:
      Percents of overall execution time. Always greater than 0.
    • getPercentages

      public Map<DebugTargetType,Double> getPercentages()
      Gets percentages of this method's calls grouped by debug targets.
      Returns:
      Map with percentages of this method's calls grouped by debug targets. Never null.
    • getPurePercentage

      public double getPurePercentage()
      Gets this method's pure part of execution time (with reference to overall time of program execution).
      Returns:
      Pure percents of overall execution time. Always greater than 0.
    • getPurePercentages

      public Map<DebugTargetType,Long> getPurePercentages()
      Gets this method's parts of pure execution time separated by debug target.
      Returns:
      This method's parts of pure time of execution separated by debug target.
    • getModuleId

      public BSLModuleIdInternal getModuleId()
      Gets ID of module this method belongs to.
      Returns:
      Parent module ID. Never null.
    • getDebugTargets

      public Set<DebugTargetType> getDebugTargets()
      Gets types of debug targets this method was executed on.
      Returns:
      Set with types of debug targets this method was executed on. Cannot be null or empty.
    • getServerCallSignal

      public ServerCallSignal getServerCallSignal()
      Gets server call signal.
      Returns:
      Server call signal. Never null.
      See Also:
    • getPragmas

      public String getPragmas()
      Gets all pragmas for method.
      Returns:
      String with all pragmas in format "&pragma1&pragma2...".
    • getParams

      public String getParams()
      Gets parameters of method.
      Returns:
      String with parameters in format "(param1, param2, ... , paramN)".
    • isExport

      public boolean isExport()
      Gets the flag determining whether the method associated with this result uis exported or not.
      Returns:
      true if method associated with this result is exported, false otherwise.
    • getOwnerClass

      public org.eclipse.emf.ecore.EClass getOwnerClass()
      Gets the class of the owner of module containing the method associated with this result.
      Returns:
      owner The class of the owner of module. Never null.
    • getModuleName

      public String getModuleName()
      Returns the name of module containing the method associated with this object.
      Returns:
      The name of module or dummy string if module is not found.
    • getMethodSignature

      public String getMethodSignature()
      Gets full method signature in format "name(parameters)pragmas [export]".
      Returns:
      Method signature. Never null.
    • getProject

      public org.eclipse.core.resources.IProject getProject()
      Gets the project containing the method this result is associated with.
      Returns:
      The project associated with this result. Never null.