Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Shared/Buffers.MemoryPool/PinnedBlockMemoryPoolMetrics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ public PinnedBlockMemoryPoolMetrics(IMeterFactory meterFactory)

_currentMemory = _meter.CreateUpDownCounter<long>(
"aspnetcore.memorypool.current_memory",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the name be aspnetcore.memory_pool.current_memory? Memory pool is two words so should be seperated by an underscore.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd stick to memorypool as it's a common term (even when it consists of multiple words).
Otherwise the same could apply to aspnet_core (or asp_net_core), etc.

From a usability point when searching through metrics with memory_ one can find quite a lot.
So when I'm interested in the memory pool, I'd search for memorypool as I won't remember that it's separated by underscore.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have rate_limiting rather than ratelimiting in other metrics. So an underscore here would be consistant with that.

To go with the standard, and consistency, I think memory_pool is better.

Otherwise the same could apply to aspnet_core (or asp_net_core), etc.

All product names in metrics seem to avoid underscores, e.g. cloudfoundary, elasticsearch, openai, etc.

unit: "{bytes}",
unit: "By",
description: "Number of bytes that are currently pooled by the pool.");

_totalAllocatedMemory = _meter.CreateCounter<long>(
"aspnetcore.memorypool.total_allocated",
unit: "{bytes}",
unit: "By",
description: "Total number of allocations made by the pool.");

_evictedMemory = _meter.CreateCounter<long>(
"aspnetcore.memorypool.evicted_memory",
unit: "{bytes}",
unit: "By",
description: "Total number of bytes that have been evicted.");

_totalRented = _meter.CreateCounter<long>(
"aspnetcore.memorypool.total_rented",
unit: "{bytes}",
unit: "By",
description: "Total number of rented bytes from the pool.");
}

Expand Down
Loading