diff options
author | hunt <hunt> | 2005-11-09 23:12:38 +0000 |
---|---|---|
committer | hunt <hunt> | 2005-11-09 23:12:38 +0000 |
commit | fba06bdb8f5c91d1d170ca11afb4936e7608d29f (patch) | |
tree | eedf3f14cc8403d884bb295b91368ed3fe929f04 /runtime/tests | |
parent | b0c33276ce05ca0e4989725dadd5fabefedabbfd (diff) | |
download | systemtap-steved-fba06bdb8f5c91d1d170ca11afb4936e7608d29f.tar.gz systemtap-steved-fba06bdb8f5c91d1d170ca11afb4936e7608d29f.tar.xz systemtap-steved-fba06bdb8f5c91d1d170ca11afb4936e7608d29f.zip |
*** empty log message ***
Diffstat (limited to 'runtime/tests')
-rw-r--r-- | runtime/tests/maps/isx.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/runtime/tests/maps/isx.c b/runtime/tests/maps/isx.c index 2418a20c..9003f522 100644 --- a/runtime/tests/maps/isx.c +++ b/runtime/tests/maps/isx.c @@ -1,41 +1,36 @@ #include "runtime.h" /* test of maps with keys of int64 and value of stat */ -#define NEED_STAT_VALS +#define VALUE_TYPE STAT #define KEY1_TYPE INT64 -#include "map-keys.c" +#include "map-gen.c" #include "map.c" int main () { int i, j; - MAP map = _stp_map_new_int64(4, HSTAT_LINEAR, 0, 100, 10 ); - MAP map2 = _stp_map_new_int64(4, HSTAT_LOG, 11); + MAP map = _stp_map_new_ix (4, HIST_LINEAR, 0, 100, 10 ); + MAP map2 = _stp_map_new_ix(4, HIST_LOG, 11); - _stp_map_key_int64 (map, 3); for (i = 0; i < 100; i++) for (j = 0; j <= i*10 ; j++ ) - _stp_map_add_int64 (map, i); + _stp_map_add_ix (map, 3, i); - _stp_map_key_int64 (map, 2); for (i = 0; i < 10; i++) for (j = 0; j < 10 ; j++ ) - _stp_map_add_int64 (map, j * i ); + _stp_map_add_ix (map, 2, j * i ); - _stp_map_key_int64 (map, 1); for (i = 0; i < 100; i += 10) for (j = 0; j < i/10 ; j++ ) - _stp_map_add_int64 (map, i); + _stp_map_add_ix (map, 1, i); - _stp_map_key_int64 (map2, 1); for (i = 0; i < 128; i++) for (j = 0; j < 128 ; j++ ) - _stp_map_add_int64 (map2, i); + _stp_map_add_ix (map2, 1, i); - _stp_map_key_int64 (map2, 2); for (i = 0; i < 1024; i++) for (j = 0; j < 1024 ; j++ ) - _stp_map_add_int64 (map2, i); + _stp_map_add_ix (map2, 2, i); _stp_map_print (map, "map[%1d] = count:%C sum:%S avg:%A min:%m max:%M\n%H"); _stp_map_print (map2, "map2[%1d] = count:%C sum:%S avg:%A min:%m max:%M\n%H"); |