MCPcopy Create free account
hub / github.com/chrxh/alien / serializeStatisticsToFile

Method serializeStatisticsToFile

source/PersisterInterface/SerializerService.cpp:1111–1125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1109}
1110
1111bool SerializerService::serializeStatisticsToFile(std::filesystem::path const& filename, StatisticsHistoryData const& statistics)
1112{
1113 try {
1114 log(Priority::Important, "save statistics history to " + filename.string());
1115 std::ofstream stream(filename, std::ios::binary);
1116 if (!stream) {
1117 return false;
1118 }
1119 serializeStatistics(statistics, stream);
1120 stream.close();
1121 return true;
1122 } catch (...) {
1123 return false;
1124 }
1125}
1126
1127bool SerializerService::serializeContentToFile(std::filesystem::path const& filename, ClusteredDataDescription const& content)
1128{

Callers

nothing calls this directly

Calls 2

logFunction · 0.85
closeMethod · 0.80

Tested by

no test coverage detected