Message ID | 20210305073500.17926-1-dwagner@suse.de |
---|---|
Headers | show |
Series | JSON cleanups and more tests updated | expand |
On Fri, 5 Mar 2021, Daniel Wagner wrote: > Hi John, > > On Fri, Mar 05, 2021 at 08:34:46AM +0100, Daniel Wagner wrote: > > v2: > > - added 'return_code' to the common section of the JSON output > > - dropped 'inversion' as we have 'return_code' in pip_stress > > - dropped 'success' as we have 'return code in ssdd > > I am pretty happy with the this version now. That means I don't plan to > change more on the JSON feature. Well, one thing I am still not really > happy is the name '--output'. But as no one had any better idea, let's > keep it as it is. Hopefully no one wants it changed in 2 weeks from now > :) > > So if you want to do a release, please go ahead. > > Thanks, > Daniel > How about --json ? Description, "Optionally output final results to FILENAME in JSON format" John
On Fri, 5 Mar 2021, Daniel Wagner wrote: > On 05.03.21 16:29, John Kacur wrote: > > How about --json ? > > Description, "Optionally output final results to FILENAME in JSON format" > > Ah, that reminds me why I opted for output initially. We had the discussion to > support different output formats. But if we just stick with JSON, --json is > way better. > > What about finishing this series first and then I send the output -> json > cleanup? > > Fair enough. John
On Fri, 5 Mar 2021, Daniel Wagner wrote: > The fields are not uint64 just longs, update the printf format > specifiers. > > Signed-off-by: Daniel Wagner <dwagner@suse.de> > --- > src/cyclictest/cyclictest.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c > index 157047837259..c43dd7cbbd64 100644 > --- a/src/cyclictest/cyclictest.c > +++ b/src/cyclictest/cyclictest.c > @@ -11,7 +11,6 @@ > #include <stdio.h> > #include <stdlib.h> > #include <stdint.h> > -#include <inttypes.h> > #include <stdarg.h> > #include <unistd.h> > #include <fcntl.h> > @@ -1751,15 +1750,15 @@ static void write_stats(FILE *f, void *data) > if (s->hist_array[j] == 0) > continue; > fprintf(f, "%s", comma ? ",\n" : "\n"); > - fprintf(f, " \"%u\": %" PRIu64, j, s->hist_array[j]); > + fprintf(f, " \"%u\": %ld", j, s->hist_array[j]); > comma = 1; > } > if (comma) > fprintf(f, "\n"); > fprintf(f, " },\n"); > - fprintf(f, " \"cycles\": %" PRIu64 ",\n", s->cycles); > - fprintf(f, " \"min\": %" PRIu64 ",\n", s->min); > - fprintf(f, " \"max\": %" PRIu64 ",\n", s->max); > + fprintf(f, " \"cycles\": %ld,\n", s->cycles); > + fprintf(f, " \"min\": %ld,\n", s->min); > + fprintf(f, " \"max\": %ld,\n", s->max); > fprintf(f, " \"avg\": %.2f,\n", s->avg/s->cycles); > fprintf(f, " \"cpu\": %d,\n", par[i]->cpu); > fprintf(f, " \"node\": %d\n", par[i]->node); > -- > 2.30.1 > > This had already been added before John
On Fri, 5 Mar 2021, Daniel Wagner wrote: > The fields are not uint64 just longs, update the printf format > specifiers. > > Signed-off-by: Daniel Wagner <dwagner@suse.de> > --- > src/sched_deadline/cyclicdeadline.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/src/sched_deadline/cyclicdeadline.c b/src/sched_deadline/cyclicdeadline.c > index 33bac8cda898..d7aa9bb5d269 100644 > --- a/src/sched_deadline/cyclicdeadline.c > +++ b/src/sched_deadline/cyclicdeadline.c > @@ -18,7 +18,6 @@ > #include <errno.h> > #include <signal.h> > #include <getopt.h> > -#include <inttypes.h> > > #include <sys/syscall.h> > #include <sys/types.h> > @@ -976,9 +975,9 @@ static void write_stats(FILE *f, void *data) > for (i = 0; i < nr_threads; i++) { > s = &sd[i].stat; > fprintf(f, " \"%u\": {\n", i); > - fprintf(f, " \"cycles\": %" PRIu64 ",\n", s->cycles); > - fprintf(f, " \"min\": %" PRIu64 ",\n", s->min); > - fprintf(f, " \"max\": %" PRIu64 ",\n", s->max); > + fprintf(f, " \"cycles\": %ld,\n", s->cycles); > + fprintf(f, " \"min\": %ld,\n", s->min); > + fprintf(f, " \"max\": %ld\n", s->max); > fprintf(f, " \"avg\": %.2f\n", s->avg/s->cycles); > fprintf(f, " }%s\n", i == nr_threads - 1 ? "" : ","); > } > -- > 2.30.1 > > This has also already been added before. John
On Sun, Mar 14, 2021 at 06:45:16PM -0400, John Kacur wrote:
> This had already been added before
Okay, I didn't show up when I pulled.
On Mon, Mar 15, 2021 at 09:57:33AM +0100, Daniel Wagner wrote: > On Sun, Mar 14, 2021 at 06:45:16PM -0400, John Kacur wrote: > > This had already been added before > > Okay, I didn't show up when I pulled. arg, need more coffee: "it didn't..."