-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yaml
81 lines (70 loc) · 3.48 KB
/
Taskfile.yaml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
version: "3"
env:
SYNTHEA_POPULATION_SIZE: 1000
vars:
# only here as a comment. not yet used to loop through all at once.
SYNTHEA_POPULATION_SIZES:
- 1000
- 5000
- 10000
- 50000
- 100000
tasks:
install-dependencies:
cmds:
- curl -LO https://github.com/synthetichealth/synthea/releases/download/master-branch-latest/synthea-with-dependencies.jar
- curl -LO https://repo1.maven.org/maven2/io/trino/trino-cli/453/trino-cli-453-executable.jar
- curl -LO https://github.com/samply/blazectl/releases/download/v0.16.0/blazectl-0.16.0-linux-amd64.tar.gz
- tar xzf blazectl-0.16.0-linux-amd64.tar.gz
- rm blazectl-0.16.0-linux-amd64.tar.gz
- ./blazectl --version
- pip install -r requirements.txt
generates:
- synthea-with-dependencies.jar
- blazectl
- trino-cli-453-executable.jar
# TODO: could use a task loop to generate synthea data for all sizes at once.
generate-fhir-data:
cmds:
- java -jar synthea-with-dependencies.jar -s 20240711 -cs 20240711 -r 20240711 -p "${SYNTHEA_POPULATION_SIZE}" -c config/synthea.properties --exporter.baseDirectory="./synthea/output-${SYNTHEA_POPULATION_SIZE}/bulk" --exporter.fhir.bulk_data="true"
- java -jar synthea-with-dependencies.jar -s 20240711 -cs 20240711 -r 20240711 -p "${SYNTHEA_POPULATION_SIZE}" -c config/synthea.properties --exporter.baseDirectory="./synthea/output-${SYNTHEA_POPULATION_SIZE}/transactions" --exporter.fhir.bulk_data="false"
start-servers:
cmds:
- docker compose -f compose.blaze.yaml -f compose.pathling.yaml -f compose.trino.yaml up -d
# after the import is done, we no longer need the pathling server itself
- docker compose -f compose.pathling.yaml stop pathling
upload-fhir-data:
cmds:
# blaze
# hospitalInformation & practitionerInformation are required for referential integrity.
- curl -X POST --header 'Content-Type:application/fhir+json' --data @"$(find synthea/output-${SYNTHEA_POPULATION_SIZE}/transactions/fhir/ -name 'hospitalInformation*.json')" --url 'http://localhost:8083/fhir'
- curl -X POST --header 'Content-Type:application/fhir+json' --data @"$(find synthea/output-${SYNTHEA_POPULATION_SIZE}/transactions/fhir/ -name 'practitionerInformation*.json')" --url 'http://localhost:8083/fhir'
- ./blazectl upload --no-progress --concurrency 32 synthea/output-${SYNTHEA_POPULATION_SIZE}/transactions/fhir/ --server http://localhost:8083/fhir
# hapi fhir jpa
# - curl -X POST --header 'Content-Type:application/fhir+json' --data @"$(find output/transactions/fhir/ -name 'hospitalInformation*.json')" --url 'http://localhost:8084/fhir'
# - curl -X POST --header 'Content-Type:application/fhir+json' --data @"$(find output/transactions/fhir/ -name 'practitionerInformation*.json')" --url 'http://localhost:8084/fhir'
# - ./blazectl upload output/transactions/fhir/ --server http://localhost:8084/fhir
remove-local-synthea-files:
cmds:
- rm -r synthea/
run-benchmarks:
dir: src/
cmds:
- python main.py
draw-plots:
dir: src/
cmds:
- python plot.py
run:
cmds:
- task: install-dependencies
- task: generate-fhir-data
- task: start-servers
- task: upload-fhir-data
- task: remove-local-synthea-files
- task: run-benchmarks
- task: draw-plots
- task: clean
clean:
cmds:
- docker compose -f compose.blaze.yaml -f compose.pathling.yaml -f compose.trino.yaml down -v --remove-orphans