Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metrics: factor out TLS cache #166

Merged
merged 6 commits into from
Jun 26, 2024
Merged

Conversation

alltilla
Copy link
Member

No description provided.

MrAnno
MrAnno previously approved these changes Jun 17, 2024
@@ -84,15 +84,15 @@ _deinit_tls_clusters_map_thread_init_hook(gpointer user_data)
}

static void
_init_tls_clusters_map_apphook(gint type, gpointer user_data)
_init_tls_clusters_map_apphook(void)
Copy link
Member

Choose a reason for hiding this comment

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

If I understand correctly, this is not an apphook anymore, so maybe remove that from the name.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, fixed.

@@ -144,14 +144,13 @@ metrics_tls_cache_get_labels_len(void)
void
metrics_tls_cache_global_init(void)
Copy link
Member

Choose a reason for hiding this comment

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

maybe this is a bit too granular for apphook, and we should just have a metrics_global_init()/deinit() functions.

e.g. drop the tls_cache piece from the name. if there will be multiple metrics related global init/deinit chores, we could call all of those from a single metrics_global_init() function.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree, fixed.

}

StatsClusterLabel *
metrics_tls_cache_get_next_label(void)
Copy link
Member

Choose a reason for hiding this comment

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

[optional] this is more like an alloc() function. get_next_label() seems like a read only operation. I needed to check out the implementation to understand what it was doing exactly.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea, fixed.

alltilla added 5 commits June 24, 2024 13:16
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
@alltilla alltilla force-pushed the metrics-tls-cache branch from 6a0edda to f890a2f Compare June 24, 2024 11:23
@bshifter bshifter merged commit 48bb604 into axoflow:main Jun 26, 2024
22 checks passed
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.

4 participants