Skip to content

The default size of AttributesHashMap::hash_map_ could be too large #3390

@ThomsonTan

Description

@ThomsonTan

The current AttributesHashMap::hash_map_ has unspecified bucket count which makes it implementation defined. The implementation may starts with some large value like 13 on GCC which wastes memory for scenario where only a few attributes are used. For such scenario, it will be helpful to start with explicit small number of buckets.

std::unordered_map<MetricAttributes, std::unique_ptr<Aggregation>, CustomHash> hash_map_;

Metadata

Metadata

Assignees

No one assigned

    Labels

    StalebugSomething isn't workingtriage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions