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