MCPcopy Create free account
hub / github.com/boostorg/build / hashstats_add

Function hashstats_add

v2/engine/hash.c:334–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332
333
334void hashstats_add( struct hashstats * stats, struct hash * hp )
335{
336 if ( hp )
337 {
338 ITEM * * tab = hp->tab.base;
339 int nel = hp->tab.nel;
340 int count = 0;
341 int sets = 0;
342 int i;
343
344 for ( i = 0; i < nel; ++i )
345 {
346 ITEM * item;
347 int here = 0;
348 for ( item = tab[ i ]; item; item = item->next )
349 ++here;
350
351 count += here;
352 if ( here > 0 )
353 ++sets;
354 }
355
356 stats->count += count;
357 stats->sets += sets;
358 stats->num_items += hp->items.nel;
359 stats->tab_size += hp->tab.nel;
360 stats->item_size = hp->items.size;
361 ++stats->num_hashes;
362 }
363}
364
365
366void hashstats_print( struct hashstats * stats, char const * name )

Callers 3

module_statFunction · 0.85
stat_moduleFunction · 0.85
hashstatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected