MCPcopy Create free account
hub / github.com/dhbloo/rapfi / libToDatabase

Function libToDatabase

Rapfi/command/gomocup.cpp:519–535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

517}
518
519void libToDatabase()
520{
521 auto libPath = readPathFromInput();
522 if (Search::Threads.dbStorage()) {
523 MESSAGEL("Importing from lib file " << pathToConsoleString(libPath)
524 << ", this might take a while...");
525 auto startTime = now();
526 std::ifstream libStream(libPath, std::ios::binary);
527 size_t writeCount = ::Database::importLibToDatabase(*Search::Threads.dbStorage(),
528 libStream,
529 options.rule,
530 board ? board->size() : 15);
531 auto endTime = now();
532 MESSAGEL("Imported " << writeCount << " records from lib file using "
533 << (endTime - startTime) << " ms.");
534 }
535}
536
537void restart()
538{

Callers 1

runProtocolFunction · 0.85

Calls 6

readPathFromInputFunction · 0.85
pathToConsoleStringFunction · 0.85
nowFunction · 0.85
importLibToDatabaseFunction · 0.85
dbStorageMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected