summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/display-channel.c14
-rw-r--r--server/stat.h5
2 files changed, 10 insertions, 9 deletions
diff --git a/server/display-channel.c b/server/display-channel.c
index e9e3770e..7017b2a3 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -2039,13 +2039,13 @@ DisplayChannel* display_channel_new(RedWorker *worker, int migrate, int stream_v
display->non_cache_counter = stat_add_counter(channel->stat,
"non_cache", TRUE);
#endif
- stat_compress_init(&display->lz_stat, "lz");
- stat_compress_init(&display->glz_stat, "glz");
- stat_compress_init(&display->quic_stat, "quic");
- stat_compress_init(&display->jpeg_stat, "jpeg");
- stat_compress_init(&display->zlib_glz_stat, "zlib");
- stat_compress_init(&display->jpeg_alpha_stat, "jpeg_alpha");
- stat_compress_init(&display->lz4_stat, "lz4");
+ stat_compress_init(&display->lz_stat, "lz", red_worker_get_clockid(worker));
+ stat_compress_init(&display->glz_stat, "glz", red_worker_get_clockid(worker));
+ stat_compress_init(&display->quic_stat, "quic", red_worker_get_clockid(worker));
+ stat_compress_init(&display->jpeg_stat, "jpeg", red_worker_get_clockid(worker));
+ stat_compress_init(&display->zlib_glz_stat, "zlib", red_worker_get_clockid(worker));
+ stat_compress_init(&display->jpeg_alpha_stat, "jpeg_alpha", red_worker_get_clockid(worker));
+ stat_compress_init(&display->lz4_stat, "lz4", red_worker_get_clockid(worker));
display->n_surfaces = n_surfaces;
display->num_renderers = num_renderers;
diff --git a/server/stat.h b/server/stat.h
index 3c980d04..77bfc697 100644
--- a/server/stat.h
+++ b/server/stat.h
@@ -81,9 +81,10 @@ static inline void stat_reset(stat_info_t *info)
}
#ifdef COMPRESS_STAT
-static inline void stat_compress_init(stat_info_t *info, const char *name)
+static inline void stat_compress_init(stat_info_t *info, const char *name, clockid_t clock)
{
info->name = name;
+ info->clock = clock;
stat_reset(info);
}
@@ -107,7 +108,7 @@ static inline double stat_byte_to_mega(uint64_t size)
}
#else
-#define stat_compress_init(a, b)
+#define stat_compress_init(a, b, c)
#define stat_compress_add(a, b, c, d)
#endif