Skip to content

Commit

Permalink
Rename API to variorum_get_utilization_json, tested on Lassen.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpatki committed Mar 8, 2024
1 parent 4454367 commit 872a229
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/docs/sphinx/VariorumAPI.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ is accomplished using the ``int variorum_get_gpu_utilization_json(char
**get_gpu_util_obj_str)`` function. The total memory utilization is computed
using ``/proc/meminfo``, and CPU utilizations is computed using ``/proc/stat``.

The ``variorum_get_node_utilization_json(char **get_util_obj_str)`` function
The ``variorum_get_utilization_json(char **get_util_obj_str)`` function
returns a string type nested JSON object. An example is provided below:

.. code::
Expand All @@ -150,7 +150,7 @@ returns a string type nested JSON object. An example is provided below:
The ``*`` here refers to socket ID, and the ``#`` refers to GPU ID.

The ``variorum_get_node_utilization_json(char **get_util_obj_str)`` function
The ``variorum_get_utilization_json(char **get_util_obj_str)`` function
returns a string type nested JSON object. An example is provided below:

.. code::
Expand Down
2 changes: 1 addition & 1 deletion src/docs/sphinx/api/json_support_functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ Defined in ``variorum/variorum.h``.

.. doxygenfunction:: variorum_get_frequency_json

.. doxygenfunction:: variorum_get_node_utilization_json
.. doxygenfunction:: variorum_get_utilization_json

.. doxygenfunction:: variorum_get_gpu_utilization_json
2 changes: 1 addition & 1 deletion src/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set(BASIC_EXAMPLES
variorum-get-node-power-domain-info-json-example
variorum-get-power-json-example
variorum-get-thermals-json-example
variorum-get-node-utilization-json-example
variorum-get-utilization-json-example
variorum-get-topology-info-example
variorum-integration-using-json-example
variorum-monitoring-to-file-example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int main(int argc, char **argv)
return -1;
}
}
ret = variorum_get_node_utilization_json(&s);
ret = variorum_get_utilization_json(&s);
if (ret != 0)
{
printf("First run: JSON get node utilization failed!\n");
Expand All @@ -69,7 +69,7 @@ int main(int argc, char **argv)
x += do_work(i);
}
printf("Final result: %f\n", x);
ret = variorum_get_node_utilization_json(&s);
ret = variorum_get_utilization_json(&s);
if (ret != 0)
{
printf("Second run: JSON get node utilization failed!\n");
Expand Down
2 changes: 1 addition & 1 deletion src/variorum/variorum.c
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,7 @@ int variorum_get_power_json(char **get_power_obj_str)
return err;
}

int variorum_get_node_utilization_json(char **get_util_obj_str)
int variorum_get_utilization_json(char **get_util_obj_str)
{
int err = 0;
err = variorum_enter(__FILE__, __FUNCTION__, __LINE__);
Expand Down
2 changes: 1 addition & 1 deletion src/variorum/variorum.h
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ int variorum_get_power_json(char **get_power_obj_str);
/// @returns 0 if successful, otherwise -1. Note that feature not implemented
/// returns a -1 for the JSON APIs so that users don't have to explicitly
/// check for NULL strings.
int variorum_get_node_utilization_json(char **get_util_obj_str);
int variorum_get_utilization_json(char **get_util_obj_str);

/// @brief Populate a string in JSON format with utilization of each GPU
///
Expand Down

0 comments on commit 872a229

Please sign in to comment.