fixes bug where priorities where lost when force-rechecking.
[libtorrent.git] / test / test_bdecode_performance.cpp
blobb27799a6a8288e17a57c827ba95117569e43c8e9
1 #include "libtorrent/lazy_entry.hpp"
2 #include <boost/lexical_cast.hpp>
3 #include <iostream>
5 #include "test.hpp"
6 #include "libtorrent/time.hpp"
8 using namespace libtorrent;
10 int test_main()
12 using namespace libtorrent;
14 ptime start(time_now());
16 for (int i = 0; i < 1000000; ++i)
18 char b[] = "d1:ai12453e1:b3:aaa1:c3:bbbe";
19 lazy_entry e;
20 int ret = lazy_bdecode(b, b + sizeof(b)-1, e);
22 ptime stop(time_now());
24 std::cout << "done in " << total_milliseconds(stop - start) / 1000. << " seconds per million message" << std::endl;
25 return 0;