X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=postlicyd%2Ftst-rbl.c;h=7e567b1cf2b0c364b867a6e49624d3d66fbf5ca5;hb=ceecb2a293677667d8b099b0b32fd4adcdb22e7d;hp=8ba5e1232bd47d2ec11ad0f6099e73f87263616a;hpb=a9f9acc91df4c895a8051a745b9f4ef74b47b9f4;p=apps%2Fpfixtools.git diff --git a/postlicyd/tst-rbl.c b/postlicyd/tst-rbl.c index 8ba5e12..7e567b1 100644 --- a/postlicyd/tst-rbl.c +++ b/postlicyd/tst-rbl.c @@ -39,19 +39,20 @@ #include "common.h" #include "rbl.h" +#include "array.h" int main(int argc, char *argv[]) { if (argc > 1) { rbldb_t *db = rbldb_create(argv[1], false); printf("loaded: %s, %d ips, %d o\n", argv[1], rbldb_stats(db), - rbldb_stats(db) * 4); + rbldb_stats(db) * 1 + 65536 * sizeof(A(uint16_t))); time_t now = time(NULL); - for (uint32_t i = 0 ; i < 100000000 ; ++i) { + for (uint32_t i = 0 ; i < 1000000000 ; ++i) { rbldb_ipv4_lookup(db, (88 << 24) | (170 << 16) | (239 << 8) | (132)); } - printf("%ld request per second\n", 100000000 / (time(NULL) - now)); + printf("%ld request per second\n", 1000000000 / (time(NULL) - now)); rbldb_delete(&db); } return 0;