You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/performance/README.md
+39-7Lines changed: 39 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,16 +6,48 @@ some high level context short
6
6
7
7
## Run perf tests
8
8
9
+
### Prep the environment
10
+
11
+
Perf tests are generally conducted in the perftest env. There's a selection of tables in the perftest env representing different pointer volume scenarios e.g. perftest-baseline vs perftest-1million (todo: update with real names!).
12
+
13
+
To reset this table to the expected state for perftests, restore the table from a backup.
14
+
15
+
In the steps below, make sure the table name is the table your environment is pointing at. You might need to redeploy NRLF lambdas to point at the desired table.
16
+
17
+
### Prepare to run tests
18
+
19
+
#### Pull certs for env
20
+
9
21
```sh
10
22
assume management
11
-
make truststore-pull-all ENV=<env># e.g. perftest
23
+
make truststore-pull-all ENV=perftest
24
+
```
25
+
26
+
#### Generate permissions
27
+
28
+
You will need to generate pointer permissions the first time performance tests are run in an environment e.g. if the perftest environment is destroyed & recreated.
29
+
30
+
```sh
31
+
make generate permissions # makes a bunch of json permission files
32
+
make build # will take all permissions & create nrlf_permissions.zip file
33
+
34
+
# apply this new permissions zip file to your environment
12
35
cd ./terraform/infrastructure
13
-
tf workspace select# perftest-1 or active stack
14
-
cd ../../ # project root
15
-
assume
16
-
make perftest-prepare PERFTEST_TABLE_NAME=<pointer table name>
36
+
assume test# needed?
37
+
make init TF_WORKSPACE_NAME=perftest-1 ENV=perftest
38
+
tf apply
39
+
```
40
+
41
+
#### Generate input files
17
42
18
-
make perftest-consumer ENV_TYPE=<env># e.g. perftest
43
+
```sh
44
+
# creates 2 csv files and a json file
45
+
make perftest-prepare PERFTEST_TABLE_NAME=perftest-baseline
19
46
```
20
47
21
-
<!-- Mention relevant input files + any environment prep needed e.g. restoring tables from backup -->
48
+
### Run tests
49
+
50
+
```sh
51
+
make perftest-consumer ENV_TYPE=perftest PERFTEST_HOST=perftest-1.perftest.record-locator.national.nhs.uk
52
+
make perftest-producer ENV_TYPE=perftest PERFTEST_HOST=perftest-1.perftest.record-locator.national.nhs.uk
0 commit comments