Skip to content

Commit c46e36b

Browse files
addaleaxBridgeAR
authored andcommitted
src: use unordered_map for perf marks
PR-URL: #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>
1 parent d111d7b commit c46e36b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/env-inl.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,8 @@ inline performance::performance_state* Environment::performance_state() {
531531
return performance_state_.get();
532532
}
533533

534-
inline std::map<std::string, uint64_t>* Environment::performance_marks() {
534+
inline std::unordered_map<std::string, uint64_t>*
535+
Environment::performance_marks() {
535536
return &performance_marks_;
536537
}
537538

src/env.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
#include "node_http2_state.h"
3939

4040
#include <list>
41-
#include <map>
4241
#include <stdint.h>
4342
#include <vector>
4443
#include <unordered_map>
@@ -646,7 +645,7 @@ class Environment {
646645
file_handle_read_wrap_freelist();
647646

648647
inline performance::performance_state* performance_state();
649-
inline std::map<std::string, uint64_t>* performance_marks();
648+
inline std::unordered_map<std::string, uint64_t>* performance_marks();
650649

651650
void CollectExceptionInfo(v8::Local<v8::Value> context,
652651
int errorno,
@@ -795,7 +794,7 @@ class Environment {
795794
int should_not_abort_scope_counter_ = 0;
796795

797796
std::unique_ptr<performance::performance_state> performance_state_;
798-
std::map<std::string, uint64_t> performance_marks_;
797+
std::unordered_map<std::string, uint64_t> performance_marks_;
799798

800799
#if HAVE_INSPECTOR
801800
std::unique_ptr<inspector::Agent> inspector_agent_;

0 commit comments

Comments
 (0)