61 lines
2.0 KiB
Diff
61 lines
2.0 KiB
Diff
|
From 0c5bc44d844807691da69abf8a2aad5acd8f0de5 Mon Sep 17 00:00:00 2001
|
||
|
From: Crystal Wood <crwood@redhat.com>
|
||
|
Date: Wed, 6 Dec 2023 14:55:06 -0600
|
||
|
Subject: [PATCH 1/3] rt-tests: cyclictest: Remove histogram totals
|
||
|
|
||
|
The Total: line does not seem to contribute much value, as it should just
|
||
|
be the number of cycles minus the number of overflows. Unless someone
|
||
|
complains, remove it to simplify moving to common histogram code.
|
||
|
|
||
|
Signed-off-by: Crystal Wood <crwood@redhat.com>
|
||
|
- Tested in rteval
|
||
|
- Edited commit message to say "cycles" instead of buckets
|
||
|
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||
|
---
|
||
|
src/cyclictest/cyclictest.c | 14 +-------------
|
||
|
1 file changed, 1 insertion(+), 13 deletions(-)
|
||
|
|
||
|
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
|
||
|
index a8039b49feb6..93ce201e9fca 100644
|
||
|
--- a/src/cyclictest/cyclictest.c
|
||
|
+++ b/src/cyclictest/cyclictest.c
|
||
|
@@ -1407,12 +1407,9 @@ static void print_tids(struct thread_param *par[], int nthreads)
|
||
|
static void print_hist(struct thread_param *par[], int nthreads)
|
||
|
{
|
||
|
int i, j;
|
||
|
- unsigned long long int log_entries[nthreads+1];
|
||
|
unsigned long maxmax, alloverflows;
|
||
|
FILE *fd;
|
||
|
|
||
|
- bzero(log_entries, sizeof(log_entries));
|
||
|
-
|
||
|
if (use_histfile) {
|
||
|
fd = fopen(histfile, "w");
|
||
|
if (!fd) {
|
||
|
@@ -1434,21 +1431,12 @@ static void print_hist(struct thread_param *par[], int nthreads)
|
||
|
fprintf(fd, "%06lu", curr_latency);
|
||
|
if (j < nthreads - 1)
|
||
|
fprintf(fd, "\t");
|
||
|
- log_entries[j] += curr_latency;
|
||
|
allthreads += curr_latency;
|
||
|
}
|
||
|
- if (histofall && nthreads > 1) {
|
||
|
+ if (histofall && nthreads > 1)
|
||
|
fprintf(fd, "\t%06llu", allthreads);
|
||
|
- log_entries[nthreads] += allthreads;
|
||
|
- }
|
||
|
fprintf(fd, "\n");
|
||
|
}
|
||
|
- fprintf(fd, "# Total:");
|
||
|
- for (j = 0; j < nthreads; j++)
|
||
|
- fprintf(fd, " %09llu", log_entries[j]);
|
||
|
- if (histofall && nthreads > 1)
|
||
|
- fprintf(fd, " %09llu", log_entries[nthreads]);
|
||
|
- fprintf(fd, "\n");
|
||
|
fprintf(fd, "# Min Latencies:");
|
||
|
for (j = 0; j < nthreads; j++)
|
||
|
fprintf(fd, " %05lu", par[j]->stats->min);
|
||
|
--
|
||
|
2.43.0
|
||
|
|