Class MemoryPeakGlobal
Metric reporting the global process memory peak in megabytes.More...
#include <bench_global_memory_peak.h>
Inherits the following classes: Metric
Public Functions
| Type | Name |
|---|---|
| MemoryPeakGlobal () Construct the metric with label "GlobalMemoryPeak(Mo)". |
|
| virtual void | compute (const Mesh & originalMesh, const Mesh & reconstructedMesh, benchmark::State & state) override const Compute the metric for a single (original, reconstructed) pair. |
| double | get_memory_peak_mo () const Read the current process memory peak in megabytes. |
| ~MemoryPeakGlobal () = default |
Public Functions inherited from Metric
See Metric
| Type | Name |
|---|---|
| Metric (const std::string & name) Construct a metric with the given short label. |
|
| virtual void | compute (const Mesh & originalMesh, const Mesh & reconstructedMesh, benchmark::State & state) const = 0 Compute the metric for a single (original, reconstructed) pair. |
| const std::string & | getName () const Return the metric's short label. |
| virtual | ~Metric () = default |
Detailed Description
On Linux the value is read from /proc/self/status (VmHWM). On Windows the peak working-set size is read through the PSAPI. The result is recorded under the counter GlobalMemoryPeak(Mo).
Public Functions Documentation
function MemoryPeakGlobal
Construct the metric with label "GlobalMemoryPeak(Mo)".
function compute
Compute the metric for a single (original, reconstructed) pair.
virtual void MemoryPeakGlobal::compute (
const Mesh & originalMesh,
const Mesh & reconstructedMesh,
benchmark::State & state
) override const
Implementations should record their values on state.counters.
Parameters:
originalMeshGround-truth mesh.reconstructedMeshMesh produced by the reconstruction algorithm.stateGoogle Benchmark state receiving the counters.
Implements Metric::compute
function get_memory_peak_mo
Read the current process memory peak in megabytes.
Returns:
Memory peak in MiB.
function ~MemoryPeakGlobal
The documentation for this class was generated from the following file benchmark/metrics/implementations/bench_global_memory_peak.h