00001 #include "uniconfroot.h"
00002 #include "wvstream.h"
00003 #include "wvtimeutils.h"
00004
00005 int main(int argc, char **argv)
00006 {
00007 const char *mon = (argc > 1) ? argv[1] : "ini:/tmp/big.cfg";
00008 wvcon->print("Using uniconf moniker '%s'\n", mon);
00009
00010 UniConfRoot cfg(mon);
00011 UniConf c2(cfg["/uids"]);
00012 WvTime start;
00013 int count;
00014
00015 while (1)
00016 {
00017 for (start = wvtime(), count = 0;
00018 msecdiff(wvtime(), start) < 5000;
00019 count++)
00020 {
00021 if (!cfg.whichmount() || !cfg.whichmount()->isok())
00022 {
00023 wvcon->print("not isok! aborting.\n");
00024 return 1;
00025 }
00026
00027 UniConf::Iter i(c2);
00028 for (i.rewind(); i.next(); )
00029 {
00030 UniConf c(*i);
00031 WvString v(i._value());
00032 }
00033 }
00034
00035 wvcon->print("%s iters/sec (%s in 5ms)\n",
00036 count/5, count);
00037 }
00038
00039 return 0;
00040 }