#include <stddef.h>
#include "geopm_public.h"
Go to the source code of this file.
◆ geopm_policystore_connect()
int GEOPM_PUBLIC geopm_policystore_connect |
( |
const char * |
data_path | ) |
|
Create a geopm policy store interface.
Connects to a data store, creating a one if does not exist already.
- Parameters
-
[in] | data_path | Path to the data store. |
- Returns
- Zero on success, error code on failure.
◆ geopm_policystore_disconnect()
int GEOPM_PUBLIC geopm_policystore_disconnect |
( |
| ) |
|
Destroy a geopm policy store interface and release its resources.
- Returns
- Zero on success, error code on failure.
◆ geopm_policystore_get_best()
int GEOPM_PUBLIC geopm_policystore_get_best |
( |
const char * |
agent_name, |
|
|
const char * |
profile_name, |
|
|
size_t |
max_policy_vals, |
|
|
double * |
policy_vals |
|
) |
| |
Get the best known policy for a given agent and profile.
Gets the agent's default policy if no best policy has been reported.
- Parameters
-
[in] | agent_name | Name of the agent to find. |
[in] | profile_name | Name of the profile to find. |
[in] | max_policy_vals | Maximum number of values that can fit in policy_vals . |
[out] | policy_vals | Best known or default policy. |
- Returns
- Zero on success, error code on failure.
◆ geopm_policystore_set_best()
int GEOPM_PUBLIC geopm_policystore_set_best |
( |
const char * |
agent_name, |
|
|
const char * |
profile_name, |
|
|
size_t |
num_policy_vals, |
|
|
const double * |
policy_vals |
|
) |
| |
Set the best known policy for a given agent and profile.
- Parameters
-
[in] | profile_name | Name of the profile. |
[in] | agent_name | Name of the agent. |
[in] | num_policy_vals | Number of values in policy_vals . |
[in] | policy_vals | New policy to apply. |
- Returns
- Zero on success, error code on failure.
◆ geopm_policystore_set_default()
int GEOPM_PUBLIC geopm_policystore_set_default |
( |
const char * |
agent_name, |
|
|
size_t |
num_policy_vals, |
|
|
const double * |
policy_vals |
|
) |
| |
Set the default policy for a given agent.
- Parameters
-
[in] | agent_name | Name of the agent. |
[in] | num_policy_vals | Number of values in policy_vals . |
[in] | policy_vals | Default policy to apply. |
- Returns
- Zero on success, error code on failure.