Adaptyst
A comprehensive and architecture-agnostic performance analysis tool
Loading...
Searching...
No Matches
adaptyst::CPUConfig Class Reference

#include <process.hpp>

Public Member Functions

 CPUConfig ()
 
 CPUConfig (std::string mask)
 
bool is_valid () const
 
int get_profiler_thread_count () const
 

Detailed Description

A class describing the configuration of CPU cores for performance analysis.

Specifically, CPUConfig describes what cores should be used for performance analysis, what cores should be used for running the workflow, what cores should be used for both, and what cores should not be used at all.

Constructor & Destructor Documentation

◆ CPUConfig() [1/2]

adaptyst::CPUConfig::CPUConfig ( )
inline

Constructs an invalid CPUConfig object. This can be useful e.g. when using CPUConfig as a class attribute.

◆ CPUConfig() [2/2]

adaptyst::CPUConfig::CPUConfig ( std::string mask)
inline

Constructs a CPUConfig object.

Parameters
maskA CPU mask string, where the i-th character defines the purpose of the i-th core as follows: ' ' means "not used", 'p' means "used for performance analysis", 'c' means "used for the executed workflow", and 'b' means "used for both the executed workflow and performance analysis".

Member Function Documentation

◆ get_profiler_thread_count()

int adaptyst::CPUConfig::get_profiler_thread_count ( ) const
inline

Returns the number of performance analysis threads that can be spawned based on how many cores are allowed for doing the analysis.

◆ is_valid()

bool adaptyst::CPUConfig::is_valid ( ) const
inline

Returns whether a CPUConfig object is valid.

A CPUConfig object can be invalid only if the string mask used for its construction is invalid.


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