MCPcopy Create free account
hub / github.com/USCiLab/cereal / saveData

Function saveData

sandbox/performance.cpp:64–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62 @return The ostringstream and the time it took to save the data */
63template <class T>
64std::chrono::nanoseconds
65saveData( T const & data, std::function<void(std::ostringstream &, T const&)> saveFunction, std::ostringstream & os )
66{
67 auto start = std::chrono::high_resolution_clock::now();
68 saveFunction( os, data );
69 return std::chrono::duration_cast<std::chrono::nanoseconds>( std::chrono::high_resolution_clock::now() - start );
70}
71
72//! Runs serialization to load data to from an istringstream
73/*! Used to time how long it takes to load data from an istringstream.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected