///Calls write summary, and makes sure it is only done once in a thread-safe fasion.
void ODPCMAliasBlockFile::DoWriteSummary()
{
   mWriteSummaryMutex.Lock();
   if(!IsSummaryAvailable())
      WriteSummary();
   mWriteSummaryMutex.Unlock();
}
Beispiel #2
0
//--------------------------------------------------------------------
void Structure::Write (std::string filename) const
// Write a breigf summary of the object to the specified file
   {
   std::ofstream s (filename.c_str());
   WriteSummary (s,0);
   s.close();
   }
void ODPCMAliasBlockFile::Recover(void)
{
   if(IsSummaryAvailable())
   {
      WriteSummary();
   }
}
Beispiel #4
0
void CleanupMillisTimer(void) {
  if (streamlog) fclose (streamlog);
  if (streamsummary) {
    WriteSummary();
    fclose(streamsummary);
    fclose(streamlog);
  }

  streamlog=0;
}
Beispiel #5
0
void CleanupMillisTimer(void) {
  if ((int64)timeEndPeriod((unsigned int)timerRes) == (int64)TIMERR_NOCANDO) {
    std::cerr << "WARNING: bad return value of call to timeEndPeriod.\n";
  }
  if (streamlog)
    fclose(streamlog);
  if (streamsummary) {
    WriteSummary();
    fclose(streamsummary);
  }
  streamlog=0;
  streamsummary=0;
}
Beispiel #6
0
void CDirectory::WriteDirectoryFinishSummary()
{
    WriteSummary(GetDirectoryName(), IsBaseline(), NumVariations, NumDiffs, NumFailures);

    if (Timing & TIME_DIR)
    {
        Message("RL: Directory elapsed time (%s): %02d:%02d", GetDirectoryName(), elapsed_dir / 60, elapsed_dir % 60);
    }

    if (FSyncDir)
    {
       FlushOutput();
    }
}
Beispiel #7
0
void GenSetupMillisTimer(int argc, char**argv) {
  if (streamlog) fclose(streamlog);
  if (streamsummary) {
    WriteSummary();
    fclose(streamsummary);
  }
  std::string filename("log");
  int i;
  for ( i=1;i<argc;++i){
    if (argv[i][0]>='0'&&argv[i][1]<='9')
      filename+="-";
    filename+=argv[i];
  }
  streamlog = fopen (filename.c_str(),"w");
  filename="sum";
  for ( i=1;i<argc;++i){
    if (argv[i][0]>='0'&&argv[i][1]<='9')
      filename+="-";
    filename+=argv[i];
  }
  streamsummary = fopen (filename.c_str(),"w");
}
void PCMAliasBlockFile::Recover(void)
{
   WriteSummary();
}
// regenerates the summary info, doesn't deal with missing alias files
void LegacyAliasBlockFile::Recover(){
   WriteSummary();
}
Beispiel #10
0
///Calls write summary, and makes sure it is only done once in a thread-safe fashion.
void ODPCMAliasBlockFile::DoWriteSummary()
{
   ODLocker locker { &mWriteSummaryMutex };
   if(!IsSummaryAvailable())
      WriteSummary();
}