MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / calculate_utilization

Function calculate_utilization

pengine/utils.c:298–311  ·  view source on GitHub ↗

Specify 'allocate' to TRUE when allocating * Otherwise to FALSE when deallocating */

Source from the content-addressed store, hash-verified

296 * Otherwise to FALSE when deallocating
297 */
298static void
299calculate_utilization(node_t * node, resource_t * rsc, gboolean allocate)
300{
301 struct calculate_data data;
302
303 data.node = node;
304 data.allocate = allocate;
305
306 g_hash_table_foreach(rsc->utilization, do_calculate_utilization, &data);
307
308 if (allocate) {
309 dump_rsc_utilization(show_utilization ? 0 : utilization_log_level, __FUNCTION__, rsc, node);
310 }
311}
312
313void
314native_deallocate(resource_t * rsc)

Callers 2

native_deallocateFunction · 0.85
native_assign_nodeFunction · 0.85

Calls 1

dump_rsc_utilizationFunction · 0.85

Tested by

no test coverage detected