Skip to content
Snippets Groups Projects
Commit cfa438ee authored by Radovan Červený's avatar Radovan Červený
Browse files

fixed ostream output for microseconds, default output of measurements is xml

parent ef39684d
No related branches found
No related tags found
1 merge request!14BP_cervera3 - new measurements
......@@ -50,6 +50,7 @@ struct TimeDataFrame {
static void xml_tokens ( std::deque < sax::Token > &, unsigned, const measurements::stealth_vector < MeasurementFrame > & );
};
 
std::ostream & operator <<( std::ostream &, const std::chrono::microseconds & );
std::ostream & operator <<( std::ostream &, const TimeDataFrame & );
 
struct MeasurementFrame {
......
......@@ -118,7 +118,7 @@ std::ostream & operator <<( std::ostream & os, const MeasurementResults & mr ) {
mr.print_as_tree ( os );
break;
 
case MeasurementFormat::XML:
default: /* MeasurementFormat::XML: */
sax::SaxComposeInterface::printStream ( os, mr.xml_tokens ( ) );
break;
}
......
......@@ -45,7 +45,7 @@ public:
using stealth_string = std::basic_string < char, std::char_traits < char >, stealth_allocator < char > >;
 
std::string to_string ( const stealth_string & );
std::string to_string ( stealth_string &);
std::string to_string ( stealth_string & );
 
template < typename T >
using stealth_vector = std::vector < T, stealth_allocator < T > >;
......
......@@ -44,4 +44,9 @@ std::ostream & operator <<( std::ostream & os, const TimeDataFrame & tdf ) {
return os;
}
 
std::ostream & operator <<( std::ostream & os, const std::chrono::microseconds & ms ) {
os << ms.count ( ) << "ms";
return os;
}
}
#include "MeasurementsTest.h"
#include "measurements/measurements.hpp"
#include "sax/SaxComposeInterface.h"
#include <thread>
#include <cmath>
#include <measure>
 
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION ( MeasurementsTest, "measurements" );
CPPUNIT_TEST_SUITE_REGISTRATION ( MeasurementsTest );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment