| 1109 | } |
| 1110 | |
| 1111 | bool 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 | |
| 1127 | bool SerializerService::serializeContentToFile(std::filesystem::path const& filename, ClusteredDataDescription const& content) |
| 1128 | { |