Packages

c

io.github.dutrevis

StatMetricCollector

class StatMetricCollector extends ProcFileMetricCollector

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StatMetricCollector
  2. ProcFileMetricCollector
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new StatMetricCollector()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. def defaultPathGetter(s1: String, s2: String*): Path

    Gets the file path from a String or a sequence of Strings.

    Gets the file path from a String or a sequence of Strings. Used as the path_getter default function.

    s1

    a String used to compose the first element of a file path.

    s2

    an optional sequence of Strings used to compose the last elements of a file path.

    returns

    a Path object with the file path.

    Definition Classes
    ProcFileMetricCollector
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  10. def getMetricValue(procFileContent: String, originalMetricName: String): Double

    Gets the value of a metric from the content of a proc file provided.

    Gets the value of a metric from the content of a proc file provided. The metric is searched according to the original name provided in the parameter originalMetricName.

    procFileContent

    a String with the content of the desired proc file

    originalMetricName

    the original metric name by which it is found in the proc file

    returns

    the metric value as Double

    Definition Classes
    StatMetricCollectorProcFileMetricCollector
    Exceptions thrown

    NoSuchElementException if a metric is not found with the provided original name

  11. def getProcFileContent(path_getter: (String, Seq[String]) => Path = defaultPathGetter, file_reader: (Path) => Array[Byte] = Files.readAllBytes, charset: Charset = StandardCharsets.UTF_8): String

    Returns the String content of a proc file located at the procFilePath, enconded using a provided charset.

    Returns the String content of a proc file located at the procFilePath, enconded using a provided charset.

    path_getter

    a Function used to get the file path from a String or a sequence of Strings, returning a Path object.

    file_reader

    a Function that uses a Path object to get the content of a file, returning it in the format of an Array of bytes.

    charset

    a Charset object used to define the final String encoding.

    returns

    a String with the content of the file read.

    Definition Classes
    ProcFileMetricCollector
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  17. val procFileCPUColumns: List[String]

    A List with the names of the columns present in the /proc/stat file.

    A List with the names of the columns present in the /proc/stat file. They are used as keys of a Map that points to the values collected from the file.

  18. val procFilePath: String
  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped