Last active
December 17, 2015 11:39
-
-
Save motonacciu/5603592 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TEST(Performance, Water) { | |
| auto t1 = std::tuple<int,uint64_t,std::vector<uint8_t>,std::string>( | |
| 10, 20, std::vector<uint8_t>{0,1,2,3,4,5,6,7,8,9},"hello cpp-love!"); | |
| auto start = std::chrono::high_resolution_clock::now(); | |
| for (size_t i=0; i<500000; ++i) { | |
| StreamType res; | |
| serialize(t1,res); | |
| auto t2 = deserialize<decltype(t1)>(res); | |
| if (t1!=t2) { std::cerr << "BIG PROBLEMS!!!.. call MUM!" << std::endl; } | |
| } | |
| auto tot_time = std::chrono::duration_cast<std::chrono::microseconds>( | |
| std::chrono::system_clock::now()-start).count(); | |
| std::cout << "time: " << tot_time << std::endl; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment