Krzysztof Grobelny | 64b75a5 | 2020-09-18 10:17:16 +0200 | [diff] [blame] | 1 | #include "report_manager.hpp" |
| 2 | |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 3 | #include "report.hpp" |
Krzysztof Grobelny | dcc4e19 | 2021-03-08 09:09:34 +0000 | [diff] [blame] | 4 | #include "types/report_types.hpp" |
Krzysztof Grobelny | e8fc575 | 2021-02-05 14:30:45 +0000 | [diff] [blame] | 5 | #include "utils/conversion.hpp" |
Szymon Dompke | 32305f1 | 2022-07-05 15:37:21 +0200 | [diff] [blame] | 6 | #include "utils/dbus_path_utils.hpp" |
| 7 | #include "utils/make_id_name.hpp" |
Krzysztof Grobelny | d223819 | 2020-12-02 09:27:28 +0000 | [diff] [blame] | 8 | #include "utils/transform.hpp" |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 9 | |
| 10 | #include <phosphor-logging/log.hpp> |
Wludzik, Jozef | cb88cfd | 2020-09-28 16:38:57 +0200 | [diff] [blame] | 11 | #include <sdbusplus/exception.hpp> |
Krzysztof Grobelny | a8182be | 2022-07-04 11:26:20 +0200 | [diff] [blame] | 12 | #include <sdbusplus/unpack_properties.hpp> |
Wludzik, Jozef | cb88cfd | 2020-09-28 16:38:57 +0200 | [diff] [blame] | 13 | |
Krzysztof Grobelny | a8182be | 2022-07-04 11:26:20 +0200 | [diff] [blame] | 14 | #include <optional> |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 15 | #include <stdexcept> |
Krzysztof Grobelny | 64b75a5 | 2020-09-18 10:17:16 +0200 | [diff] [blame] | 16 | #include <system_error> |
| 17 | |
Krzysztof Grobelny | 64b75a5 | 2020-09-18 10:17:16 +0200 | [diff] [blame] | 18 | ReportManager::ReportManager( |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 19 | std::unique_ptr<interfaces::ReportFactory> reportFactoryIn, |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 20 | std::unique_ptr<interfaces::JsonStorage> reportStorageIn, |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 21 | const std::shared_ptr<sdbusplus::asio::object_server>& objServerIn) : |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 22 | reportFactory(std::move(reportFactoryIn)), |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 23 | reportStorage(std::move(reportStorageIn)), objServer(objServerIn) |
Krzysztof Grobelny | 64b75a5 | 2020-09-18 10:17:16 +0200 | [diff] [blame] | 24 | { |
Wludzik, Jozef | cb88cfd | 2020-09-28 16:38:57 +0200 | [diff] [blame] | 25 | reports.reserve(maxReports); |
Krzysztof Grobelny | 6ccfcbf | 2020-11-04 09:31:36 +0100 | [diff] [blame] | 26 | |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 27 | loadFromPersistent(); |
Krzysztof Grobelny | 64b75a5 | 2020-09-18 10:17:16 +0200 | [diff] [blame] | 28 | |
Wludzik, Jozef | cb88cfd | 2020-09-28 16:38:57 +0200 | [diff] [blame] | 29 | reportManagerIface = objServer->add_unique_interface( |
Patrick Williams | 3a1c297 | 2023-05-10 07:51:04 -0500 | [diff] [blame] | 30 | reportManagerPath, reportManagerIfaceName, |
| 31 | [this](auto& dbusIface) { |
| 32 | dbusIface.register_property_r("MaxReports", size_t{}, |
| 33 | sdbusplus::vtable::property_::const_, |
| 34 | [](const auto&) { return maxReports; }); |
| 35 | dbusIface.register_property_r( |
| 36 | "MinInterval", uint64_t{}, sdbusplus::vtable::property_::const_, |
| 37 | [](const auto&) -> uint64_t { return minInterval.count(); }); |
| 38 | dbusIface.register_property_r( |
| 39 | "SupportedOperationTypes", std::vector<std::string>{}, |
| 40 | sdbusplus::vtable::property_::const_, |
| 41 | [](const auto&) -> std::vector<std::string> { |
| 42 | return utils::transform<std::vector>( |
| 43 | utils::convDataOperationType, |
| 44 | [](const auto& item) { return std::string(item.first); }); |
| 45 | }); |
Patrick Williams | 3a1c297 | 2023-05-10 07:51:04 -0500 | [diff] [blame] | 46 | dbusIface.register_method( |
| 47 | "AddReport", |
Krzysztof Grobelny | cff70c1 | 2022-10-27 07:16:08 +0000 | [diff] [blame^] | 48 | [this](boost::asio::yield_context& yield, std::string reportId, |
| 49 | std::string reportName, std::string reportingType, |
| 50 | std::string reportUpdates, uint64_t appendLimit, |
| 51 | std::vector<std::string> reportActions, uint64_t interval, |
| 52 | ReadingParameters readingParameters, bool enabled) { |
| 53 | if (reportingType.empty()) |
Patrick Williams | 3a1c297 | 2023-05-10 07:51:04 -0500 | [diff] [blame] | 54 | { |
Krzysztof Grobelny | cff70c1 | 2022-10-27 07:16:08 +0000 | [diff] [blame^] | 55 | reportingType = utils::enumToString(ReportingType::onRequest); |
Patrick Williams | 3a1c297 | 2023-05-10 07:51:04 -0500 | [diff] [blame] | 56 | } |
Krzysztof Grobelny | 51497a0 | 2021-11-09 14:56:22 +0100 | [diff] [blame] | 57 | |
Krzysztof Grobelny | cff70c1 | 2022-10-27 07:16:08 +0000 | [diff] [blame^] | 58 | if (reportUpdates.empty()) |
Patrick Williams | 3a1c297 | 2023-05-10 07:51:04 -0500 | [diff] [blame] | 59 | { |
Krzysztof Grobelny | cff70c1 | 2022-10-27 07:16:08 +0000 | [diff] [blame^] | 60 | reportUpdates = utils::enumToString(ReportUpdates::overwrite); |
Patrick Williams | 3a1c297 | 2023-05-10 07:51:04 -0500 | [diff] [blame] | 61 | } |
Krzysztof Grobelny | 62c08e9 | 2022-09-16 10:28:53 +0200 | [diff] [blame] | 62 | |
Krzysztof Grobelny | cff70c1 | 2022-10-27 07:16:08 +0000 | [diff] [blame^] | 63 | if (appendLimit == std::numeric_limits<uint64_t>::max()) |
Patrick Williams | 3a1c297 | 2023-05-10 07:51:04 -0500 | [diff] [blame] | 64 | { |
Krzysztof Grobelny | cff70c1 | 2022-10-27 07:16:08 +0000 | [diff] [blame^] | 65 | appendLimit = maxAppendLimit; |
Patrick Williams | 3a1c297 | 2023-05-10 07:51:04 -0500 | [diff] [blame] | 66 | } |
Krzysztof Grobelny | a8182be | 2022-07-04 11:26:20 +0200 | [diff] [blame] | 67 | |
Krzysztof Grobelny | cff70c1 | 2022-10-27 07:16:08 +0000 | [diff] [blame^] | 68 | if (interval == std::numeric_limits<uint64_t>::max()) |
| 69 | { |
| 70 | interval = 0; |
| 71 | } |
| 72 | |
| 73 | return addReport(yield, reportId, reportName, |
| 74 | utils::toReportingType(reportingType), |
| 75 | utils::transform( |
| 76 | reportActions, |
| 77 | [](const auto& reportAction) { |
Patrick Williams | 3a1c297 | 2023-05-10 07:51:04 -0500 | [diff] [blame] | 78 | return utils::toReportAction(reportAction); |
Krzysztof Grobelny | cff70c1 | 2022-10-27 07:16:08 +0000 | [diff] [blame^] | 79 | }), |
| 80 | Milliseconds(interval), appendLimit, |
| 81 | utils::toReportUpdates(reportUpdates), |
| 82 | readingParameters, enabled) |
Patrick Williams | 3a1c297 | 2023-05-10 07:51:04 -0500 | [diff] [blame] | 83 | .getPath(); |
| 84 | }); |
Wludzik, Jozef | cb88cfd | 2020-09-28 16:38:57 +0200 | [diff] [blame] | 85 | }); |
Krzysztof Grobelny | 64b75a5 | 2020-09-18 10:17:16 +0200 | [diff] [blame] | 86 | } |
| 87 | |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 88 | void ReportManager::removeReport(const interfaces::Report* report) |
Krzysztof Grobelny | 64b75a5 | 2020-09-18 10:17:16 +0200 | [diff] [blame] | 89 | { |
Wludzik, Jozef | cb88cfd | 2020-09-28 16:38:57 +0200 | [diff] [blame] | 90 | reports.erase( |
| 91 | std::remove_if(reports.begin(), reports.end(), |
| 92 | [report](const auto& x) { return report == x.get(); }), |
| 93 | reports.end()); |
Krzysztof Grobelny | 64b75a5 | 2020-09-18 10:17:16 +0200 | [diff] [blame] | 94 | } |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 95 | |
Krzysztof Grobelny | dcc4e19 | 2021-03-08 09:09:34 +0000 | [diff] [blame] | 96 | void ReportManager::verifyAddReport( |
Krzysztof Grobelny | b8cc78d | 2021-11-29 15:54:53 +0100 | [diff] [blame] | 97 | const std::string& reportId, const std::string& reportName, |
| 98 | const ReportingType reportingType, Milliseconds interval, |
Ankita Vilas Gawade | cd5b0b7 | 2022-01-20 20:55:04 +0000 | [diff] [blame] | 99 | const ReportUpdates reportUpdates, const uint64_t appendLimit, |
Krzysztof Grobelny | dcc4e19 | 2021-03-08 09:09:34 +0000 | [diff] [blame] | 100 | const std::vector<LabeledMetricParameters>& readingParams) |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 101 | { |
Szymon Dompke | 32305f1 | 2022-07-05 15:37:21 +0200 | [diff] [blame] | 102 | namespace ts = utils::tstring; |
| 103 | |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 104 | if (reports.size() >= maxReports) |
| 105 | { |
| 106 | throw sdbusplus::exception::SdBusError( |
| 107 | static_cast<int>(std::errc::too_many_files_open), |
| 108 | "Reached maximal report count"); |
| 109 | } |
| 110 | |
Krzysztof Grobelny | e6c417c | 2022-02-02 17:25:53 +0100 | [diff] [blame] | 111 | if (appendLimit > maxAppendLimit && |
| 112 | appendLimit != std::numeric_limits<uint64_t>::max()) |
Ankita Vilas Gawade | cd5b0b7 | 2022-01-20 20:55:04 +0000 | [diff] [blame] | 113 | { |
Krzysztof Grobelny | 62c08e9 | 2022-09-16 10:28:53 +0200 | [diff] [blame] | 114 | throw errors::InvalidArgument("AppendLimit", "Out of range."); |
Ankita Vilas Gawade | cd5b0b7 | 2022-01-20 20:55:04 +0000 | [diff] [blame] | 115 | } |
| 116 | |
Krzysztof Grobelny | 973b4bb | 2022-04-25 17:07:27 +0200 | [diff] [blame] | 117 | if ((reportingType == ReportingType::periodic && interval < minInterval) || |
| 118 | (reportingType != ReportingType::periodic && |
| 119 | interval != Milliseconds{0})) |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 120 | { |
Krzysztof Grobelny | 62c08e9 | 2022-09-16 10:28:53 +0200 | [diff] [blame] | 121 | throw errors::InvalidArgument("Interval"); |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 122 | } |
Wludzik, Jozef | bc766b4 | 2020-12-08 16:06:22 +0100 | [diff] [blame] | 123 | |
Ankita Vilas Gawade | cd5b0b7 | 2022-01-20 20:55:04 +0000 | [diff] [blame] | 124 | size_t metricCount = 0; |
| 125 | for (auto metricParam : readingParams) |
| 126 | { |
| 127 | auto metricParamsVec = |
| 128 | metricParam.at_label<utils::tstring::SensorPath>(); |
| 129 | metricCount += metricParamsVec.size(); |
| 130 | } |
Krzysztof Grobelny | e8fc575 | 2021-02-05 14:30:45 +0000 | [diff] [blame] | 131 | |
Ankita Vilas Gawade | cd5b0b7 | 2022-01-20 20:55:04 +0000 | [diff] [blame] | 132 | if (readingParams.size() > maxNumberMetrics || |
| 133 | metricCount > maxNumberMetrics) |
Wludzik, Jozef | bc766b4 | 2020-12-08 16:06:22 +0100 | [diff] [blame] | 134 | { |
Krzysztof Grobelny | 62c08e9 | 2022-09-16 10:28:53 +0200 | [diff] [blame] | 135 | throw errors::InvalidArgument("MetricParams", "Too many."); |
Wludzik, Jozef | bc766b4 | 2020-12-08 16:06:22 +0100 | [diff] [blame] | 136 | } |
Krzysztof Grobelny | e8fc575 | 2021-02-05 14:30:45 +0000 | [diff] [blame] | 137 | |
Krzysztof Grobelny | 62c08e9 | 2022-09-16 10:28:53 +0200 | [diff] [blame] | 138 | for (const LabeledMetricParameters& item : readingParams) |
Krzysztof Grobelny | e8fc575 | 2021-02-05 14:30:45 +0000 | [diff] [blame] | 139 | { |
Krzysztof Grobelny | 62c08e9 | 2022-09-16 10:28:53 +0200 | [diff] [blame] | 140 | utils::toOperationType( |
| 141 | utils::toUnderlying(item.at_label<ts::OperationType>())); |
Krzysztof Grobelny | e8fc575 | 2021-02-05 14:30:45 +0000 | [diff] [blame] | 142 | } |
Krzysztof Grobelny | d223819 | 2020-12-02 09:27:28 +0000 | [diff] [blame] | 143 | } |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 144 | |
Krzysztof Grobelny | d223819 | 2020-12-02 09:27:28 +0000 | [diff] [blame] | 145 | interfaces::Report& ReportManager::addReport( |
Krzysztof Grobelny | b8cc78d | 2021-11-29 15:54:53 +0100 | [diff] [blame] | 146 | boost::asio::yield_context& yield, const std::string& reportId, |
| 147 | const std::string& reportName, const ReportingType reportingType, |
Krzysztof Grobelny | 51497a0 | 2021-11-09 14:56:22 +0100 | [diff] [blame] | 148 | const std::vector<ReportAction>& reportActions, Milliseconds interval, |
| 149 | const uint64_t appendLimit, const ReportUpdates reportUpdates, |
Lukasz Kazmierczak | 7e098e9 | 2021-09-16 15:59:56 +0200 | [diff] [blame] | 150 | ReadingParameters metricParams, const bool enabled) |
Krzysztof Grobelny | d223819 | 2020-12-02 09:27:28 +0000 | [diff] [blame] | 151 | { |
Patrick Williams | 3a1c297 | 2023-05-10 07:51:04 -0500 | [diff] [blame] | 152 | auto labeledMetricParams = reportFactory->convertMetricParams(yield, |
| 153 | metricParams); |
Krzysztof Grobelny | d223819 | 2020-12-02 09:27:28 +0000 | [diff] [blame] | 154 | |
Krzysztof Grobelny | b8cc78d | 2021-11-29 15:54:53 +0100 | [diff] [blame] | 155 | return addReport(reportId, reportName, reportingType, reportActions, |
| 156 | interval, appendLimit, reportUpdates, |
Krzysztof Grobelny | 493e62e | 2022-02-14 10:55:50 +0100 | [diff] [blame] | 157 | std::move(labeledMetricParams), enabled, Readings{}); |
Krzysztof Grobelny | d223819 | 2020-12-02 09:27:28 +0000 | [diff] [blame] | 158 | } |
| 159 | |
| 160 | interfaces::Report& ReportManager::addReport( |
Krzysztof Grobelny | b8cc78d | 2021-11-29 15:54:53 +0100 | [diff] [blame] | 161 | const std::string& reportId, const std::string& reportName, |
| 162 | const ReportingType reportingType, |
Krzysztof Grobelny | 51497a0 | 2021-11-09 14:56:22 +0100 | [diff] [blame] | 163 | const std::vector<ReportAction>& reportActions, Milliseconds interval, |
| 164 | const uint64_t appendLimit, const ReportUpdates reportUpdates, |
Lukasz Kazmierczak | 7e098e9 | 2021-09-16 15:59:56 +0200 | [diff] [blame] | 165 | std::vector<LabeledMetricParameters> labeledMetricParams, |
Krzysztof Grobelny | 493e62e | 2022-02-14 10:55:50 +0100 | [diff] [blame] | 166 | const bool enabled, Readings readings) |
Krzysztof Grobelny | d223819 | 2020-12-02 09:27:28 +0000 | [diff] [blame] | 167 | { |
Krzysztof Grobelny | b8cc78d | 2021-11-29 15:54:53 +0100 | [diff] [blame] | 168 | const auto existingReportIds = utils::transform( |
| 169 | reports, [](const auto& report) { return report->getId(); }); |
| 170 | |
Szymon Dompke | 32305f1 | 2022-07-05 15:37:21 +0200 | [diff] [blame] | 171 | auto [id, name] = utils::makeIdName(reportId, reportName, reportNameDefault, |
| 172 | existingReportIds); |
Krzysztof Grobelny | b8cc78d | 2021-11-29 15:54:53 +0100 | [diff] [blame] | 173 | |
| 174 | verifyAddReport(id, name, reportingType, interval, reportUpdates, |
Ankita Vilas Gawade | cd5b0b7 | 2022-01-20 20:55:04 +0000 | [diff] [blame] | 175 | appendLimit, labeledMetricParams); |
Krzysztof Grobelny | d223819 | 2020-12-02 09:27:28 +0000 | [diff] [blame] | 176 | |
Krzysztof Grobelny | 493e62e | 2022-02-14 10:55:50 +0100 | [diff] [blame] | 177 | reports.emplace_back( |
| 178 | reportFactory->make(id, name, reportingType, reportActions, interval, |
| 179 | appendLimit, reportUpdates, *this, *reportStorage, |
| 180 | labeledMetricParams, enabled, std::move(readings))); |
Krzysztof Grobelny | d223819 | 2020-12-02 09:27:28 +0000 | [diff] [blame] | 181 | return *reports.back(); |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 182 | } |
| 183 | |
| 184 | void ReportManager::loadFromPersistent() |
| 185 | { |
| 186 | std::vector<interfaces::JsonStorage::FilePath> paths = |
| 187 | reportStorage->list(); |
| 188 | |
| 189 | for (const auto& path : paths) |
| 190 | { |
| 191 | std::optional<nlohmann::json> data = reportStorage->load(path); |
| 192 | try |
| 193 | { |
| 194 | size_t version = data->at("Version").get<size_t>(); |
| 195 | if (version != Report::reportVersion) |
| 196 | { |
| 197 | throw std::logic_error("Invalid version"); |
| 198 | } |
Krzysztof Grobelny | b8cc78d | 2021-11-29 15:54:53 +0100 | [diff] [blame] | 199 | bool enabled = data->at("Enabled").get<bool>(); |
| 200 | std::string& id = data->at("Id").get_ref<std::string&>(); |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 201 | std::string& name = data->at("Name").get_ref<std::string&>(); |
Krzysztof Grobelny | 51497a0 | 2021-11-09 14:56:22 +0100 | [diff] [blame] | 202 | |
| 203 | uint32_t reportingType = data->at("ReportingType").get<uint32_t>(); |
| 204 | std::vector<ReportAction> reportActions = utils::transform( |
| 205 | data->at("ReportActions").get<std::vector<uint32_t>>(), |
| 206 | [](const auto reportAction) { |
Patrick Williams | 3a1c297 | 2023-05-10 07:51:04 -0500 | [diff] [blame] | 207 | return utils::toReportAction(reportAction); |
Krzysztof Grobelny | 51497a0 | 2021-11-09 14:56:22 +0100 | [diff] [blame] | 208 | }); |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 209 | uint64_t interval = data->at("Interval").get<uint64_t>(); |
Szymon Dompke | 3eb5686 | 2021-09-20 15:32:04 +0200 | [diff] [blame] | 210 | uint64_t appendLimit = data->at("AppendLimit").get<uint64_t>(); |
Krzysztof Grobelny | 51497a0 | 2021-11-09 14:56:22 +0100 | [diff] [blame] | 211 | uint32_t reportUpdates = data->at("ReportUpdates").get<uint32_t>(); |
Krzysztof Grobelny | d223819 | 2020-12-02 09:27:28 +0000 | [diff] [blame] | 212 | auto readingParameters = |
| 213 | data->at("ReadingParameters") |
| 214 | .get<std::vector<LabeledMetricParameters>>(); |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 215 | |
Krzysztof Grobelny | 493e62e | 2022-02-14 10:55:50 +0100 | [diff] [blame] | 216 | Readings readings = {}; |
| 217 | |
| 218 | if (auto it = data->find("MetricValues"); it != data->end()) |
| 219 | { |
| 220 | const auto labeledReadings = it->get<LabeledReadings>(); |
| 221 | readings = utils::toReadings(labeledReadings); |
| 222 | } |
| 223 | |
Krzysztof Grobelny | b8cc78d | 2021-11-29 15:54:53 +0100 | [diff] [blame] | 224 | addReport(id, name, utils::toReportingType(reportingType), |
Krzysztof Grobelny | 51497a0 | 2021-11-09 14:56:22 +0100 | [diff] [blame] | 225 | reportActions, Milliseconds(interval), appendLimit, |
| 226 | utils::toReportUpdates(reportUpdates), |
Krzysztof Grobelny | 493e62e | 2022-02-14 10:55:50 +0100 | [diff] [blame] | 227 | std::move(readingParameters), enabled, |
| 228 | std::move(readings)); |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 229 | } |
| 230 | catch (const std::exception& e) |
| 231 | { |
| 232 | phosphor::logging::log<phosphor::logging::level::ERR>( |
| 233 | "Failed to load report from storage", |
| 234 | phosphor::logging::entry( |
Wludzik, Jozef | 982c5b5 | 2021-01-02 12:05:21 +0100 | [diff] [blame] | 235 | "FILENAME=%s", |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 236 | static_cast<std::filesystem::path>(path).c_str()), |
Wludzik, Jozef | 982c5b5 | 2021-01-02 12:05:21 +0100 | [diff] [blame] | 237 | phosphor::logging::entry("EXCEPTION_MSG=%s", e.what())); |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 238 | reportStorage->remove(path); |
| 239 | } |
| 240 | } |
| 241 | } |