From e5d2abb56ca57a613e4ef9398a6499190b2265be Mon Sep 17 00:00:00 2001 From: hunt Date: Sat, 18 Jun 2005 07:24:42 +0000 Subject: 2005-06-18 Martin Hunt * counter.c: New file. Counter aggregations. * stat.c: New file. Stat aggregations. * stat.h: Header file for stats. * map-int.c: New file. Support for int64 values. * map-stat.c: New file. Support for stat values. * map-str.c: New file. Support for string values. * map-values.c: Now just includes the necessary map-*.c files. * stat-common.c: New file. Stats stuff common to Stats and maps containing stats. * Doxyfile: Bumped version to 0.6. * README: Renamed README.doc and reorganized. --- runtime/docs/examples/foreach.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'runtime/docs/examples/foreach.c') diff --git a/runtime/docs/examples/foreach.c b/runtime/docs/examples/foreach.c index fc110674..8000d60b 100644 --- a/runtime/docs/examples/foreach.c +++ b/runtime/docs/examples/foreach.c @@ -1,9 +1,9 @@ /* example showing how to print all the stats in a map using foreach() */ -struct map_node_stat *ptr; + struct map_node *ptr; + + foreach (mapsst, ptr) + _stp_printf ("mapsst[%09s,%09s] = %llX\n", key1str(ptr), key2str(ptr), _stp_get_stat(ptr)->sum); + -foreach (map, ptr) - printf ("map[%s,%ld] = [c=%lld s=%lld min=%lld max=%lld]\n", key1str(ptr), - key2int(ptr), ptr->stats.count, ptr->stats.sum, ptr->stats.min, - ptr->stats.max); -- cgit