summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-06-12 17:15:54 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-06-12 17:15:54 -0700
commitf806bf55ee2ada32b2fe9d4a13ccc84552d379d1 (patch)
tree2017a2cf0c9ec1a97e8faaab508344f16cba3600 /src/main.c
parent8fdd84d2c743b19ad1ca73c2065f87a09e797377 (diff)
til_args: introduce --print-module-contexts
Some rudimentary instrumentation for monitoring the active module contexts alongside the pipes You probably want to redirect stderr to a file when using --print-pipes and/or --print-module-contexts... e.g. ``` rototiller --defaults --go --print-pipes --print-module-contexts 2>/dev/null ``` or, if you still want to monitor FPS or log_channels=on in rtv, 2>/file/to/tail then tail -F /file/to/tail in another terminal.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index de26001..8306b64 100644
--- a/src/main.c
+++ b/src/main.c
@@ -338,9 +338,15 @@ static void * rototiller_thread(void *_rt)
til_module_render(rt->module_context, rt->stream, ticks, &fragment);
til_fb_fragment_submit(fragment);
- if (rt->args.print_pipes) { /* render threads are idle at this point */
+ if (rt->args.print_module_contexts || rt->args.print_pipes) {
+ /* render threads are idle at this point */
printf("\x1b[2J\x1b[;H"); /* ANSI codes for clear screen and move cursor to top left */
- til_stream_fprint_pipes(rt->stream, stdout);
+
+ if (rt->args.print_module_contexts)
+ til_stream_fprint_module_contexts(rt->stream, stdout);
+
+ if (rt->args.print_pipes)
+ til_stream_fprint_pipes(rt->stream, stdout);
}
}
© All Rights Reserved