diff options
author | Marek Olšák <marek.olsak@amd.com> | 2017-06-14 21:27:06 +0200 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2017-06-15 17:10:36 +0200 |
commit | 5c00403ab19f8cf9ce44a4f053fcb735611d6fff (patch) | |
tree | 75288894bdff5aa5545dcdbbbe0b7dd8dcf75522 | |
parent | 075e003e3f94ddcc41415fa1dc8f3655d97ef54b (diff) |
drawoverhead: print test numbers
and align all results to the same column
Reviewed-by: Brian Paul <brianp@vmware.com>
-rw-r--r-- | tests/perf/drawoverhead.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/perf/drawoverhead.c b/tests/perf/drawoverhead.c index 9afd3d06e..bedaecb89 100644 --- a/tests/perf/drawoverhead.c +++ b/tests/perf/drawoverhead.c @@ -434,13 +434,16 @@ perf_run(const char *call, unsigned num_vbos, unsigned num_ubos, unsigned num_textures, const char *change, perf_rate_func f, double base_rate) { + static unsigned test_index; + test_index++; + double rate = perf_measure_rate(f); double ratio = base_rate ? rate / base_rate : 1; - printf(" %s (%2u VBOs, %u UBOs, %2u Tex) w/ %s change:%*s" + printf(" %3u: %s (%2u VBOs, %u UBOs, %2u Tex) w/ %s change:%*s" COLOR_CYAN "%s" COLOR_RESET " %s(%.1f%%)" COLOR_RESET "\n", - call, num_vbos, num_ubos, num_textures, change, - MAX2(24 - (int)strlen(change), 0), "", + test_index, call, num_vbos, num_ubos, num_textures, change, + MAX2(36 - (int)strlen(change) - (int)strlen(call), 0), "", perf_human_float(rate), base_rate == 0 ? COLOR_RESET : ratio > 0.7 ? COLOR_GREEN : |