graphlit-client 1.0.20250613005 → 1.0.20250613006
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -277,7 +277,7 @@ export class UIEventAdapter {
|
|
277
277
|
// Add final timing metadata
|
278
278
|
if (this.streamStartTime > 0) {
|
279
279
|
const totalTime = Date.now() - this.streamStartTime;
|
280
|
-
// Final throughput (chars/second)
|
280
|
+
// Final throughput (chars/second) - includes entire duration
|
281
281
|
finalMessage.throughput =
|
282
282
|
totalTime > 0
|
283
283
|
? Math.round((this.currentMessage.length / totalTime) * 1000)
|
@@ -316,6 +316,13 @@ export class UIEventAdapter {
|
|
316
316
|
const avgDelay = this.tokenDelays.reduce((a, b) => a + b, 0) / this.tokenDelays.length;
|
317
317
|
finalMetrics.avgTokenDelay = Math.round(avgDelay);
|
318
318
|
}
|
319
|
+
// Calculate streaming throughput (excludes TTFT)
|
320
|
+
if (this.firstTokenTime > 0 && this.streamStartTime > 0) {
|
321
|
+
const streamingTime = completionTime - this.firstTokenTime;
|
322
|
+
if (streamingTime > 0) {
|
323
|
+
finalMetrics.streamingThroughput = Math.round((this.currentMessage.length / streamingTime) * 1000);
|
324
|
+
}
|
325
|
+
}
|
319
326
|
this.emitUIEvent({
|
320
327
|
type: "conversation_completed",
|
321
328
|
message: finalMessage,
|