ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
callback_profiler.h
Go to the documentation of this file.
1
17
18#pragma once
19
20#include <stdint.h>
21#include <stdbool.h>
22#include <stddef.h>
23
36
46
54
65uint64_t lws_profiler_start(int callback_reason, uint32_t client_id);
66
76void lws_profiler_stop(uint64_t handle, size_t bytes_processed);
77
87bool lws_profiler_get_stats(int callback_reason, lws_callback_stats_t *stats);
88
96
107
117
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:62
unsigned long long uint64_t
Definition common.h:63
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.