READMEs/README.LWS_WITH_LATENCY.md
LWS_WITH_LATENCYcmake .. -DLWS_WITH_LATENCY=1
Enabling this cmake build option causes:
protocol_lws_latency which allows realtime monitoring of the worst latenciesNotice that this measures how long the event loop is blocked for in your system with your user code. It doesn't measure packet arrival to handling interval.
You also need to enable -DLWS_WITH_PLUGINS=1 to build the plugins, and to do sudo make install to install the plugins and the web assets.
/latency and it's a file type mountpoint. The default file there should be index.htmlThis is lwsws configuration to run the lws-latency UI plugin on lo without tls.
After starting sudo lwsws with this config, you should be able to browse to http://127.0.0.1/latency and get a live display of the current and worst latencies.
{
"global": {
"uid": "48",
"gid": "48",
"interface": "lo",
"server-string": "lwsws",
"init-ssl": "no",
"timeout-secs": "50",
"rlimit-nofile": "10000",
"count-async-threads": 4
}
}
{
"vhosts": [{
"name": "lo",
"port": "80",
"disable-no-protocol-ws-upgrades": "on",
"enable-client-ssl": "on",
"ws-protocols": [{
"lws-latency": {
"status": "ok"
}
}],
"mounts": [{
"mountpoint": "/latency",
"origin": "file://_lws_ddir_/libwebsockets-test-server/lws-latency",
"default": "index.html"
}]
}
}