Skip to content

Commit

Permalink
Cleanup some debug printfs
Browse files Browse the repository at this point in the history
  • Loading branch information
tpatki committed Aug 1, 2024
1 parent a5ebb1d commit 5a95664
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/services/variorum/Variorum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,17 @@ std::tuple<bool, uint64_t> measure(const std::string& name)
void *iter = json_object_iter(energy_obj);
while (iter)
{
//hostname = json_object_iter_key(iter);
node_obj = json_object_iter_value(iter);
if (node_obj == NULL)
{
printf("JSON object not found");
exit(0);
}

/* The following should return NULL after the first call per our object. */
iter = json_object_iter_next(energy_obj, iter);
}

/*Patki dump values to screen */
if (json_object_get(node_obj, "energy_node_watts") != NULL)
{
energy_joules = json_integer_value(json_object_get(node_obj, name.c_str()));
printf("Node Energy: %lu Joules\n", energy_joules);
}
else
{
energy_joules = 0;
}

//Deallocate the string
free(s);

Expand Down Expand Up @@ -325,7 +314,7 @@ class VariorumService
delete instance;
});

Log(1).stream() << channel->name() << ": Registered variorum service"
Log(1).stream() << channel->name() << ": Registered variorum service."
<< std::endl;
}
};
Expand All @@ -335,7 +324,7 @@ const ConfigSet::Entry VariorumService::s_configdata[] = {
"domains", // config variable name
CALI_TYPE_STRING, // datatype
"", // default value
"List of domains to record", // short description
"List of domains to record.", // short description
// long description
"List of domains to record (separated by ',')\n"
"Example: energy_node_joules"
Expand Down

0 comments on commit 5a95664

Please sign in to comment.