MCPcopy Create free account
hub / github.com/argotorg/solidity / printRoundSummary

Method printRoundSummary

tools/yulPhaser/AlgorithmRunner.cpp:52–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52void AlgorithmRunner::printRoundSummary(
53 size_t _round,
54 clock_t _roundTimeStart,
55 clock_t _totalTimeStart
56) const
57{
58 clock_t now = clock();
59 double roundTime = static_cast<double>(now - _roundTimeStart) / CLOCKS_PER_SEC;
60 double totalTime = static_cast<double>(now - _totalTimeStart) / CLOCKS_PER_SEC;
61
62 if (!m_options.showOnlyTopChromosome)
63 {
64 if (m_options.showRoundInfo)
65 {
66 m_outputStream << "---------- ROUND " << _round + 1;
67 m_outputStream << " [round: " << std::fixed << std::setprecision(1) << roundTime << " s,";
68 m_outputStream << " total: " << std::fixed << std::setprecision(1) << totalTime << " s]";
69 m_outputStream << " ----------" << std::endl;
70 }
71 else if (m_population.individuals().size() > 0)
72 m_outputStream << std::endl;
73
74 m_outputStream << m_population;
75 }
76 else if (m_population.individuals().size() > 0)
77 {
78 if (m_options.showRoundInfo)
79 {
80 m_outputStream << std::setw(5) << _round + 1 << " | ";
81 m_outputStream << std::setw(5) << std::fixed << std::setprecision(1) << totalTime << " | ";
82 }
83
84 m_outputStream << m_population.individuals()[0] << std::endl;
85 }
86}
87
88void AlgorithmRunner::printInitialPopulation() const
89{

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected