0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
Hypertable::MetricsProcess Class Reference

Computes and publishes general process metrics. More...

#include <MetricsProcess.h>

Inheritance diagram for Hypertable::MetricsProcess:
Inheritance graph
[legend]
Collaboration diagram for Hypertable::MetricsProcess:
Collaboration graph
[legend]

Public Member Functions

 MetricsProcess ()
 Constructor. More...
 
void collect (int64_t now, MetricsCollector *collector) override
 Collects process metrics. More...
 

Private Attributes

int64_t m_last_timestamp {}
 Last collection timestamp in nanoseconds. More...
 
int64_t m_last_sys {}
 Last recorded CPU system time. More...
 
int64_t m_last_user {}
 Last recorded CPU user time. More...
 

Detailed Description

Computes and publishes general process metrics.

Definition at line 41 of file MetricsProcess.h.

Constructor & Destructor Documentation

MetricsProcess::MetricsProcess ( )

Constructor.

Initializes m_last_sys and m_last_user from data gathered from SIGAR. Initializes m_last_timestamp to current time in milliseconds.

Definition at line 39 of file MetricsProcess.cc.

Member Function Documentation

void MetricsProcess::collect ( int64_t  now,
MetricsCollector collector 
)
overridevirtual

Collects process metrics.

Computes process metrics and publishes them via collector. The following JVM metrics and process metrics collected from SIGAR are computed and published:

  • cpu.sys - CPU system time (%)
  • cpu.user - CPU user time (%)
  • memory.virtual - Virtual memory (GB)
  • memory.resident - Resident memory (GB)
  • memory.heap - Heap size (GB)
  • memory.heapSlack - Heap slack bytes (GB)
  • version - Hypertable version string
Parameters
nowCurrent time in nanoseconds
collectorMetrics collector

Implements Hypertable::Metrics.

Definition at line 47 of file MetricsProcess.cc.

Member Data Documentation

int64_t Hypertable::MetricsProcess::m_last_sys {}
private

Last recorded CPU system time.

Definition at line 72 of file MetricsProcess.h.

int64_t Hypertable::MetricsProcess::m_last_timestamp {}
private

Last collection timestamp in nanoseconds.

Definition at line 69 of file MetricsProcess.h.

int64_t Hypertable::MetricsProcess::m_last_user {}
private

Last recorded CPU user time.

Definition at line 75 of file MetricsProcess.h.


The documentation for this class was generated from the following files: