diff --git a/USAGE.md b/USAGE.md index e50ddf05f5..362f005509 100644 --- a/USAGE.md +++ b/USAGE.md @@ -3535,12 +3535,12 @@ typedef struct ncstats { uint64_t writeouts; // successful ncpile_rasterize() runs uint64_t failed_renders; // aborted renders, should be 0 uint64_t failed_writeouts; // aborted writes - uint64_t render_bytes; // bytes emitted to ttyfp - int64_t render_max_bytes; // max bytes emitted for a frame - int64_t render_min_bytes; // min bytes emitted for a frame + uint64_t raster_bytes; // bytes emitted to ttyfp + int64_t raster_max_bytes; // max bytes emitted for a frame + int64_t raster_min_bytes; // min bytes emitted for a frame uint64_t render_ns; // nanoseconds spent rendering - int64_t render_max_ns; // max ns spent in render+raster for a frame - int64_t render_min_ns; // min ns spent in render+raster for a frame + int64_t render_max_ns; // max ns spent in render for a frame + int64_t render_min_ns; // min ns spent in render for a frame uint64_t raster_ns; // nanoseconds spent rasterizing int64_t raster_max_ns; // max ns spent in raster for a frame int64_t raster_min_ns; // min ns spent in raster for a frame @@ -3559,8 +3559,9 @@ typedef struct ncstats { uint64_t sprixelemissions; // sprixel draw count uint64_t sprixelelisions; // sprixel elision count uint64_t sprixelbytes; // sprixel bytes emitted - uint64_t appsync_updates; // application-synchronized updates + uint64_t appsync_updates; // how many application-synchronized updates? uint64_t input_errors; // errors processing control sequences/utf8 + uint64_t input_events; // characters returned to userspace // current state -- these can decrease uint64_t fbbytes; // total bytes devoted to all active framebuffers diff --git a/doc/man/man3/notcurses_stats.3.md b/doc/man/man3/notcurses_stats.3.md index 5d891c93fd..e659255356 100644 --- a/doc/man/man3/notcurses_stats.3.md +++ b/doc/man/man3/notcurses_stats.3.md @@ -17,9 +17,9 @@ typedef struct ncstats { uint64_t writeouts; // successful ncpile_rasterize() runs uint64_t failed_renders; // aborted renders, should be 0 uint64_t failed_writeouts; // aborted writes - uint64_t render_bytes; // bytes emitted to ttyfp - int64_t render_max_bytes; // max bytes emitted for a frame - int64_t render_min_bytes; // min bytes emitted for a frame + uint64_t raster_bytes; // bytes emitted to ttyfp + int64_t raster_max_bytes; // max bytes emitted for a frame + int64_t raster_min_bytes; // min bytes emitted for a frame uint64_t render_ns; // nanoseconds spent rendering int64_t render_max_ns; // max ns spent for a frame int64_t render_min_ns; // min ns spent for a frame @@ -75,7 +75,7 @@ renders are not expected to fail except under exceptional circumstances. should **notcurses_render(3)** fail while writing out a frame to the terminal, it counts as a failed render. -**render_max_bytes** and **render_min_bytes** track the maximum and minimum +**raster_max_bytes** and **raster_min_bytes** track the maximum and minimum number of bytes used rasterizing a frame. A given state of Notcurses does not correspond to a unique number of bytes; the size is also dependent on the existing terminal state. As a first approximation, the time a terminal takes to @@ -125,7 +125,7 @@ Linux framebuffer bitmaps are not written through the terminal device, but instead directly into the memory-mapped framebuffer (see **mmap(2)**). Bytes used for framebuffer graphics are thus independent of bytes written to the terminal. This explains why **sprixelbytes** may be surprising given the -value of **render_bytes**. +value of **raster_bytes**. # RETURN VALUES diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h index 903c52d257..3d8715b305 100644 --- a/include/notcurses/notcurses.h +++ b/include/notcurses/notcurses.h @@ -1505,13 +1505,15 @@ typedef struct ncstats { uint64_t writeouts; // successful ncpile_rasterize() runs uint64_t failed_renders; // aborted renders, should be 0 uint64_t failed_writeouts; // aborted writes - // FIXME these next three all ought be "writeout" or "raster" - uint64_t render_bytes; // bytes emitted to ttyfp - int64_t render_max_bytes; // max bytes emitted for a frame - int64_t render_min_bytes; // min bytes emitted for a frame + uint64_t raster_bytes; // bytes emitted to ttyfp + int64_t raster_max_bytes; // max bytes emitted for a frame + int64_t raster_min_bytes; // min bytes emitted for a frame uint64_t render_ns; // nanoseconds spent rendering int64_t render_max_ns; // max ns spent in render for a frame int64_t render_min_ns; // min ns spent in render for a frame + uint64_t raster_ns; // nanoseconds spent rasterizing + int64_t raster_max_ns; // max ns spent in raster for a frame + int64_t raster_min_ns; // min ns spent in raster for a frame uint64_t writeout_ns; // nanoseconds spent writing frames to terminal int64_t writeout_max_ns; // max ns spent writing out a frame int64_t writeout_min_ns; // min ns spent writing out a frame @@ -1524,21 +1526,16 @@ typedef struct ncstats { uint64_t defaultelisions; // default color was emitted uint64_t defaultemissions; // default color was elided uint64_t refreshes; // refresh requests (non-optimized redraw) - uint64_t appsync_updates; // how many application-synchronized updates? - - // current state -- these can decrease - uint64_t fbbytes; // total bytes devoted to all active framebuffers - unsigned planes; // number of planes currently in existence - - // FIXME placed here for ABI compatibility; move up for ABI3 - uint64_t raster_ns; // nanoseconds spent rasterizing - int64_t raster_max_ns; // max ns spent in raster for a frame - int64_t raster_min_ns; // min ns spent in raster for a frame uint64_t sprixelemissions; // sprixel draw count uint64_t sprixelelisions; // sprixel elision count uint64_t sprixelbytes; // sprixel bytes emitted + uint64_t appsync_updates; // how many application-synchronized updates? uint64_t input_errors; // errors processing control sequences/utf8 uint64_t input_events; // characters returned to userspace + + // current state -- these can decrease + uint64_t fbbytes; // total bytes devoted to all active framebuffers + unsigned planes; // number of planes currently in existence } ncstats; // Allocate an ncstats object. Use this rather than allocating your own, since