Skip to content

Commit 4e9f9cb

Browse files
committed
smol fix
1 parent e7a7ffc commit 4e9f9cb

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

scripts/k6_load_test.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ import { sleep, check } from 'k6'
1111
const staging = 'http://gptwrapper.toska.svc.cluster.local:8000/api/ai/stream'
1212
const local = 'http://172.17.0.1:3000/api//ai/stream'
1313

14-
const vusit = 1
14+
const vusit = 50
1515

1616
export const options = {
1717
vus: vusit,
1818
iterations: vusit,
19-
// duration: "1s",
2019
}
2120

2221
const headerParams = {
@@ -46,7 +45,6 @@ const data = {
4645
}
4746

4847
function handleTokens(tokenizedStr) {
49-
// Collect all .text fields into an array
5048
let texts = []
5149
let responseId = ''
5250

@@ -59,12 +57,12 @@ function handleTokens(tokenizedStr) {
5957
if (parsedLine.text) texts.push(parsedLine.text)
6058
if (parsedLine.prevResponseId) responseId = parsedLine.prevResponseId
6159
} catch {
62-
// ignore parse errors
60+
console.log('📌 error parsing line')
6361
}
6462
})
6563

6664
const response = texts
67-
.join('') // join all text fragments
65+
.join('')
6866
.replace(/\n+/g, ' ')
6967
.replace(/\s{2,}/g, ' ')
7068
.trim()

0 commit comments

Comments
 (0)