| #include "async_resp.hpp" | |
| #include "logging.hpp" | |
| #include "request_stats.hpp" | |
| #include "managed_store_clock.hpp" | |
| namespace bmcweb { | |
| AsyncResp::~AsyncResp() { | |
| BMCWEB_LOG_DEBUG << "=> ~AsyncResp: done: jsonValue: " << res.jsonValue; | |
| res.end(); | |
| if (managedStore::RequestStatsStore::isEnabled() && | |
| this->requestStatsContext) { | |
| const bool is_ok = | |
| this->res.result() >= boost::beast::http::status::ok && | |
| res.result() < boost::beast::http::status::multiple_choices; | |
| this->requestStatsContext->setOK(is_ok); | |
| managedStore::RequestStatsStore::instance().logRequestStats( | |
| managedStore::clockNow(), *requestStatsContext); | |
| } | |
| if (managedStore::RequestStatsStore::isRdeRateLimitEnabled() && | |
| this->requestStatsContext) { | |
| managedStore::RequestStatsStore::instance().logRdeRequestStats( | |
| *requestStatsContext); | |
| } | |
| } | |
| }; // namespace bmcweb |