Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: use unordered_map for perf marks #19558

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/env-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,8 @@ inline performance::performance_state* Environment::performance_state() {
return performance_state_.get();
}

inline std::map<std::string, uint64_t>* Environment::performance_marks() {
inline std::unordered_map<std::string, uint64_t>*
Environment::performance_marks() {
return &performance_marks_;
}

Expand Down
5 changes: 2 additions & 3 deletions src/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include "node_http2_state.h"

#include <list>
#include <map>
#include <stdint.h>
#include <vector>
#include <unordered_map>
Expand Down Expand Up @@ -647,7 +646,7 @@ class Environment {
file_handle_read_wrap_freelist();

inline performance::performance_state* performance_state();
inline std::map<std::string, uint64_t>* performance_marks();
inline std::unordered_map<std::string, uint64_t>* performance_marks();

void CollectExceptionInfo(v8::Local<v8::Value> context,
int errorno,
Expand Down Expand Up @@ -796,7 +795,7 @@ class Environment {
int should_not_abort_scope_counter_ = 0;

std::unique_ptr<performance::performance_state> performance_state_;
std::map<std::string, uint64_t> performance_marks_;
std::unordered_map<std::string, uint64_t> performance_marks_;

#if HAVE_INSPECTOR
std::unique_ptr<inspector::Agent> inspector_agent_;
Expand Down