• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ PrintStats函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中PrintStats函数的典型用法代码示例。如果您正苦于以下问题:C++ PrintStats函数的具体用法?C++ PrintStats怎么用?C++ PrintStats使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了PrintStats函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: rand

void Fuzzer::ShuffleAndMinimize() {
  size_t MaxCov = 0;
  bool PreferSmall =
      (Options.PreferSmallDuringInitialShuffle == 1 ||
       (Options.PreferSmallDuringInitialShuffle == -1 && rand() % 2));
  if (Options.Verbosity)
    std::cerr << "PreferSmall: " << PreferSmall << "\n";
  PrintStats("READ  ", 0);
  std::vector<Unit> NewCorpus;
  std::random_shuffle(Corpus.begin(), Corpus.end());
  if (PreferSmall)
    std::stable_sort(
        Corpus.begin(), Corpus.end(),
        [](const Unit &A, const Unit &B) { return A.size() < B.size(); });
  Unit &U = CurrentUnit;
  for (const auto &C : Corpus) {
    for (size_t First = 0; First < 1; First++) {
      U.clear();
      size_t Last = std::min(First + Options.MaxLen, C.size());
      U.insert(U.begin(), C.begin() + First, C.begin() + Last);
      size_t NewCoverage = RunOne(U);
      if (NewCoverage) {
        MaxCov = NewCoverage;
        NewCorpus.push_back(U);
        if (Options.Verbosity >= 2)
          std::cerr << "NEW0: " << NewCoverage
                    << " L " << U.size()
                    << "\n";
      }
    }
  }
  Corpus = NewCorpus;
  PrintStats("INITED", MaxCov);
}
开发者ID:stevedrake,项目名称:llvm,代码行数:34,代码来源:FuzzerLoop.cpp


示例2: ConsoleCtrlHandler

static
BOOL
WINAPI
ConsoleCtrlHandler(DWORD ControlType)
{
    switch (ControlType)
    {
    case CTRL_C_EVENT:
        PrintStats();
        ConResPrintf(StdOut, IDS_CTRL_C);
        return FALSE;

    case CTRL_BREAK_EVENT:
        PrintStats();
        ConResPrintf(StdOut, IDS_CTRL_BREAK);
        return TRUE;

    case CTRL_CLOSE_EVENT:
        PrintStats();
        return FALSE;

    default:
        return FALSE;
    }
}
开发者ID:Moteesh,项目名称:reactos,代码行数:25,代码来源:ping.c


示例3: Printf

void Fuzzer::ShuffleAndMinimize() {
  bool PreferSmall = (Options.PreferSmallDuringInitialShuffle == 1 ||
                      (Options.PreferSmallDuringInitialShuffle == -1 &&
                       USF.GetRand().RandBool()));
  if (Options.Verbosity)
    Printf("PreferSmall: %d\n", PreferSmall);
  PrintStats("READ  ");
  std::vector<Unit> NewCorpus;
  if (Options.ShuffleAtStartUp) {
    std::random_shuffle(Corpus.begin(), Corpus.end(), USF.GetRand());
    if (PreferSmall)
      std::stable_sort(
          Corpus.begin(), Corpus.end(),
          [](const Unit &A, const Unit &B) { return A.size() < B.size(); });
  }
  Unit &U = CurrentUnit;
  for (const auto &C : Corpus) {
    for (size_t First = 0; First < 1; First++) {
      U.clear();
      size_t Last = std::min(First + Options.MaxLen, C.size());
      U.insert(U.begin(), C.begin() + First, C.begin() + Last);
      if (Options.OnlyASCII)
        ToASCII(U);
      if (RunOne(U)) {
        NewCorpus.push_back(U);
        if (Options.Verbosity >= 2)
          Printf("NEW0: %zd L %zd\n", LastRecordedBlockCoverage, U.size());
      }
    }
  }
  Corpus = NewCorpus;
  for (auto &X : Corpus)
    UnitHashesAddedToCorpus.insert(Hash(X));
  PrintStats("INITED");
}
开发者ID:byronwwang,项目名称:llvm,代码行数:35,代码来源:FuzzerLoop.cpp


示例4: GetAsyncKeyState

void StatBooster::ProcessKeyStrokes(HANDLE processHandle, HWND windowHandle, int memoryAddress, bool &stopped, bool &active, bool &activeStatusChanged, CharStats *charStats, CharStats *storedCharStats, Stats *stats, POINT &store_btn_coord, POINT &recall_btn_coord, POINT &reroll_btn_coord)
{
	int escKeyState = GetAsyncKeyState(VK_ESCAPE);
	int f1KeyState = GetKeyState(VK_F1);
	int f2KeyState = GetAsyncKeyState(VK_F2);
	int f5KeyState = GetAsyncKeyState(VK_F5);
	int f6KeyState = GetAsyncKeyState(VK_F6);
	int f7KeyState = GetAsyncKeyState(VK_F7);
	int f8KeyState = GetAsyncKeyState(VK_F8);

	if (escKeyState != 0)
	{
		stopped = true;
	}
	if (f1KeyState == 0 || f1KeyState == 1)
	{
		if (active != (f1KeyState == 1))
		{
			active = (f1KeyState == 1);
			activeStatusChanged = true;
		}
	}
	if (f2KeyState != 0 && !charStats->isBg1TomesUsed())
	{
		charStats->setBg1TomesUsed(true);
		system("cls");
		UpdateStats(processHandle, memoryAddress, charStats, stats, true);
		AddBG1TomeStats(processHandle, memoryAddress, charStats->getStrength(), charStats->getDexterity(), charStats->getConstitution(), charStats->getIntelligence(), charStats->getWisdom(), charStats->getCharisma());
		UpdateStats(processHandle, memoryAddress, charStats, stats, false);
		PrintStats(charStats, storedCharStats, stats);
	}
	if (f5KeyState != 0)
	{
		UpdateMouseCoord(windowHandle, store_btn_coord);
	}
	if (f6KeyState != 0)
	{
		UpdateMouseCoord(windowHandle, recall_btn_coord);
	}
	if (f7KeyState != 0)
	{
		UpdateMouseCoord(windowHandle, reroll_btn_coord);
	}
	if (f8KeyState != 0)
	{
		storedCharStats->reset();
		system("cls");
		PrintStats(charStats, storedCharStats, stats);
	}
}
开发者ID:ChyrosNX,项目名称:NephPP,代码行数:50,代码来源:StatBooster.cpp


示例5: main

int main(const int argc, const char *argv[]) {
  int nextarg;

  NaClLogModuleInit();
  NaClLogSetVerbosity(LOG_FATAL);
  if (0 != setvbuf(stdout, g_standard_output_buffer, _IOLBF,
                   sizeof g_standard_output_buffer)) {
    NaClLog(LOG_FATAL, "vdiff: setvbuf failed\n");
  }
#if NACL_LINUX || NACL_OSX
  srandom(time(NULL));
#endif
  VDiffInitializeAvailableDecoders();

  nextarg = ParseArgv(argc, argv);
  if (nextarg == argc) {
    if (gPrefix == 0) RunRegressionTests();
    TestAllInstructions();
  } else {
    int i;
    gVerbose = TRUE;
    for (i = nextarg; i < argc; ++i) {
      TestOneInstruction(argv[i]);
    }
  }
  PrintStats();

  /* exit with non-zero error code if there were errors. */
  exit(gVDiffStats.errors != 0);
}
开发者ID:Lind-Project,项目名称:native_client,代码行数:30,代码来源:vdiff.c


示例6: GetSavePath

/*******************************************************************
 * Function Name: PrintStats
 * Return Type 	: int
 * Created On	: Oct 27, 2013
 * Created By 	: hrushi
 * Comments		: Prints the Mean, Median, Standard Dev. the EM Score
 * Arguments	:
 *******************************************************************/
int GroundTruth::PrintStats(  const Args& args  ) const
{
	vector<double> AllScoreVal;

	string ScoreSavePath = GetSavePath( args );
	cout << "Saving to: " << ScoreSavePath << endl;

	cv::FileStorage fScore;
	fScore.open(ScoreSavePath, cv::FileStorage::WRITE);

	AllScoreVal.reserve(m_vScores.size());

	for( auto ClassName : RGN_TYPES )
	{
		vector<double> ClassScoreVal;

		for(const auto& val : m_vScores )
		{
			AllScoreVal.push_back( val.second );
			ClassScoreVal.push_back( val.second );
		}

		PrintAllVals(args, fScore, ClassName, ClassScoreVal);
	}

	fScore.release();


	PrintStats(args, AllScoreVal);

	return EXIT_SUCCESS;
}
开发者ID:hnkulkarni,项目名称:DetectCarriedObjs-PerfEval,代码行数:40,代码来源:GroundTruth.cpp


示例7: ReadDirToVectorOfUnits

void Fuzzer::RereadOutputCorpus() {
  if (Options.OutputCorpus.empty()) return;
  std::vector<Unit> AdditionalCorpus;
  ReadDirToVectorOfUnits(Options.OutputCorpus.c_str(), &AdditionalCorpus,
                         &EpochOfLastReadOfOutputCorpus);
  if (Corpus.empty()) {
    Corpus = AdditionalCorpus;
    return;
  }
  if (!Options.Reload) return;
  if (Options.Verbosity >= 2)
    Printf("Reload: read %zd new units.\n",  AdditionalCorpus.size());
  for (auto &X : AdditionalCorpus) {
    if (X.size() > (size_t)Options.MaxLen)
      X.resize(Options.MaxLen);
    if (UnitHashesAddedToCorpus.insert(Hash(X)).second) {
      CurrentUnit.clear();
      CurrentUnit.insert(CurrentUnit.begin(), X.begin(), X.end());
      if (RunOne(CurrentUnit)) {
        Corpus.push_back(X);
        if (Options.Verbosity >= 1)
          PrintStats("RELOAD");
      }
    }
  }
}
开发者ID:byronwwang,项目名称:llvm,代码行数:26,代码来源:FuzzerLoop.cpp


示例8: ReadDirToVectorOfUnits

void Fuzzer::RereadOutputCorpus(size_t MaxSize) {
  if (Options.OutputCorpus.empty())
    return;
  std::vector<Unit> AdditionalCorpus;
  ReadDirToVectorOfUnits(Options.OutputCorpus.c_str(), &AdditionalCorpus,
                         &EpochOfLastReadOfOutputCorpus, MaxSize);
  if (Corpus.empty()) {
    Corpus = AdditionalCorpus;
    return;
  }
  if (!Options.Reload)
    return;
  if (Options.Verbosity >= 2)
    Printf("Reload: read %zd new units.\n", AdditionalCorpus.size());
  for (auto &X : AdditionalCorpus) {
    if (X.size() > MaxSize)
      X.resize(MaxSize);
    if (UnitHashesAddedToCorpus.insert(Hash(X)).second) {
      if (RunOne(X)) {
        Corpus.push_back(X);
        UpdateCorpusDistribution();
        PrintStats("RELOAD");
      }
    }
  }
}
开发者ID:afesteves,项目名称:llvm,代码行数:26,代码来源:FuzzerLoop.cpp


示例9: ShuffleCorpus

// Finds minimal number of units in 'Extra' that add coverage to 'Initial'.
// We do it by actually executing the units, sometimes more than once,
// because we may be using different coverage-like signals and the only
// common thing between them is that we can say "this unit found new stuff".
UnitVector Fuzzer::FindExtraUnits(const UnitVector &Initial,
                                  const UnitVector &Extra) {
  UnitVector Res = Extra;
  size_t OldSize = Res.size();
  for (int Iter = 0; Iter < 10; Iter++) {
    ShuffleCorpus(&Res);
    ResetCoverage();

    for (auto &U : Initial)
      RunOne(U);

    Corpus.clear();
    for (auto &U : Res)
      if (RunOne(U))
        Corpus.push_back(U);

    char Stat[7] = "MIN   ";
    Stat[3] = '0' + Iter;
    PrintStats(Stat);

    size_t NewSize = Corpus.size();
    assert(NewSize <= OldSize);
    Res.swap(Corpus);

    if (NewSize + 5 >= OldSize)
      break;
    OldSize = NewSize;
  }
  return Res;
}
开发者ID:afesteves,项目名称:llvm,代码行数:34,代码来源:FuzzerLoop.cpp


示例10: PrintStats

///=====================================================
///
///=====================================================
SignpostMemoryManager::~SignpostMemoryManager() {
#ifndef NDEBUG
    m_criticalSection.Enter();
    delete m_allocationTracking;
    m_allocationTracking = nullptr;
    m_criticalSection.Exit();
#endif

    PrintStats();

    if (firstSignpost->m_next != nullptr) {
        __debugbreak();
    }
    if (firstSignpost->m_prev != nullptr) {
        __debugbreak();
    }
    if (firstSignpost->m_isFree != true) {
        __debugbreak();
    }
    if (firstSignpost->m_size != m_size - sizeof(Signpost)) {
        __debugbreak();
    }


    free(m_buffer);

    ConsolePrintf("\nSUCCESSFULLY SHUTDOWN MEMORY MANAGER\n\n");
}
开发者ID:asocha,项目名称:Engine,代码行数:31,代码来源:SignpostMemoryManager.cpp


示例11: LoopTransfer

static void LoopTransfer()
	{
	printf("* Loop Transfers -- reading & writing alternately.\n");

	T_0 = time(NULL);										// starting time

	while (dwRC == USBIO_ERR_SUCCESS)
		{
		static DWORD n = 0;

		// First we get the length (+ the packet size)
		GetLength();

		if (dwRC == USBIO_ERR_SUCCESS)
			{
			// Then we read 'Length' bytes
			ReadData();
			}

		if (dwRC == USBIO_ERR_SUCCESS)
			{
			// Now we send the received data back to the client.
			WriteData();
			}

		if (dwRC == USBIO_ERR_SUCCESS)
			{
			// Finally, sometimes we print some statistics
			if (TransferMode == ELoopDebug)
				PrintStatsEveryLoop();
			else if ((++n % KLoopModeDisplayUpdate) == 0)
				PrintStats();
			}
		}
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:35,代码来源:usbrflct.cpp


示例12: NET_Stats_f

static void NET_Stats_f (void)
{
	qsocket_t	*s;

	if (Cmd_Argc () == 1)
	{
		Con_Printf("unreliable messages sent   = %i\n", unreliableMessagesSent);
		Con_Printf("unreliable messages recv   = %i\n", unreliableMessagesReceived);
		Con_Printf("reliable messages sent     = %i\n", messagesSent);
		Con_Printf("reliable messages received = %i\n", messagesReceived);
		Con_Printf("packetsSent                = %i\n", packetsSent);
		Con_Printf("packetsReSent              = %i\n", packetsReSent);
		Con_Printf("packetsReceived            = %i\n", packetsReceived);
		Con_Printf("receivedDuplicateCount     = %i\n", receivedDuplicateCount);
		Con_Printf("shortPacketCount           = %i\n", shortPacketCount);
		Con_Printf("droppedDatagrams           = %i\n", droppedDatagrams);
	}
	else if (Q_strcmp(Cmd_Argv(1), "*") == 0)
	{
		for (s = net_activeSockets; s; s = s->next)
			PrintStats(s);
		for (s = net_freeSockets; s; s = s->next)
			PrintStats(s);
	}
	else
	{
		for (s = net_activeSockets; s; s = s->next)
		{
			if (q_strcasecmp(Cmd_Argv(1), s->address) == 0)
				break;
		}

		if (s == NULL)
		{
			for (s = net_freeSockets; s; s = s->next)
			{
				if (q_strcasecmp(Cmd_Argv(1), s->address) == 0)
					break;
			}
		}

		if (s == NULL)
			return;

		PrintStats(s);
	}
}
开发者ID:Novum,项目名称:vkQuake,代码行数:47,代码来源:net_dgrm.c


示例13: myAliveCheck

 MemPoolDebug::~MemPoolDebug()
 {
   myAliveCheck();
   if (myVerbosityLevel > 0) LogStream() << "[Log] MemPoolDebug(\"" << myName << "\"):   dtor commencing" << endl;
   if (myInUseCount != 0) DtorErrorMesg();
   if (myVerbosityLevel > 0) PrintStats();
   if (myVerbosityLevel > 0) LogStream() << "[Log] MemPoolDebug(\"" << myName << "\"):   dtor completed" << endl;
   myAliveOrDead = ~AliveMark;  // Useful telltale for debugging
 }
开发者ID:BrentBaccala,项目名称:CoCoA,代码行数:9,代码来源:MemPool.C


示例14: PrintStats

void Fuzzer::PrintStatusForNewUnit(const Unit &U) {
  if (!Options.PrintNEW)
    return;
  PrintStats("NEW   ", "");
  if (Options.Verbosity) {
    Printf(" L: %zd ", U.size());
    MD.PrintMutationSequence();
    Printf("\n");
  }
}
开发者ID:afesteves,项目名称:llvm,代码行数:10,代码来源:FuzzerLoop.cpp


示例15: TakeAShot

void TakeAShot(CS170::WarBoats::Ocean &ocean, const CS170::WarBoats::Point& pt)
{
  CS170::WarBoats::ShotResult sr;
  std::cout << "Shot: " << pt.x << ", " << pt.y << "  ";
  sr = CS170::WarBoats::TakeShot(ocean, pt);
  PrintShotResult(sr);
  PrintStats(GetShotStats(ocean));
  CS170::WarBoats::DumpOcean(ocean);
  std::cout << std::endl;
}
开发者ID:Gamerlios123,项目名称:Makefile_Project,代码行数:10,代码来源:driverbig_8x12_min_output.cpp


示例16: assert

// Experimental search heuristic: drilling.
// - Read, shuffle, execute and minimize the corpus.
// - Choose one random unit.
// - Reset the coverage.
// - Start fuzzing as if the chosen unit was the only element of the corpus.
// - When done, reset the coverage again.
// - Merge the newly created corpus into the original one.
void Fuzzer::Drill() {
  // The corpus is already read, shuffled, and minimized.
  assert(!Corpus.empty());
  Options.PrintNEW = false;  // Don't print NEW status lines when drilling.

  Unit U = ChooseUnitToMutate();

  CHECK_WEAK_API_FUNCTION(__sanitizer_reset_coverage);
  __sanitizer_reset_coverage();

  std::vector<Unit> SavedCorpus;
  SavedCorpus.swap(Corpus);
  Corpus.push_back(U);
  assert(Corpus.size() == 1);
  RunOne(U);
  PrintStats("DRILL ");
  std::string SavedOutputCorpusPath; // Don't write new units while drilling.
  SavedOutputCorpusPath.swap(Options.OutputCorpus);
  Loop();

  __sanitizer_reset_coverage();

  PrintStats("REINIT");
  SavedOutputCorpusPath.swap(Options.OutputCorpus);
  for (auto &U : SavedCorpus) {
    CurrentUnit = U;
    RunOne(U);
  }
  PrintStats("MERGE ");
  Options.PrintNEW = true;
  size_t NumMerged = 0;
  for (auto &U : Corpus) {
    CurrentUnit = U;
    if (RunOne(U)) {
      PrintStatusForNewUnit(U);
      NumMerged++;
      WriteToOutputCorpus(U);
    }
  }
  PrintStats("MERGED");
  if (NumMerged && Options.Verbosity)
    Printf("Drilling discovered %zd new units\n", NumMerged);
}
开发者ID:ATeamMac2014,项目名称:llvm,代码行数:50,代码来源:FuzzerLoop.cpp


示例17: Row_Sum

/*******************************************************************
 * Function Name: Print_ConfusionMat
 * Return Type 	: int
 * Created On	: Jul 8, 2013
 * Created By 	: hrushi
 * Comments		: Print the Confusion Matrix
 * Arguments	:
 *******************************************************************/
int GroundTruth::Print_ConfusionMat( const Args& args ) const
{
	cout << "Confusion Matrix is : "  <<  endl;
	cout << "     *****" << " Predicted " << "*****" << endl;
	for( UINT i = 0; i < GND_CATEGORIES; i++ )
	{
		cout << m_RowHeader.at(i) << "\t";


		UINT Row_Sum(0);

		for( UINT j = 0; j < GND_CATEGORIES; j++ )
		{
			cout << std::setw(4) << m_ConfusionMat[i][j] << " & ";

			Row_Sum += m_ConfusionMat[i][j];

			if( j == (GND_CATEGORIES - 1) )
			{
				cout << std::setw(4) << Row_Sum;
			}
		}

		cout << endl;
	}

	cout << endl;

	UINT TotalSum(0);

	cout << "Total \t";
	for( UINT j = 0; j < GND_CATEGORIES; j++ )
	{
		UINT Col_Sum(0);

		for( UINT i = 0; i < GND_CATEGORIES; i++ )
		{
			Col_Sum += m_ConfusionMat[i][j];
			TotalSum += m_ConfusionMat[i][j];
		}

		cout << std::setw(4) << Col_Sum << " & ";

		if( j == (GND_CATEGORIES - 1) )
		{
			cout << std::setw(4) << TotalSum;
		}
	}

	cout << endl;

	PrintStats( args );

	return EXIT_SUCCESS;
}
开发者ID:hnkulkarni,项目名称:DetectCarriedObjs-PerfEval,代码行数:63,代码来源:GroundTruth.cpp


示例18: ExecuteParalelCommand

void FeaturesStatistics::Compute()
{
	UInt32							tr,gr;
	
	ExecuteParalelCommand(THREAD_COMMAND_COMPUTE);	
	MEMSET(Feats.GetPtrToObject(0),0,sizeof(GML::ML::FeatureInformation)*con->GetFeatureCount());
	
	for (tr=0;tr<threadsCount;tr++)
	{		
		for (gr=0;gr<con->GetFeatureCount();gr++)
		{
			Feats[gr].countPozitive += ((FeaturesStatisticsThreadData *)ThData[tr].Context)->Feats[gr].countPozitive;
			Feats[gr].totalPozitive += ((FeaturesStatisticsThreadData *)ThData[tr].Context)->Feats[gr].totalPozitive;
			Feats[gr].countNegative += ((FeaturesStatisticsThreadData *)ThData[tr].Context)->Feats[gr].countNegative;
			Feats[gr].totalNegative += ((FeaturesStatisticsThreadData *)ThData[tr].Context)->Feats[gr].totalNegative;
		}
	}
	notif->Info("[%s] -> DataBase processed ok",ObjectName);
	for (tr=0;tr<con->GetFeatureCount();tr++)
	{
		ComputedData[tr].Index = tr;
		for (gr=0;gr<statFuncCount;gr++)
			ComputedData[tr].fnValue[gr] = GML::ML::FeatStatsFunctions::GetFunctionPointer(gr)(Feats.GetPtrToObject(tr)) * multiplyFactor;
		if (sortBy<0xFFFF)
			ComputedData[tr].compareValue = ComputedData[tr].fnValue[sortBy];
	}
	// am calculat si valorile
	// verific daca am vreun weight de salvat
	if (saveFeatureWeightFile<statFuncCount)
	{
		if (FeaturesWeightFile.Len()==0)
		{
			notif->Error("[%s] In order to save '%s' values for a feature you have to complete 'FeaturesWeightFile' property with the name of the file where the features will be saved",
					ObjectName,
					GML::ML::FeatStatsFunctions::GetFunctionName(saveFeatureWeightFile));
		} else {
			SaveFeatureWeightFile();
		}
	}
	// sortez
	if (sortBy!=0xFFFF)
	{
		notif->Info("[%s] -> Sorting data ... ",ObjectName);
		ComputedData.Sort(Compare_FeaturesInformations,sortDirection==0);
	}
	notif->Info("[%s] -> Saving result ... ",ObjectName);
	// printez
	if (notifyResults)
		PrintStats();
	// salvez
	if (ResultFile.Len()>0)
		SaveToFile();	
}
开发者ID:berendeanicolae,项目名称:gml,代码行数:53,代码来源:FeaturesStatistics.cpp


示例19: PrintStats

void Fuzzer::PrintStatusForNewUnit(const Unit &U) {
  if (!Options.PrintNEW)
    return;
  PrintStats("NEW   ", "");
  if (Options.Verbosity) {
    Printf(" L: %zd", U.size());
    if (U.size() < 30) {
      Printf(" ");
      PrintUnitInASCII(U, "\t");
      Print(U);
    }
    Printf("\n");
  }
}
开发者ID:byronwwang,项目名称:llvm,代码行数:14,代码来源:FuzzerLoop.cpp


示例20: StatDump

void StatDump(void)
{
    FILE *dumpfile;
    int i;

    //!
    // @category compat
    // @arg <filename>
    //
    // Dump statistics information to the specified file on the levels
    // that were played. The output from this option matches the output
    // from statdump.exe (see ctrlapi.zip in the /idgames archive).
    //

    i = M_CheckParmWithArgs("-statdump", 1);

    if (i > 0)
    {
        printf("Statistics captured for %i level(s)\n", num_captured_stats);

        // We actually know what the real gamemission is, but this has
        // to match the output from statdump.exe.

        DiscoverGamemode(captured_stats, num_captured_stats);

        // Allow "-" as output file, for stdout.

        if (strcmp(myargv[i + 1], "-") != 0)
        {
            dumpfile = fopen(myargv[i + 1], "w");
        }
        else
        {
            dumpfile = NULL;
        }

        for (i = 0; i < num_captured_stats; ++i)
        {
            PrintStats(dumpfile, &captured_stats[i]);
        }

        if (dumpfile != NULL)
        {
            fclose(dumpfile);
        }
    }
}
开发者ID:DooMJunkie,项目名称:wii-doom,代码行数:47,代码来源:statdump.c



注:本文中的PrintStats函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ PrintStatus函数代码示例发布时间:2022-05-30
下一篇:
C++ PrintOutput函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap