Skip to content

Commit

Permalink
Adding datetime picker argument (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnasbr authored Oct 14, 2024
1 parent c0a7b1d commit e5f1098
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ docker run
-e LOCATION='GB/London' //optional
-e TRANSPORTATION='driving+ferry' //optional
-e TRAVEL_TIME=7200 //optional
-e DATE_TIME=2024-10-14T07:10:45.535Z //optional, departure/arrival time in ISO 8601 format. Default - current time
-e RPM=60 // optional
-e TEST_DURATION=3 //optional, benchmark duration in minutes (not including warmup)
-e UNIQUE_REQUESTS=100 //optional int, the number of unique requests that should be generated
Expand Down Expand Up @@ -56,6 +57,7 @@ docker run
-e LOCATION='GB/London' //optional
-e TRANSPORTATION='driving+ferry' //optional
-e TRAVEL_DISTANCE=2000 //optional
-e DATE_TIME=2024-10-14T07:10:45.535Z //optional, departure/arrival time in ISO 8601 format. Default - current time
-e RPM=60 // optional
-e TEST_DURATION=3 //optional, benchmark duration in minutes (not including warmup)
-e UNIQUE_REQUESTS=100 //optional int, the number of unique requests that should be generated
Expand All @@ -72,6 +74,7 @@ docker run
-e LOCATION='GB/London' //optional
-e TRANSPORTATION='driving+ferry' //optional
-e TRAVEL_TIME=7200 //optional
-e DATE_TIME=2024-10-14T07:10:45.535Z //optional, departure/arrival time in ISO 8601 format. Default - current time
-e DESTINATIONS=50 // optional
-e RANGE=600 //optional
-e RPM=60 // optional
Expand All @@ -89,6 +92,7 @@ docker run
-e HOST=api.traveltimeapp.com
-e LOCATION='GB/London' //optional
-e TRANSPORTATION='driving+ferry' //optional
-e DATE_TIME=2024-10-14T07:10:45.535Z //optional, departure/arrival time in ISO 8601 format. Default - current time
-e RPM=60 // optional
-e USE_SHARC = true // optional
-e TEST_DURATION=3 //optional, benchmark duration in minutes (not including warmup)
Expand Down
2 changes: 1 addition & 1 deletion scripts/distance-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export function setup () {
const transportation = __ENV.TRANSPORTATION || 'driving+ferry'
const travelDistance = parseInt(__ENV.TRAVEL_DISTANCE || 2000)
const uniqueRequestsAmount = parseInt(__ENV.UNIQUE_REQUESTS || 100)
const dateTime = __ENV.DATE_TIME || new Date().toISOString()

const params = {
headers: {
Expand All @@ -52,7 +53,6 @@ export function setup () {
'X-Api-Key': apiKey
}
}
const dateTime = new Date().toISOString()

const requestBodies = precomputedDataFile
? readRequestsBodies(travelDistance, transportation, dateTime, precomputedDataFile)
Expand Down
3 changes: 1 addition & 2 deletions scripts/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ export function setup () {
const transportation = __ENV.TRANSPORTATION || 'driving+ferry'
const uniqueRequestsAmount = parseInt(__ENV.UNIQUE_REQUESTS || 100)
const useSharc = __ENV.USE_SHARC === 'true'

const dateTime = new Date().toISOString()
const dateTime = __ENV.DATE_TIME || new Date().toISOString()

const params = {
headers: {
Expand Down
2 changes: 1 addition & 1 deletion scripts/time-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function setup () {
max_results: 3,
width: rangeWidth === 0 ? 1 : parseInt(rangeWidth)
}
const dateTime = new Date().toISOString()
const dateTime = __ENV.DATE_TIME || new Date().toISOString()

const params = {
headers: {
Expand Down
2 changes: 1 addition & 1 deletion scripts/time-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export function setup () {
const travelTime = parseInt(__ENV.TRAVEL_TIME || 7200)
const levelOfDetails = parseInt(__ENV.LEVEL_OF_DETAILS || -8)
const uniqueRequestsAmount = parseInt(__ENV.UNIQUE_REQUESTS || 100)
const dateTime = __ENV.DATE_TIME || new Date().toISOString()

const params = {
headers: {
Expand All @@ -53,7 +54,6 @@ export function setup () {
'X-Api-Key': apiKey
}
}
const dateTime = new Date().toISOString()

const requestBodies = precomputedDataFile
? readRequestsBodies(travelTime, transportation, dateTime, levelOfDetails, precomputedDataFile)
Expand Down

0 comments on commit e5f1098

Please sign in to comment.