ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
callback_profiler.h
Go to the documentation of this file.
1
18#pragma once
19
20#include <stdint.h>
21#include <stdbool.h>
22#include <stddef.h>
23
35
45
53
64uint64_t lws_profiler_start(int callback_reason, uint32_t client_id);
65
75void lws_profiler_stop(uint64_t handle, size_t bytes_processed);
76
87
95
106
116
asciichat_error_stats_t stats
void lws_profiler_stop(uint64_t handle, size_t bytes_processed)
Stop timing a callback invocation.
bool lws_profiler_init(void)
Initialize the callback profiler.
bool lws_profiler_is_initialized(void)
Check if profiler is initialized.
uint64_t lws_profiler_start(int callback_reason, uint32_t client_id)
Record a callback invocation with timing.
void lws_profiler_reset(void)
Reset all profiling statistics.
void lws_profiler_destroy(void)
Cleanup the callback profiler.
void lws_profiler_dump_report(void)
Print profiling report to logs.
bool lws_profiler_get_stats(int callback_reason, lws_callback_stats_t *stats)
Get statistics for a specific callback.
char * lws_profiler_export_json(void)
Export statistics as JSON.
unsigned int uint32_t
Definition common.h:58
unsigned long long uint64_t
Definition common.h:59
ClangTool/LibTooling compatibility shim for stdbool.h.
Callback profiling statistics for a single LWS callback reason.
uint64_t min_time_ns
Minimum single callback execution time.
uint64_t last_invocation_ns
Timestamp of last invocation (wall clock)
uint64_t total_time_ns
Total accumulated execution time in nanoseconds.
uint64_t max_time_ns
Maximum single callback execution time.
uint64_t bytes_processed
Total data processed by this callback.
uint64_t invocation_count
Number of times callback was invoked.