src: use unordered_map for perf marks

PR-URL: https://github.com/nodejs/node/pull/19558
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Anna Henningsen 2018-03-23 15:53:54 +01:00 committed by Ruben Bridgewater
parent d111d7b91c
commit c46e36b073
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762
2 changed files with 4 additions and 4 deletions

View File

@ -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_;
}

View File

@ -38,7 +38,6 @@
#include "node_http2_state.h"
#include <list>
#include <map>
#include <stdint.h>
#include <vector>
#include <unordered_map>
@ -646,7 +645,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,
@ -795,7 +794,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_;