Repository navigation
feat(server): log a 'Request done:' timing summary for every request (#841) - #898
Merged
Merged
Conversation
… streamed or not (#841) One stable-prefix line per finished request: prompt tokens (and cached), prefill time and tok/s, generated tokens, decode time and tok/s, kv use, finish reason. Covers OpenAI chat/completions and Ollama chat/generate, streamed or not, regardless of stream_options.include_usage. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #841.
flm servenow writes one line per finished request, streamed or not, whateverstream_optionsthe client sets:Request done:for grep/parsing. Shows(N cached)when the prefix cache served part of the prompt; prefill tok/s counts only uncached tokens (same asusage)./v1/chat/completionsand/v1/completions, and Ollama/api/chatand/api/generate, each streamed and non-streamed.ChatCompletionChunk:/Usage:log lines are unchanged. Host-only change (rest_handler.cpp), no binaries.Tested: local build (Linux, Qwen3.5-2B), 8 requests (4 endpoints x stream/non-stream) -> 8
Request done:lines.🤖 Generated with Claude Code