MCPcopy Create free account
hub / github.com/antirez/ds4 / read_socket_text

Function read_socket_text

ds4_server.c:12139–12147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12137 * effective prompt suffix evaluated by ds4_session_sync() is written into
12138 * the live KV cache and can be reused by the next request. */
12139 j->req.cache_read_tokens = cached;
12140 j->req.cache_write_tokens = prompt_tokens > cached ? prompt_tokens - cached : 0;
12141
12142 const double t0 = now_sec();
12143 uint64_t trace_id = trace_begin(s, j, cached, prompt_tokens, &cache_diag,
12144 cache_source, disk_cached, disk_cache_path);
12145 char ctx_span[48];
12146 request_ctx_span(ctx_span, sizeof(ctx_span), cached, prompt_tokens);
12147 server_prefill_progress progress = {
12148 .srv = s,
12149 .slot = slot,
12150 .kind = j->req.kind,

Calls 2

buf_takeFunction · 0.85
buf_appendFunction · 0.70