Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed Nov 16, 2023
1 parent e9fb9e2 commit 0f17cbe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/http/pprof_http_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,12 +364,11 @@ void pprof_http_service::heap_handler(const http_request &req, http_response &re
}
auto cleanup = dsn::defer([this]() { _in_pprof_action.store(false); });

// If kSecondParam is specified with a valid value, we'll use heap profiling,
// If "seconds" parameter is specified with a valid value, use heap profiling,
// otherwise, use heap sampling.
bool use_heap_profile = false;
const std::string kSecondParam = "seconds";
uint32_t seconds = 0;
const auto &iter = req.query_args.find(kSecondParam);
const auto &iter = req.query_args.find("seconds");
if (iter != req.query_args.end() && buf2uint32(iter->second, seconds)) {
// This is true between calls to HeapProfilerStart() and HeapProfilerStop(), and
// also if the program has been run with HEAPPROFILER, or some other
Expand Down

0 comments on commit 0f17cbe

Please sign in to comment.