mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-20 04:42:53 +00:00
benchmarks: Add gem_syslatency
Instead of measuring the wakeup latency of a GEM client, we turn the tables here and ask what is the wakeup latency of a normal process competing with GEM. In particular, a realtime process that expects deterministic latency. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
+9
-2
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <math.h>
|
||||
|
||||
/**
|
||||
* igt_stats_t:
|
||||
@@ -81,20 +82,26 @@ double igt_stats_get_variance(igt_stats_t *stats);
|
||||
double igt_stats_get_std_deviation(igt_stats_t *stats);
|
||||
|
||||
struct igt_mean {
|
||||
double mean, sq;
|
||||
double mean, sq, min, max;
|
||||
unsigned long count;
|
||||
};
|
||||
|
||||
static inline void igt_mean_init(struct igt_mean *m)
|
||||
{
|
||||
memset(m, 0, sizeof(*m));
|
||||
m->max = -HUGE_VAL;
|
||||
m->min = HUGE_VAL;
|
||||
}
|
||||
|
||||
static inline void igt_mean_add(struct igt_mean *m, double v)
|
||||
{
|
||||
double delta = v - m->mean;
|
||||
m->mean += delta / m->count++;
|
||||
m->mean += delta / ++m->count;
|
||||
m->sq += delta * (v - m->mean);
|
||||
if (v < m->min)
|
||||
m->min = v;
|
||||
if (v > m->max)
|
||||
m->max = v;
|
||||
}
|
||||
|
||||
static inline double igt_mean_get(struct igt_mean *m)
|
||||
|
||||
Reference in New Issue
Block a user