2020-01-02 02:23:11 +00:00
|
|
|
% notcurses_stats(3)
|
|
|
|
% nick black <nickblack@linux.com>
|
2020-01-09 10:49:52 +00:00
|
|
|
% v1.0.2
|
2019-12-29 08:24:32 +00:00
|
|
|
|
2020-01-02 02:23:11 +00:00
|
|
|
# NAME
|
2019-12-29 08:24:32 +00:00
|
|
|
|
2020-01-04 07:37:55 +00:00
|
|
|
notcurses_stats - notcurses runtime statistics
|
2019-12-29 08:24:32 +00:00
|
|
|
|
2020-01-02 02:23:11 +00:00
|
|
|
# SYNOPSIS
|
|
|
|
|
|
|
|
**#include <notcurses.h>**
|
|
|
|
|
|
|
|
```c
|
|
|
|
typedef struct ncstats {
|
2019-12-29 08:24:32 +00:00
|
|
|
uint64_t renders; // number of successful renders
|
|
|
|
uint64_t failed_renders; // aborted renders, should be 0
|
|
|
|
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 render_ns; // nanoseconds spent rendering
|
|
|
|
int64_t render_max_ns; // max ns spent rendering
|
|
|
|
int64_t render_min_ns; // min ns spent rendering
|
|
|
|
uint64_t cellelisions; // cells elided entirely
|
|
|
|
uint64_t cellemissions; // cells emitted
|
|
|
|
uint64_t fbbytes; // bytes devoted to framebuffers
|
|
|
|
uint64_t fgelisions; // RGB fg elision count
|
|
|
|
uint64_t fgemissions; // RGB fg emissions
|
|
|
|
uint64_t bgelisions; // RGB bg elision count
|
|
|
|
uint64_t bgemissions; // RGB bg emissions
|
|
|
|
uint64_t defaultelisions; // default color was emitted
|
|
|
|
uint64_t defaultemissions; // default color was elided
|
2020-01-02 02:23:11 +00:00
|
|
|
} ncstats;
|
|
|
|
```
|
2019-12-29 08:24:32 +00:00
|
|
|
|
2020-01-02 02:23:11 +00:00
|
|
|
**void notcurses_stats(struct notcurses* nc, ncstats* stats);**
|
2019-12-29 08:24:32 +00:00
|
|
|
|
2020-01-02 02:23:11 +00:00
|
|
|
**void notcurses_reset_stats(struct notcurses* nc, ncstats* stats);**
|
2019-12-29 08:24:32 +00:00
|
|
|
|
2020-01-02 02:23:11 +00:00
|
|
|
# DESCRIPTION
|
2019-12-29 08:24:32 +00:00
|
|
|
|
2020-01-02 02:23:11 +00:00
|
|
|
**notcurses_stats** acquires an atomic snapshot of statistics, primarily
|
|
|
|
related to notcurses_render(3). **notcurses_reset_stats** does the same, but
|
|
|
|
also resets all cumulative stats (immediate stats such as **fbbytes** are not
|
2019-12-29 08:24:32 +00:00
|
|
|
reset).
|
|
|
|
|
2020-01-02 02:23:11 +00:00
|
|
|
# NOTES
|
2019-12-29 08:24:32 +00:00
|
|
|
|
2020-01-02 02:23:11 +00:00
|
|
|
Unsuccessful render operations do not contribute to the render timing stats.
|
2019-12-29 08:24:32 +00:00
|
|
|
|
2020-01-02 02:23:11 +00:00
|
|
|
# RETURN VALUES
|
2019-12-29 08:24:32 +00:00
|
|
|
|
2020-01-02 02:23:11 +00:00
|
|
|
Neither of these functions can fail. Neither returns any value.
|
2019-12-29 08:24:32 +00:00
|
|
|
|
2020-01-02 02:23:11 +00:00
|
|
|
# SEE ALSO
|
2019-12-29 08:24:32 +00:00
|
|
|
|
2020-01-02 02:23:11 +00:00
|
|
|
**notcurses(3)**, **notcurses_render(3)**
|