mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
chore: remove unused artillery scripts referencing state api (#7194)
This commit is contained in:
parent
06de5de85c
commit
b592255ce7
@ -1,32 +0,0 @@
|
|||||||
# /perf
|
|
||||||
|
|
||||||
Testing performance testing! Files of note:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# Configure the app URL and auth token to use in performance testing.
|
|
||||||
./env.sh
|
|
||||||
|
|
||||||
# Export all the data from the app at the configured URL.
|
|
||||||
./seed/export.sh
|
|
||||||
|
|
||||||
# Import previously exported data to the app instance.
|
|
||||||
./seed/import.sh
|
|
||||||
|
|
||||||
# Measure the GZIP response size for interesting endpoints.
|
|
||||||
./test/gzip.sh
|
|
||||||
|
|
||||||
# Run a few load test scenarios against the app.
|
|
||||||
./test/artillery.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
See also the following scripts in `package.json`:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# Fill the unleash_testing/seed schema with seed data.
|
|
||||||
$ yarn seed:setup
|
|
||||||
|
|
||||||
# Serve the unleash_testing/seed schema data, for exports.
|
|
||||||
$ yarn seed:serve
|
|
||||||
```
|
|
||||||
|
|
||||||
Edit files in `/test/e2e/seed` to change the amount data.
|
|
@ -1,4 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
export PERF_AUTH_KEY="*:*.964a287e1b728cb5f4f3e0120df92cb5"
|
|
||||||
export PERF_APP_URL="http://localhost:4242"
|
|
1
perf/seed/.gitignore
vendored
1
perf/seed/.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
/export.json
|
|
@ -1,12 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -feu
|
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
|
||||||
|
|
||||||
. ../env.sh
|
|
||||||
|
|
||||||
# Export data. Delete environments since they can't be imported.
|
|
||||||
curl -H "Authorization: $PERF_AUTH_KEY" "$PERF_APP_URL/api/admin/state/export" \
|
|
||||||
| jq 'del(.environments)' \
|
|
||||||
> export.json
|
|
@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -feu
|
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
|
||||||
|
|
||||||
. ../env.sh
|
|
||||||
|
|
||||||
curl -X POST \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-H "Authorization: $PERF_AUTH_KEY" \
|
|
||||||
-d @export.json \
|
|
||||||
"$PERF_APP_URL/api/admin/state/import?drop=true&keep=false"
|
|
2
perf/test/.gitignore
vendored
2
perf/test/.gitignore
vendored
@ -1,2 +0,0 @@
|
|||||||
/artillery.json
|
|
||||||
/artillery.json.html
|
|
@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -feu
|
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
|
||||||
|
|
||||||
. ../env.sh
|
|
||||||
|
|
||||||
artillery run ./artillery.yaml --output artillery.json
|
|
||||||
|
|
||||||
artillery report artillery.json
|
|
||||||
|
|
||||||
echo "See artillery.json.html for results"
|
|
@ -1,12 +0,0 @@
|
|||||||
config:
|
|
||||||
target: "http://localhost:4242"
|
|
||||||
defaults:
|
|
||||||
headers:
|
|
||||||
authorization: "{{ $processEnvironment.PERF_AUTH_KEY }}"
|
|
||||||
phases:
|
|
||||||
- duration: 60
|
|
||||||
arrivalRate: 10
|
|
||||||
scenarios:
|
|
||||||
- flow:
|
|
||||||
- get:
|
|
||||||
url: "/api/client/features"
|
|
@ -1,25 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -feu
|
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
|
||||||
|
|
||||||
. ../env.sh
|
|
||||||
|
|
||||||
print_response_size () {
|
|
||||||
local URL
|
|
||||||
local RES
|
|
||||||
URL="$1"
|
|
||||||
RES="$(curl -s -H "Authorization: $PERF_AUTH_KEY" "$URL")"
|
|
||||||
echo
|
|
||||||
echo "$URL"
|
|
||||||
echo
|
|
||||||
echo "* Byte size: $(echo "$RES" | wc -c) bytes"
|
|
||||||
echo "* GZIP size: $(echo "$RES" | gzip -6 | wc -c) bytes"
|
|
||||||
}
|
|
||||||
|
|
||||||
print_response_size "$PERF_APP_URL/api/admin/projects"
|
|
||||||
|
|
||||||
print_response_size "$PERF_APP_URL/api/admin/features"
|
|
||||||
|
|
||||||
print_response_size "$PERF_APP_URL/api/client/features"
|
|
Loading…
Reference in New Issue
Block a user