mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-18 16:16:23 +08:00
Benchmark: print nodes searched at the end of testing
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -134,6 +134,7 @@ void benchmark(const std::string& commandLine) {
|
|||||||
int startTime = get_system_time();
|
int startTime = get_system_time();
|
||||||
std::vector<std::string>::iterator it;
|
std::vector<std::string>::iterator it;
|
||||||
int cnt = 1;
|
int cnt = 1;
|
||||||
|
int64_t totalNodes = 0;
|
||||||
for (it = positions.begin(); it != positions.end(); ++it, ++cnt)
|
for (it = positions.begin(); it != positions.end(); ++it, ++cnt)
|
||||||
{
|
{
|
||||||
Move moves[1] = {MOVE_NONE};
|
Move moves[1] = {MOVE_NONE};
|
||||||
@@ -141,8 +142,10 @@ void benchmark(const std::string& commandLine) {
|
|||||||
Position pos(*it);
|
Position pos(*it);
|
||||||
std::cout << "\nProcessing position " << cnt << '/' << positions.size() << std::endl << std::endl;
|
std::cout << "\nProcessing position " << cnt << '/' << positions.size() << std::endl << std::endl;
|
||||||
think(pos, true, false, 0, dummy, dummy, 0, maxDepth, maxNodes, secsPerPos, moves);
|
think(pos, true, false, 0, dummy, dummy, 0, maxDepth, maxNodes, secsPerPos, moves);
|
||||||
|
totalNodes += nodes_searched();
|
||||||
}
|
}
|
||||||
std::cout << "\n\nBenchmarking finished. Processing time (ms) " << get_system_time() - startTime
|
std::cout << "\nProcessing time (ms) " << get_system_time() - startTime << std::endl
|
||||||
<< std::endl << "Press any key to exit\n";
|
<< "Nodes searched " << totalNodes << std::endl
|
||||||
|
<< "Press any key to exit" << std::endl;
|
||||||
std::cin >> fileName;
|
std::cin >> fileName;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user