From 485f06e946aa107f5754ca792504b40525978ee4 Mon Sep 17 00:00:00 2001 From: daniilnaumov Date: Thu, 23 May 2024 13:35:02 +0200 Subject: [PATCH] making host mandatory --- README.md | 14 +++++++------- scripts/geocoding-reverse.js | 2 +- scripts/geocoding-search.js | 2 +- scripts/routes.js | 2 +- scripts/time-filter-proto.js | 2 +- scripts/time-filter.js | 2 +- scripts/time-map-fast.js | 2 +- scripts/time-map.js | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 0e7b3b9..17e61fb 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ The simplest way to run these benchmarks is to use docker: docker run -e APP_ID={APP_ID} -e API_KEY={API_KEY} - -e HOST=api.traveltimeapp.com //optional + -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 @@ -35,7 +35,7 @@ docker run docker run -e APP_ID={APP_ID} -e API_KEY={API_KEY} - -e HOST=api.traveltimeapp.com //optional + -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 @@ -54,7 +54,7 @@ docker run docker run -e APP_ID={APP_ID} -e API_KEY={API_KEY} - -e HOST=api.traveltimeapp.com //optional + -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 @@ -73,7 +73,7 @@ docker run docker run -e APP_ID={APP_ID} -e API_KEY={API_KEY} - -e HOST=api.traveltimeapp.com //optional + -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 @@ -91,7 +91,7 @@ docker run -e API_KEY={API_KEY} -e DESTINATIONS=50 // optional -e MANY_TO_ONE // optional - -e HOST=proto.api.traveltimeapp.com // 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 @@ -109,7 +109,7 @@ docker run docker run -e APP_ID={APP_ID} -e API_KEY={API_KEY} - -e HOST=api.traveltimeapp.com //optional + -e HOST=api.traveltimeapp.com -e QUERY='Parliament square' //optional -e WITHIN_COUNTRY='gb' //optional, only return the results that are within the specified country -e LIMIT=50 //optional, limits amount of results returned to specified number (1 to 50) @@ -126,7 +126,7 @@ docker run docker run -e APP_ID={APP_ID} -e API_KEY={API_KEY} - -e HOST=api.traveltimeapp.com //optional + -e HOST=api.traveltimeapp.com -e LAT='51.4952113' //optional, latitude -e LNG='-0.183122' //optional, longitude -ti igeolise/traveltime-k6-benchmarks:latest k6 run scripts/routes.js diff --git a/scripts/geocoding-reverse.js b/scripts/geocoding-reverse.js index 0875306..fee47c0 100644 --- a/scripts/geocoding-reverse.js +++ b/scripts/geocoding-reverse.js @@ -30,7 +30,7 @@ randomSeed(__ENV.SEED || 1234567) export function setup () { const appId = __ENV.APP_ID const apiKey = __ENV.API_KEY - const host = __ENV.HOST || 'api.traveltimeapp.com' + const host = __ENV.HOST const url = `https://${host}/v4/geocoding/reverse` const lat = __ENV.LAT || '51.4952113' diff --git a/scripts/geocoding-search.js b/scripts/geocoding-search.js index 07304b7..7b2b556 100644 --- a/scripts/geocoding-search.js +++ b/scripts/geocoding-search.js @@ -30,7 +30,7 @@ randomSeed(__ENV.SEED || 1234567) export function setup () { const appId = __ENV.APP_ID const apiKey = __ENV.API_KEY - const host = __ENV.HOST || 'api.traveltimeapp.com' + const host = __ENV.HOST const url = `https://${host}/v4/geocoding/search` const query = __ENV.QUERY || 'Parliament square' diff --git a/scripts/routes.js b/scripts/routes.js index ba3f361..d7f6201 100644 --- a/scripts/routes.js +++ b/scripts/routes.js @@ -36,7 +36,7 @@ const precomputedDataFile = __ENV.DATA_PATH ? open(__ENV.DATA_PATH) : undefined export function setup () { const appId = __ENV.APP_ID const apiKey = __ENV.API_KEY - const host = __ENV.HOST || 'api.traveltimeapp.com' + const host = __ENV.HOST const location = __ENV.LOCATION || 'GB/London' const locationCoords = getLocationCoordinates(location) const url = `https://${host}/v4/routes` diff --git a/scripts/time-filter-proto.js b/scripts/time-filter-proto.js index c56c7d7..060d8c6 100644 --- a/scripts/time-filter-proto.js +++ b/scripts/time-filter-proto.js @@ -40,7 +40,7 @@ export function setup () { const appId = __ENV.APP_ID const apiKey = __ENV.API_KEY const destinationsAmount = parseInt(__ENV.DESTINATIONS || 50) - const host = __ENV.HOST || 'proto.api.traveltimeapp.com' + const host = __ENV.HOST const transportation = __ENV.TRANSPORTATION || 'driving+ferry' const protocol = __ENV.PROTOCOL || 'https' const travelTime = parseInt(__ENV.TRAVEL_TIME || 7200) diff --git a/scripts/time-filter.js b/scripts/time-filter.js index 8590a79..5b3b3ad 100644 --- a/scripts/time-filter.js +++ b/scripts/time-filter.js @@ -36,7 +36,7 @@ const precomputedDataFile = __ENV.DATA_PATH ? open(__ENV.DATA_PATH) : undefined export function setup () { const appId = __ENV.APP_ID const apiKey = __ENV.API_KEY - const host = __ENV.HOST || 'api.traveltimeapp.com' + const host = __ENV.HOST const location = __ENV.LOCATION || 'GB/London' const locationCoords = getLocationCoordinates(location) const url = `https://${host}/v4/time-filter` diff --git a/scripts/time-map-fast.js b/scripts/time-map-fast.js index 2c87248..fd8d298 100644 --- a/scripts/time-map-fast.js +++ b/scripts/time-map-fast.js @@ -36,7 +36,7 @@ const precomputedDataFile = __ENV.DATA_PATH ? open(__ENV.DATA_PATH) : undefined export function setup () { const appId = __ENV.APP_ID const apiKey = __ENV.API_KEY - const host = __ENV.HOST || 'api.traveltimeapp.com' + const host = __ENV.HOST const location = __ENV.LOCATION || 'GB/London' const locationCoords = getLocationCoordinates(location) const url = `https://${host}/v4/time-map/fast` diff --git a/scripts/time-map.js b/scripts/time-map.js index a1872d4..d0c166e 100644 --- a/scripts/time-map.js +++ b/scripts/time-map.js @@ -36,7 +36,7 @@ const precomputedDataFile = __ENV.DATA_PATH ? open(__ENV.DATA_PATH) : undefined export function setup () { const appId = __ENV.APP_ID const apiKey = __ENV.API_KEY - const host = __ENV.HOST || 'api.traveltimeapp.com' + const host = __ENV.HOST const location = __ENV.LOCATION || 'GB/London' const locationCoords = getLocationCoordinates(location) const url = `https://${host}/v4/time-map`