{"", " k", " M", " G", " T", " P", " E"};
static const char *time_units[] =
{" us", " ms", " s"}; /* based on microseconds */
+ static const char *hz_units[] =
+ {" Hz", " KHz", " MHz", " GHz"};
const char *suffix;
double divisor = (type == PIPE_DRIVER_QUERY_TYPE_BYTES) ? 1024 : 1000;
int unit = 0;
assert(unit < ARRAY_SIZE(byte_units));
suffix = byte_units[unit];
break;
+ case PIPE_DRIVER_QUERY_TYPE_HZ:
+ assert(unit < ARRAY_SIZE(hz_units));
+ suffix = hz_units[unit];
+ break;
default:
assert(unit < ARRAY_SIZE(metric_units));
suffix = metric_units[unit];
/* PIPE_QUERY_PRIMITIVES_GENERATED */
/* PIPE_QUERY_PRIMITIVES_EMITTED */
/* PIPE_DRIVER_QUERY_TYPE_UINT64 */
+ /* PIPE_DRIVER_QUERY_TYPE_HZ */
uint64_t u64;
/* PIPE_DRIVER_QUERY_TYPE_UINT */
PIPE_DRIVER_QUERY_TYPE_PERCENTAGE = 3,
PIPE_DRIVER_QUERY_TYPE_BYTES = 4,
PIPE_DRIVER_QUERY_TYPE_MICROSECONDS = 5,
+ PIPE_DRIVER_QUERY_TYPE_HZ = 6,
};
enum pipe_driver_query_group_type