From f8854f84e8e95370e4d102407b84e2410d6e932a Mon Sep 17 00:00:00 2001 From: nick black Date: Thu, 20 Aug 2020 16:19:21 -0400 Subject: [PATCH] demo summary: scale TheoFPS div by 1000 #928 --- README.md | 3 +++ src/demo/demo.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1522e2bee..c8dfdfba0 100644 --- a/README.md +++ b/README.md @@ -378,6 +378,9 @@ If things break or seem otherwise lackluster, **please** consult the * *Q:* I pretty much always need an `ncplane` when using a `cell`. Why doesn't the latter hold a point to the former? * *A:* Besides the massive redundancy this would entail, `cell` needs to remain as small as possible, and you almost always have the `ncplane` handy if you've got a reference to a valid `cell` anyway. +* *Q*: I ran `notcurses-demo` with a single demo, but my summary numbers don't match that demo's numbers, you charlatan. +* *A*: `notcurses-demo` renders several frames beyond the actual demos. + ## Supplemental material ### Useful links diff --git a/src/demo/demo.c b/src/demo/demo.c index 21de854f3..f1960faca 100644 --- a/src/demo/demo.c +++ b/src/demo/demo.c @@ -374,7 +374,7 @@ summary_table(struct ncdirect* nc, const char* spec){ qprefix(results[i].stats.render_ns, GIG, rtimebuf, 0); bprefix(results[i].stats.render_bytes, 1, totalbuf, 0); if(results[i].stats.renders){ - qprefix((double)results[i].stats.renders * GIG / results[i].stats.render_ns, 1, tfpsbuf, 0); + qprefix((uintmax_t)results[i].stats.renders * GIG * 1000 / results[i].stats.render_ns, 1000, tfpsbuf, 0); }else{ qprefix(0, GIG, tfpsbuf, 0); }