Skip to content

Commit

Permalink
Debug return value of omrsysinfo_get_CPU_load()
Browse files Browse the repository at this point in the history
  • Loading branch information
thallium committed Nov 23, 2023
1 parent b664465 commit bcf6dfe
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fvtest/porttest/si.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1701,8 +1701,11 @@ TEST(PortSysinfoTest, sysinfo_test_get_CPU_load)
* that the API returns valid numbers within the range outlined in the API specification.
*/
double cpuLoad;
omrsysinfo_get_CPU_load(&cpuLoad);
omrsysinfo_get_CPU_load(&cpuLoad);
int ret;
ret = omrsysinfo_get_CPU_load(&cpuLoad);
printf("Return value of first invocation: %d\n", ret);
ret = omrsysinfo_get_CPU_load(&cpuLoad);
printf("Return value of second invocation: %d\n", ret);

/* Sleep for 100ms before re-sampling processor usage stats. This allows other processes and the operating system to
* use the CPU and drive up the user and kernel utilization. The call to cpuBurner probably won't be optimized out,
Expand Down

0 comments on commit bcf6dfe

Please sign in to comment.