perf: Optimize the output of global metrics to reduce atomic operations

This commit is contained in:
luwenpeng
2023-10-12 16:31:53 +08:00
parent 4f870de963
commit 8d1a9b3be5
10 changed files with 265 additions and 160 deletions

View File

@@ -175,7 +175,7 @@ struct sce_ctx *sce_ctx_create(const char *profile)
}
sce_ctx->ts = timestamp_new(sce_ctx->ts_update_interval_ms);
sce_ctx->metrics = global_metrics_create(profile);
sce_ctx->metrics = global_metrics_create(profile, sce_ctx->nr_worker_threads);
if (sce_ctx->metrics == NULL)
{
goto error_out;