MCPcopy Create free account
hub / github.com/ElementsProject/lightning / likely_stats_reset

Function likely_stats_reset

ccan/ccan/likely/likely.c:120–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120void likely_stats_reset(void)
121{
122 struct thash_iter i;
123 struct trace *t;
124
125 /* This is a bit better than O(n^2), but we have to loop since
126 * first/next during delete is unreliable. */
127 while ((t = thash_first(&htable, &i)) != NULL) {
128 for (; t; t = thash_next(&htable, &i)) {
129 thash_del(&htable, t);
130 free(t);
131 }
132 }
133
134 thash_clear(&htable);
135}
136#endif /*CCAN_LIKELY_DEBUG*/

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by 1

mainFunction · 0.68