Class ScriptUsage

java.lang.Object
org.microproxy.ScriptUsage

public final class ScriptUsage extends Object
What the calls into scripts for one exchange added up to, as FlowContext.scriptStats() gives it: how many calls, how long they took, how many interpreter steps they ran and about how many bytes of values they created (an estimate of what was made, not of what stayed in memory). The calls of an exchange may come from several threads (a tunnel's two directions), so the totals are added to without a lock; read together they may be a call apart.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ScriptUsage
    The totals of an exchange no script was called for: all zero, and never added to.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns about how many bytes of values the calls created, together.
    long
    Returns the number of calls into scripts.
    long
    Returns the nanoseconds the calls took, together.
    long
    Returns the interpreter steps the calls ran, together.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • NONE

      public static final ScriptUsage NONE
      The totals of an exchange no script was called for: all zero, and never added to.
  • Method Details

    • calls

      public long calls()
      Returns the number of calls into scripts.
      Returns:
      the number of calls into scripts
    • nanos

      public long nanos()
      Returns the nanoseconds the calls took, together.
      Returns:
      the nanoseconds the calls took, together
    • steps

      public long steps()
      Returns the interpreter steps the calls ran, together.
      Returns:
      the interpreter steps the calls ran, together
    • allocBytes

      public long allocBytes()
      Returns about how many bytes of values the calls created, together.
      Returns:
      about how many bytes of values the calls created, together
    • toString

      public String toString()
      Overrides:
      toString in class Object