Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a section to readme on how to use DATA_PATH env var #69

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ WORKDIR /app
ENV CGO_ENABLED 0
RUN go install go.k6.io/xk6/cmd/xk6@latest

# Add here all extenstions
# Add here all extensions
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo fix

RUN xk6 build \
--with github.com/traveltime-dev/xk6-protobuf@latest \
--with github.com/grafana/xk6-output-prometheus-remote@latest
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ docker run
-e HOST=api.traveltimeapp.com
-e LOCATION='GB/London' //optional
-e TRANSPORTATION='driving+ferry' //optional
-e DATA_PATH='../precomputed/origins.csv' // optional, this will read coordinates from a file instead of randomly generating them
-e TRAVEL_TIME=7200 //optional
-e RPM=60 // optional
-e TEST_DURATION=3 //optional, benchmark duration in minutes (not including warmup)
Expand All @@ -37,6 +38,7 @@ docker run
-e HOST=api.traveltimeapp.com
-e LOCATION='GB/London' //optional
-e TRANSPORTATION='driving+ferry' //optional
-e DATA_PATH='../precomputed/origins.csv' // optional, this will read coordinates from a file instead of randomly generating them
-e TRAVEL_TIME=7200 //optional
-e LEVEL_OF_DETAILS=2 // optional
-e RPM=60 // optional
Expand All @@ -55,6 +57,7 @@ docker run
-e HOST=api.traveltimeapp.com
-e LOCATION='GB/London' //optional
-e TRANSPORTATION='driving+ferry' //optional
-e DATA_PATH='../precomputed/origins.csv' // optional, this will read coordinates from a file instead of randomly generating them
-e TRAVEL_DISTANCE=2000 //optional
-e RPM=60 // optional
-e TEST_DURATION=3 //optional, benchmark duration in minutes (not including warmup)
Expand All @@ -71,6 +74,7 @@ docker run
-e HOST=api.traveltimeapp.com
-e LOCATION='GB/London' //optional
-e TRANSPORTATION='driving+ferry' //optional
-e DATA_PATH='../precomputed/origins.csv' // optional, this will read coordinates from a file instead of randomly generating them
-e TRAVEL_TIME=7200 //optional
-e DESTINATIONS=50 // optional
-e RANGE=600 //optional
Expand All @@ -89,6 +93,7 @@ docker run
-e HOST=api.traveltimeapp.com
-e LOCATION='GB/London' //optional
-e TRANSPORTATION='driving+ferry' //optional
-e DATA_PATH='../precomputed/routes.csv' // optional, this will read coordinates from a file instead of randomly generating them
-e RPM=60 // optional
-e USE_SHARC = true // optional
-e TEST_DURATION=3 //optional, benchmark duration in minutes (not including warmup)
Expand All @@ -106,6 +111,7 @@ docker run
-e MANY_TO_ONE // optional
-e HOST=proto.api.traveltimeapp.com
-e TRANSPORTATION=driving+ferry // optional
-e DATA_PATH='../precomputed/origins.csv' // optional, this will read coordinates from a file instead of randomly generating them
-e LOCATION='UK/London' // optional
-e RPM=60 // optional
-e TEST_DURATION=3 //optional, benchmark duration in minutes (not including warmup)
Expand Down Expand Up @@ -144,6 +150,24 @@ docker run
-ti igeolise/traveltime-k6-benchmarks:latest k6 run scripts/routes.js
```

### Using custom premade input locations

To load your own precomputed files, you can use a volume. Example:

```bash
docker run
-v ./precomputed:/precomputed
-e DATA_PATH='../precomputed/{file_name}.csv'
-e APP_ID={APP_ID}
-e API_KEY={API_KEY}
...other ENV (-e) vars...
-ti igeolise/traveltime-k6-benchmarks:latest k6 run scripts/{script_name}.js
```

Make sure to maintain the correct csv format:
- `precomputed/origins.csv` is used for: time-map, time-map-fast, distance-map, time-filter, time-filter-proto.
- `precomputed/routes.csv` is used for routes.

### Running K6 Tests Locally

Install [K6](https://k6.io/docs/get-started/installation/)
Expand Down
Loading