CppBenchmark  1.0.4.0
C++ Benchmark Library
Public Member Functions | Static Public Member Functions | List of all members
CppBenchmark::System Class Reference

System management static class. More...

#include <system.h>

Public Member Functions

 System ()=delete
 
 System (const System &)=delete
 
 System (System &&)=delete
 
 ~System ()=delete
 
Systemoperator= (const System &)=delete
 
Systemoperator= (System &&)=delete
 

Static Public Member Functions

static std::string CpuArchitecture ()
 CPU architecture string. More...
 
static int CpuLogicalCores ()
 CPU logical cores count. More...
 
static int CpuPhysicalCores ()
 CPU physical cores count. More...
 
static std::pair< int, int > CpuTotalCores ()
 CPU total cores count. More...
 
static int64_t CpuClockSpeed ()
 CPU clock speed in Hz. More...
 
static bool CpuHyperThreading ()
 Is CPU Hyper-Threading enabled? More...
 
static int64_t RamTotal ()
 Total RAM in bytes. More...
 
static int64_t RamFree ()
 Free RAM in bytes. More...
 
static uint64_t CurrentThreadId ()
 Current thread Id. More...
 
static uint64_t Timestamp ()
 Get the current timestamp in nanoseconds. More...
 
static uint64_t MulDiv64 (uint64_t operant, uint64_t multiplier, uint64_t divider)
 Calculate (operant * multiplier / divider) with 64-bit unsigned integer values. More...
 

Detailed Description

System management static class.

Provides system management functionality to get CPU properties, RAM properties, current thread Id, etc.

Definition at line 21 of file system.h.

Constructor & Destructor Documentation

◆ System() [1/3]

CppBenchmark::System::System ( )
delete

◆ System() [2/3]

CppBenchmark::System::System ( const System )
delete

◆ System() [3/3]

CppBenchmark::System::System ( System &&  )
delete

◆ ~System()

CppBenchmark::System::~System ( )
delete

Member Function Documentation

◆ CpuArchitecture()

std::string CppBenchmark::System::CpuArchitecture ( )
static

CPU architecture string.

Definition at line 128 of file system.cpp.

◆ CpuClockSpeed()

int64_t CppBenchmark::System::CpuClockSpeed ( )
static

CPU clock speed in Hz.

Definition at line 255 of file system.cpp.

◆ CpuHyperThreading()

bool CppBenchmark::System::CpuHyperThreading ( )
static

Is CPU Hyper-Threading enabled?

Definition at line 299 of file system.cpp.

◆ CpuLogicalCores()

int CppBenchmark::System::CpuLogicalCores ( )
static

CPU logical cores count.

Definition at line 172 of file system.cpp.

◆ CpuPhysicalCores()

int CppBenchmark::System::CpuPhysicalCores ( )
static

CPU physical cores count.

Definition at line 177 of file system.cpp.

◆ CpuTotalCores()

std::pair< int, int > CppBenchmark::System::CpuTotalCores ( )
static

CPU total cores count.

Definition at line 182 of file system.cpp.

◆ CurrentThreadId()

uint64_t CppBenchmark::System::CurrentThreadId ( )
static

Current thread Id.

Definition at line 367 of file system.cpp.

◆ MulDiv64()

uint64_t CppBenchmark::System::MulDiv64 ( uint64_t  operant,
uint64_t  multiplier,
uint64_t  divider 
)
static

Calculate (operant * multiplier / divider) with 64-bit unsigned integer values.

Definition at line 429 of file system.cpp.

◆ operator=() [1/2]

System& CppBenchmark::System::operator= ( const System )
delete

◆ operator=() [2/2]

System& CppBenchmark::System::operator= ( System &&  )
delete

◆ RamFree()

int64_t CppBenchmark::System::RamFree ( )
static

Free RAM in bytes.

Definition at line 331 of file system.cpp.

◆ RamTotal()

int64_t CppBenchmark::System::RamTotal ( )
static

Total RAM in bytes.

Definition at line 305 of file system.cpp.

◆ Timestamp()

uint64_t CppBenchmark::System::Timestamp ( )
static

Get the current timestamp in nanoseconds.

Definition at line 378 of file system.cpp.


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