You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.7 KiB
Markdown
57 lines
1.7 KiB
Markdown
5 years ago
|
% notcurses_stats(3)
|
||
|
% nick black <nickblack@linux.com>
|
||
|
% v0.9.9
|
||
5 years ago
|
|
||
5 years ago
|
# NAME
|
||
5 years ago
|
|
||
5 years ago
|
notcurses_stats—notcurses runtime statistics
|
||
5 years ago
|
|
||
5 years ago
|
# SYNOPSIS
|
||
|
|
||
|
**#include <notcurses.h>**
|
||
|
|
||
|
```c
|
||
|
typedef struct ncstats {
|
||
5 years ago
|
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
|
||
5 years ago
|
} ncstats;
|
||
|
```
|
||
5 years ago
|
|
||
5 years ago
|
**void notcurses_stats(struct notcurses* nc, ncstats* stats);**
|
||
5 years ago
|
|
||
5 years ago
|
**void notcurses_reset_stats(struct notcurses* nc, ncstats* stats);**
|
||
5 years ago
|
|
||
5 years ago
|
# DESCRIPTION
|
||
5 years ago
|
|
||
5 years ago
|
**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
|
||
5 years ago
|
reset).
|
||
|
|
||
5 years ago
|
# NOTES
|
||
5 years ago
|
|
||
5 years ago
|
Unsuccessful render operations do not contribute to the render timing stats.
|
||
5 years ago
|
|
||
5 years ago
|
# RETURN VALUES
|
||
5 years ago
|
|
||
5 years ago
|
Neither of these functions can fail. Neither returns any value.
|
||
5 years ago
|
|
||
5 years ago
|
# SEE ALSO
|
||
5 years ago
|
|
||
5 years ago
|
**notcurses(3)**, **notcurses_render(3)**
|