mcp: add a streamable serving benchmark
Add a benchmark using the streamable HTTP handler, and a more realistic input/output signature. Also expose this handler as an example (both a go example and a server in the examples/ directory).
This commit is contained in:
parent
a3e753b8d8
commit
b615fa49b1
1 changed files with 186 additions and 2 deletions
|
|
@ -287,7 +287,7 @@ func BenchmarkMemoryEventStore(b *testing.B) {
|
|||
payload := make([]byte, test.datasize)
|
||||
start := time.Now()
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
for i := range b.N {
|
||||
sessionID := sessionIDs[i%len(sessionIDs)]
|
||||
streamID := streamIDs[i%len(sessionIDs)][i%3]
|
||||
store.Append(ctx, sessionID, streamID, payload)
|
||||
|
|
|
|||
Loading…
Reference in a new issue