mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-23 00:02:37 +00:00
tracing::session_record: store "parameters" data in an std::map instead of in an unordered_map
Avoid sorting (and creating a new one) container at a backend code when a sorted container is needed. The overhead for the backends where it's not needed is minimal since the size of the map is very small. Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
This commit is contained in:
@@ -151,7 +151,10 @@ struct event_record {
|
||||
|
||||
struct session_record {
|
||||
gms::inet_address client;
|
||||
std::unordered_map<sstring, sstring> parameters;
|
||||
// Keep the container below sorted since some backends require that and it's
|
||||
// very cheap to always do that because the amount of elements in a
|
||||
// container is very small.
|
||||
std::map<sstring, sstring> parameters;
|
||||
sstring request;
|
||||
std::chrono::system_clock::time_point started_at;
|
||||
trace_type command = trace_type::NONE;
|
||||
|
||||
Reference in New Issue
Block a user