benchmark

This commit is contained in:
Niels
2013-12-11 13:23:50 +01:00
parent 5dbdba3c43
commit d1ac3d9938
3 changed files with 18 additions and 4 deletions

View File

@@ -1,14 +1,17 @@
#include <iostream>
#include <fstream>
#include <ctime>
#include <JSON.h>
int main(int argc, char** argv) {
time_t timer1, timer2;
JSON json;
std::ifstream infile(argv[1]);
time(&timer1);
json << infile;
std::cout << json.size() << "\n";
time(&timer2);
std::cout << "Parsing from std::ifstream: " << difftime(timer2, timer1) << " sec\n";
return 0;
}