Add token/s on dashboard and reporting token/s in the metrics endpoint - #265
Add token/s on dashboard and reporting token/s in the metrics endpoint#265ndragon798 wants to merge 6 commits into
Conversation
|
@ndragon798 thank you for the PR! Generally the implementation is fine, I'm just wondering about that flaky test; adding Even if you are doing this with Claude you can forward my remark to it. If possible try to ask it to find a core, underlying issue, we might have some luck with it. :) |
TL;DRThe test assumed a TCP connect to a just-closed loopback port is refused The 10 ms sleep added in |
Added reporting tokens per second in the dashboard and total tokens per second in metrics

From the metrics endpoint
This is done by counting the amount of generation in the SampleTokenPhase then its sent off to a throughput meter which is just a rolling 1 second window. This is sent from the agent via the status snapshot that the agent sends once per second. Lots of this was done by Claude with me fixing issues that it had with building the binaries and testing. I only was able to test this on 3 machines that are amd/cpu based. I don't think there will be any issues with nvidia but please test if you have an nvidia gpu. Also tested with the desktop app which only seems to do cpu and not vulkan?
Let me know if you have any questions or run into any issues.
Thanks,
Nathan