Commit b82fbda3 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Benchmarks: implemented logging of metadata into a separate JSON file

Fixes #96
parent 0bfcbe16
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -168,11 +168,12 @@ main( int argc, char* argv[] )
       mode |= std::ios::app;
   std::ofstream logFile( logFileName, mode );

   // init benchmark and common metadata
   // init benchmark and set parameters
   Benchmark<> benchmark( logFile, loops, verbose );

   // prepare global metadata
   Logging::MetadataMap metadata = getHardwareMetadata();
   // write global metadata into a separate file
   std::map< std::string, std::string > metadata = getHardwareMetadata();
   writeMapAsJson( metadata, logFileName, ".metadata.json" );

   if( precision == "all" || precision == "float" )
      runBlasBenchmarks< float >( benchmark, metadata, minSize, maxSize, sizeStepFactor );
+4 −3
Original line number Diff line number Diff line
@@ -333,11 +333,12 @@ main( int argc, char* argv[] )
   if( rank == 0 )
      logFile.open( logFileName, mode );

   // init benchmark and common metadata
   // init benchmark and set parameters
   Benchmark<> benchmark( logFile, loops, verbose );

   // prepare global metadata
   Logging::MetadataMap metadata = getHardwareMetadata();
   // write global metadata into a separate file
   std::map< std::string, std::string > metadata = getHardwareMetadata();
   writeMapAsJson( metadata, logFileName, ".metadata.json" );

   // TODO: implement resolveMatrixType
//   return ! Matrices::resolveMatrixType< MainConfig,
+4 −3
Original line number Diff line number Diff line
@@ -613,11 +613,12 @@ main( int argc, char* argv[] )
   if( rank == 0 )
      logFile.open( logFileName, mode );

   // init benchmark and common metadata
   // init benchmark and set parameters
   Benchmark<> benchmark( logFile, loops, verbose );

   // prepare global metadata
   Logging::MetadataMap metadata = getHardwareMetadata();
   // write global metadata into a separate file
   std::map< std::string, std::string > metadata = getHardwareMetadata();
   writeMapAsJson( metadata, logFileName, ".metadata.json" );

   // TODO: implement resolveMatrixType
//   return ! Matrices::resolveMatrixType< MainConfig,
+4 −3
Original line number Diff line number Diff line
@@ -442,11 +442,12 @@ int main( int argc, char* argv[] )
       mode |= std::ios::app;
   std::ofstream logFile( logFileName, mode );

   // init benchmark and common metadata
   // init benchmark and set parameters
   Benchmark<> benchmark( logFile, loops, verbose );

   // prepare global metadata
   Logging::MetadataMap metadata = getHardwareMetadata();
   // write global metadata into a separate file
   std::map< std::string, std::string > metadata = getHardwareMetadata();
   writeMapAsJson( metadata, logFileName, ".metadata.json" );

   const String devices = parameters.getParameter< String >( "devices" );
   if( devices == "all" || devices == "host" )
+4 −3
Original line number Diff line number Diff line
@@ -430,11 +430,12 @@ int main( int argc, char* argv[] )
       mode |= std::ios::app;
   std::ofstream logFile( logFileName, mode );

   // init benchmark and common metadata
   // init benchmark and set parameters
   Benchmark<> benchmark( logFile, loops, verbose );

   // prepare global metadata
   Logging::MetadataMap metadata = getHardwareMetadata();
   // write global metadata into a separate file
   std::map< std::string, std::string > metadata = getHardwareMetadata();
   writeMapAsJson( metadata, logFileName, ".metadata.json" );

   const String devices = parameters.getParameter< String >( "devices" );
   if( devices == "all" || devices == "host" )
Loading