Skip to content

Commit 780a5d6

Browse files
addaleaxtargos
authored andcommitted
src: use unordered_map for perf marks
PR-URL: #19558 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent e533911 commit 780a5d6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/env-inl.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,8 @@ inline performance::performance_state* Environment::performance_state() {
566566
return performance_state_.get();
567567
}
568568

569-
inline std::map<std::string, uint64_t>* Environment::performance_marks() {
569+
inline std::unordered_map<std::string, uint64_t>*
570+
Environment::performance_marks() {
570571
return &performance_marks_;
571572
}
572573

src/env.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
#include "node_http2_state.h"
4040

4141
#include <list>
42-
#include <map>
4342
#include <stdint.h>
4443
#include <vector>
4544
#include <unordered_map>
@@ -642,7 +641,7 @@ class Environment {
642641
inline void set_fs_stats_field_array(double* fields);
643642

644643
inline performance::performance_state* performance_state();
645-
inline std::map<std::string, uint64_t>* performance_marks();
644+
inline std::unordered_map<std::string, uint64_t>* performance_marks();
646645

647646
inline void ThrowError(const char* errmsg);
648647
inline void ThrowTypeError(const char* errmsg);
@@ -774,7 +773,7 @@ class Environment {
774773
int should_not_abort_scope_counter_ = 0;
775774

776775
std::unique_ptr<performance::performance_state> performance_state_;
777-
std::map<std::string, uint64_t> performance_marks_;
776+
std::unordered_map<std::string, uint64_t> performance_marks_;
778777

779778
#if HAVE_INSPECTOR
780779
std::unique_ptr<inspector::Agent> inspector_agent_;

0 commit comments

Comments
 (0)