-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstress.js
More file actions
37 lines (36 loc) · 739 Bytes
/
stress.js
File metadata and controls
37 lines (36 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import http from "k6/http"
import { sleep } from "k6"
export default function () {
const q1 = `
query Request {
query {
locations {
name
id
}
}
}`
http.post("https://graphql.ucsc.menu/graphql", JSON.stringify({ query: q1 }))
// sleep(0.1)
const q2 = `
query Request {
query {
locations {
menus {
date
meals {
mealType
sections {
name
foodItems {
name
}
}
}
}
}
}
}`
// sleep(1)
http.post("https://graphql.ucsc.menu/graphql", JSON.stringify({ query: q2 }))
}