Skip to content

Conversation

@mmolisch
Copy link

Added collector for /proc/fs/fscache/stats

@mmolisch mmolisch force-pushed the fscache-parsing branch 3 times, most recently from edb4c1a to d8182cd Compare April 29, 2025 12:24
Signed-off-by: Marek Molisch <[email protected]>
Signed-off-by: Marek Molisch <[email protected]>
@mmolisch mmolisch force-pushed the fscache-parsing branch 2 times, most recently from 9fa9729 to c7239be Compare April 29, 2025 12:33
Signed-off-by: Marek Molisch <[email protected]>
@mmolisch mmolisch marked this pull request as ready for review April 29, 2025 12:48
@mmolisch
Copy link
Author

@SuperQ @discordianfish

@vitekk02
Copy link

did u just vibecoded this shit?

Comment on lines +85 to +90
return &fscacheCollector{
objectsAllocated: prometheus.NewDesc(
prometheus.BuildFQName(namespace, fscacheSubsystem, "objects_allocated_total"),
"Number of index cookies allocated (Cookies: idx=allocated/available/unused).",
nil, nil,
),
Copy link
Member

Choose a reason for hiding this comment

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

We're using a pattern of package level Desc vars, rather than having NewDesc() in the NewFooCollector() function. This is to avoid allocating new Desc data when using the dynamic collector module mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants