Skip to content

Commit d38ccbb

Browse files
addaleaxrvagg
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 553e34e commit d38ccbb

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
@@ -526,7 +526,8 @@ inline performance::performance_state* Environment::performance_state() {
526526
return performance_state_.get();
527527
}
528528

529-
inline std::map<std::string, uint64_t>* Environment::performance_marks() {
529+
inline std::unordered_map<std::string, uint64_t>*
530+
Environment::performance_marks() {
530531
return &performance_marks_;
531532
}
532533

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>
@@ -625,7 +624,7 @@ class Environment {
625624
inline AliasedBuffer<uint32_t, v8::Uint32Array>& scheduled_immediate_count();
626625

627626
inline performance::performance_state* performance_state();
628-
inline std::map<std::string, uint64_t>* performance_marks();
627+
inline std::unordered_map<std::string, uint64_t>* performance_marks();
629628

630629
inline void ThrowError(const char* errmsg);
631630
inline void ThrowTypeError(const char* errmsg);
@@ -731,7 +730,7 @@ class Environment {
731730
AliasedBuffer<uint32_t, v8::Uint32Array> scheduled_immediate_count_;
732731

733732
std::unique_ptr<performance::performance_state> performance_state_;
734-
std::map<std::string, uint64_t> performance_marks_;
733+
std::unordered_map<std::string, uint64_t> performance_marks_;
735734

736735
#if HAVE_INSPECTOR
737736
std::unique_ptr<inspector::Agent> inspector_agent_;

0 commit comments

Comments
 (0)