diff --git a/README.md b/README.md index 3f2d190..87083b6 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,80 @@ -# Nebengjek +# NebengJek +![SonarQube Coverage](https://sonarcloud.io/api/project_badges/measure?project=nebengjek-demo_nebengjek&metric=coverage) +![CI](https://github.com/ermasavior/nebeng-jek/actions/workflows/ci.yml/badge.svg) + +## Description +NebengJek is a ride-sharing app that connects users with shared rides. Users can either be Riders, requesting a ride, or Drivers, offering their vehicle. Both can choose whom to ride with, as long as they're within a specific area. 🚀 + +## Main Features +1. __Ride Matching__ + + Riders can request a ride to nearest available drivers (in radius 1 km). Drivers can accept or ignore requests. Riders can also be selective on who offered the ride. +2. __Real-Time Location Tracking__: + + Once the ride is matched and rider got picked up, the ride begins. Both users sending location updates every minute. The app tracks and calculates the distance traveled. +3. __Ride Commissions__: + + The app takes 30% commission from each ride to support the service maintenance and growth. :) + +## Architecture +![LLD](docs/pictures/Nebengjek-LLD.png) + +This system contains of four internal services and one external service (mocked). + +1. Riders, responsible for maintaining Riders' connection for real-time location update and ride update broadcast. +2. Drivers, responsible for maintaining Drivers' connection for real-time location update and ride update broadcast. +3. Rides, responsible for managing Ride data, including driver-rider assignments and ride status lifecycle. +4. Location, responsible for managing users' real time locations. +5. (External) Tsel-payment service mock, responsible for maintaining users' credits. + +The communication between users and our services utilize __Websocket__ (for real-time bidirectional communication) and __REST API__ (for stateless data updates). To enable system High Availability, a Load Balancer sits in front of our services. The services are containerized using Docker. The services communicate with Event Driven Architecture using NATS JetStream (for ride update broadcasting and real time location tracking). + +The database we are using are Relational Database (Postgres) for storing Rides data and Key-Value storage (Redis) for storing Location data (in Geolocation format). Redis provides geo-location operations, including queries based on indexed coordinates and searches within a specified radius. + +## Data Schema +![DB](docs/pictures/ERD.png) + +The data consists of four tables: Drivers, Riders, Rides, RideCommissions + +### Enumerations +__Ride Status__ +![State Diagram](docs/pictures/state-diagram.ride-status.png) + +__Driver Status__ +| Number | Status | Description | +|---- |-------- |------------- | +| 0 | OFF | Driver is not in the radar | +| 1 | AVAILABLE | Driver turns on the beacon | -## Prerequisites -1. Docker + +## Data Migration +### Prerequisites +1. Postgres 16 +2. [DBMate](https://github.com/amacneil/dbmate), data migration script to initialize tables and data seeds + +### Steps +Ensure that your database is running. To Initialize schema and add migration: + +``` +dbmate --url 'postgres://YOUR_USERNAME:YOUR_PASSWORD@DB_HOST:5436/rides_db?sslmode=disable' up +``` ## How to Run +### Prerequisites +1. **Golang >=1.22**, serves web API +2. **Postgres 16**, for ride data store +3. **Redis**, for GeoLocation data store +4. **NATS JetStream**, message broker for event streaming and queue group + +5. (Alternatively) **Docker**, for practical containerized environment -1. Initialize `.env` file. See `./configs/.env.example` for example. -2. Run each service independently: +### Steps + +1. Ensure that all the service dependencies are running--Redis, Postgres, and NATS JetStream. +2. Initialize Postgres database (see Data Migration step) +3. Initialize NATS Jetstream using [create_stream script](deployments/nats/create_streams.sh) +2. Initialize `.env` files for each services. (See [`./configs/rides/.env.example`](configs/rides/.env.example) for example) +3. Run each service independently: ```sh make run-drivers make run-riders @@ -15,15 +83,35 @@ ### Using Docker -1. Initialize `.env` file into each `./configs/*` folders -2. Go to `/deployments`, then execute `docker-compose up -d` to run all services (including the dependencies) +1. Initialize `.env` file for each services. [(`./configs/rides/.env.example`)](configs/rides/.env.example) +2. In root path, execute `docker-compose up -d` to run all services (including the dependencies) + +## API Contract +TBD ## Load Test For load testing, we use `k6`. -The load test target is PATCH set driver availability endpoint. The test scenario spawned 50-250 concurrent users that run gradually on stages. +The test scenario will hit two selected APIs which spawned a number of concurrent users that was run gradually on multiple stages. + +The load test target is GET ride data endpoint (with target of 50-200 users) PATCH driver availability endpoint (with target of 20-80 users). +## Prerequisites +1. [K6](https://github.com/grafana/k6) + +## How to Run To run the load test: ```sh -cd loadtest && k6 run load_stages.js -``` \ No newline at end of file +cd loadtest + +## To run load test for GET ride data +k6 run get_ride_data.load_stages.js + +## To run load test for PATCH driver availability +k6 run patch_driver_availability.load_stages.js +``` + +## Author +Erma Safira Nurmasyita + +Telegram: @ermasavior diff --git a/docs/ERD.wsd b/docs/ERD.wsd new file mode 100644 index 0000000..d2e8900 --- /dev/null +++ b/docs/ERD.wsd @@ -0,0 +1,59 @@ +@startuml Rides DB Schema +' hide the spot +' hide circle + +' avoid problems with angled crows feet +skinparam linetype ortho + +entity "drivers" as e01 { + *id : number <> + -- + *name : varchar(255) + *phone_number : varchar(15) + *vehicle_type : int + *vehicle_plate : varchar(20) + *status : int + created_at : timestamp + updated_at : timestamp +} + +entity "riders" as e02 { + *id : number <> + -- + *name : varchar(255) + *phone_number : varchar(15) + created_at : timestamp + updated_at : timestamp +} + +entity "rides" as e03 { + *id : number <> + -- + *rider_id : number <> + *driver_id : number <> + *pickup_location : point + *destination : point + *status : int + distance : decimal + fare : decimal + final_price : decimal + start_time : timestamp + end_time : timestamp + created_at : timestamp + updated_at : timestamp +} + +entity "ride_commissions" as e04 { + *id : number <> + -- + *ride_id : number <> + platform_fee : decimal + driver_commission : decimal + created_at : timestamp +} + +e01 }o..|| e03 +e02 }o..|| e03 +e03 |o..|| e04 + +@enduml \ No newline at end of file diff --git a/docs/allocation-diagram.wsd b/docs/allocation-diagram.wsd deleted file mode 100644 index d19c7a2..0000000 --- a/docs/allocation-diagram.wsd +++ /dev/null @@ -1,44 +0,0 @@ -@startuml Customer-Driver Allocation Flow - -actor Customer -actor Driver - -Driver->Service: Set as active -Service->DB: Update as active driver - -Customer->Service: Create new trip request -Service->DB: Store new trip - -Service->DB: Get nearest available drivers -Service->Cache: Store available driver list -Service->Driver: Notify new trip to drivers - -alt Driver accept the trip -Driver->Service: Accept trip -Service->Customer: Notify matched driver - -alt Customer accept the trip -Customer->Service: Accept trip -Service->DB: Update trip data -Service->DB: Set driver as inactive -Service->Cache: Remove available driver list -Service->Driver: Notify to pickup Customer -Service->Customer: Notify to wait for Driver -else Customer reject the trip -Customer->Service: Reject trip -Service->DB: Update trip to be cancelled -Service->Cache: Remove available driver from list -Service->Driver: Notify rejected trip -end - -else Driver reject the trip -Driver->Service: Reject trip -Service->Cache: Remove available driver from list -Service->Cache: Get available drivers -alt no drivers available in 10 minutes -Service->DB: Update trip to be cancelled -Service->Customer: Notify "Try Again later." -end -end - -@enduml \ No newline at end of file diff --git a/docs/pictures/ERD.png b/docs/pictures/ERD.png new file mode 100644 index 0000000..db922b4 Binary files /dev/null and b/docs/pictures/ERD.png differ diff --git a/docs/pictures/Nebengjek-HLD.png b/docs/pictures/Nebengjek-HLD.png new file mode 100644 index 0000000..704fe95 Binary files /dev/null and b/docs/pictures/Nebengjek-HLD.png differ diff --git a/docs/pictures/Nebengjek-LLD.png b/docs/pictures/Nebengjek-LLD.png new file mode 100644 index 0000000..c48fd48 Binary files /dev/null and b/docs/pictures/Nebengjek-LLD.png differ diff --git a/docs/pictures/sequence.create-ride.png b/docs/pictures/sequence.create-ride.png new file mode 100644 index 0000000..8101043 Binary files /dev/null and b/docs/pictures/sequence.create-ride.png differ diff --git a/docs/pictures/sequence.match-driver-rider.png b/docs/pictures/sequence.match-driver-rider.png new file mode 100644 index 0000000..22c3355 Binary files /dev/null and b/docs/pictures/sequence.match-driver-rider.png differ diff --git a/docs/pictures/sequence.start-ride.png b/docs/pictures/sequence.start-ride.png new file mode 100644 index 0000000..11e8c47 Binary files /dev/null and b/docs/pictures/sequence.start-ride.png differ diff --git a/docs/pictures/sequence.stop-ride.png b/docs/pictures/sequence.stop-ride.png new file mode 100644 index 0000000..64eaa9a Binary files /dev/null and b/docs/pictures/sequence.stop-ride.png differ diff --git a/docs/pictures/state-diagram.ride-status.png b/docs/pictures/state-diagram.ride-status.png new file mode 100644 index 0000000..8396f1a Binary files /dev/null and b/docs/pictures/state-diagram.ride-status.png differ diff --git a/docs/sequence.create-ride.wsd b/docs/sequence.create-ride.wsd new file mode 100644 index 0000000..a1895e2 --- /dev/null +++ b/docs/sequence.create-ride.wsd @@ -0,0 +1,24 @@ +@startuml Create New Ride Flow + +actor Rider +actor Driver + +== Create New Ride == +Rider->Rides: Create new ride request +Rides->Location: Get nearest available drivers +Location->LocationDB: Query drivers +LocationDB-->Location: Return driver list +Location-->Rides: Return driver list +Rides->RidesDB: Store ride with status WAITING_FOR_DRIVER +Rides->Drivers: Publish ride request to driver list +Drivers-->Driver: Notify drivers + + +== Set Driver Availability == +Driver->Rides: Set as active +Rides->RidesDB: Update as active driver +Rides->Location: Update driver's current location +Location->LocationDB: Store driver location + + +@enduml \ No newline at end of file diff --git a/docs/sequence.match-driver-rider.wsd b/docs/sequence.match-driver-rider.wsd new file mode 100644 index 0000000..b48a177 --- /dev/null +++ b/docs/sequence.match-driver-rider.wsd @@ -0,0 +1,26 @@ +@startuml Driver-Rider Matching Flow + +actor Rider +actor Driver + +alt Driver accepted the request +Driver->Rides: Accept request +Rides->RidesDB: Update ride to MATCHED_DRIVER +Rides-->Riders: Publish update to rider +Riders->Rider: Notify rider + +alt Rider accepted the match +Rider->Rides: Accept match +Rides->RidesDB: Update ride to WAITING_FOR_PICKUP +Rides->RidesDB: Set driver as inactive +Rides->Location: Remove driver's current location +Location->LocationDB: Delete driver's location +Rides->Riders: Publish update to rider +Riders-->Rider: Notify rider to wait for pickup +else Rider rejected the match +Rider->Rides: Reject match +Rides->RidesDB: Update ride to CANCELLED +end +end + +@enduml \ No newline at end of file diff --git a/docs/sequence.start-ride.wsd b/docs/sequence.start-ride.wsd new file mode 100644 index 0000000..9e3da44 --- /dev/null +++ b/docs/sequence.start-ride.wsd @@ -0,0 +1,21 @@ +@startuml Start Ride Flow + +actor Rider +actor Driver + +== Start Ride == +Driver->Rides: Start ride request +Rides->RidesDB: Update ride to RIDE_STARTED +Rides->Riders: Publish ride update +Riders-->Rider: Notify rider + +== Live Tracking Location == +Driver->Drivers: Send current location +Drivers->Location: Track driver location +Location->LocationDB: Store driver location + +Rider->Riders: Send current location +Riders->Location: Track rider location +Location->LocationDB: Store rider location + +@enduml \ No newline at end of file diff --git a/docs/sequence.stop-ride.wsd b/docs/sequence.stop-ride.wsd new file mode 100644 index 0000000..229d1f6 --- /dev/null +++ b/docs/sequence.stop-ride.wsd @@ -0,0 +1,26 @@ +@startuml Stop Ride Flow + +actor Rider +actor Driver + +== End Ride == +Driver->Rides: Stop ride +Rides->RidesDB: Update ride to RIDE_ENDED +Rides->Riders: Publish ride update +Riders-->Rider: Notify rider + +== Confirm Ride Payment == +Driver->Rides: Confirm payment +note left of Rides +with custom price +(optional) +end note +Rides->Rides: Calculate commission (5%) +Rides->Payment: Deduct rider's credit +Rides->Payment: Add rider's credit +Rides->RidesDB: Store ride commission +Rides->RidesDB: Update ride to RIDE_PAID +Rides->Riders: Publish ride update +Riders-->Rider: Notify rider + +@enduml \ No newline at end of file diff --git a/docs/state-diagram.ride-status.wsd b/docs/state-diagram.ride-status.wsd new file mode 100644 index 0000000..d3916b2 --- /dev/null +++ b/docs/state-diagram.ride-status.wsd @@ -0,0 +1,15 @@ +@startuml Ride Status Diagram +hide empty description + +[*] --> NEW_RIDE_REQUEST : [Rider] creates ride request + +NEW_RIDE_REQUEST --> MATCHED_DRIVER : [Driver] accepts ride request +MATCHED_DRIVER --> RIDE_CANCELLED : [Rider] rejects +MATCHED_DRIVER --> READY_TO_PICKUP : [Rider] accepts +READY_TO_PICKUP --> RIDE_STARTED : [Driver] starts ride in pickup location +RIDE_STARTED --> RIDE_ENDED : [Driver] ends ride +RIDE_ENDED --> RIDE_PAID : [Driver] confirms price + +RIDE_PAID --> [*] +RIDE_CANCELLED --> [*] +@enduml diff --git a/loadtest/get_ride_data.load_stages.js b/loadtest/get_ride_data.load_stages.js index 031ab70..97c3baa 100644 --- a/loadtest/get_ride_data.load_stages.js +++ b/loadtest/get_ride_data.load_stages.js @@ -6,11 +6,11 @@ import { textSummary } from "https://jslib.k6.io/k6-summary/0.0.1/index.js"; //scenario 2 (load test based on stages) export const options = { stages: [ - { duration: "0.3m", target: 100 }, // simulate ramp-up of traffic from 1 to 100 users over 0.3 minute - { duration: "0.4m", target: 100 }, // stay at 100 users for 0.4 minute - { duration: "0.6m", target: 150 }, // simulate ramp-up of traffic from 100 to 200 users over 0.6 minute - { duration: "1m", target: 250 }, // simulate ramp-up to 300 users over 1 minute - { duration: "1.4m", target: 0 }, // simulate ramp-down to 0 users over 1.4 minute + { duration: "0.3m", target: 50 }, + { duration: "0.4m", target: 100 }, + { duration: "0.6m", target: 150 }, + { duration: "1m", target: 200 }, + { duration: "1.4m", target: 0 }, ], thresholds: { http_req_failed: ["rate<0.001"], // the error rate must be lower than 0.1% @@ -41,7 +41,7 @@ export default function () { export function handleSummary(data) { return { - "result/load_stages/get_ride_data.result.html": htmlReport(data), + "result.get_ride_data.html": htmlReport(data), stdout: textSummary(data, { indent: " ", enableColors: true }), }; } diff --git a/loadtest/load_iteration.js b/loadtest/load_iteration.js deleted file mode 100644 index d1907ee..0000000 --- a/loadtest/load_iteration.js +++ /dev/null @@ -1,66 +0,0 @@ -import http from "k6/http"; -import { check } from "k6"; -import { htmlReport } from "https://raw.githubusercontent.com/benc-uk/k6-reporter/main/dist/bundle.js"; -import { textSummary } from "https://jslib.k6.io/k6-summary/0.0.1/index.js"; - -//scenario 3 (iteration, start time and graceful stop) -export const options = { - scenarios: { - shared_iter_scenario: { - executor: "shared-iterations", - vus: 100, - iterations: 200, - startTime: "0s", - gracefulStop: "25s", - }, - per_vu_scenario: { - executor: "per-vu-iterations", - vus: 100, - iterations: 10, - startTime: "10s", - gracefulStop: "20s", - }, - }, - thresholds: { - http_req_failed: ["rate<0.001"], // the error rate must be lower than 0.1% - http_req_duration: ["p(90)<1500"], // 90% of requests must complete below 600ms - http_req_receiving: ["max<150"], // slowest request below 150ms - iteration_duration: ["p(95)<2500"], // 95% of requests must complete below 2500ms - }, -}; - -export default function () { - const params = { - headers: { - "Content-Type": "application/json", - Authorization: - "Bearer eyJhbGciOiJIUzI1NiJ9.eyJkcml2ZXJfaWQiOjJ9.tGaH3DFnWlPnt6eFzSVKoiMshouJ_w8iiTdTHvIEHJQ", - }, - timeout: "600s", - }; - - const body = { - is_available: true, - current_location: { - longitude: 2, - latitude: 1 - } - }; - - const set_driver_available = http.patch( - "http://localhost:9999/v1/drivers/availability", - JSON.stringify(body), - params - ); - check(set_driver_available, { - "verify success response of set driver available": (set_driver_available) => - set_driver_available.status == 200, - }); -} - -export function handleSummary(data) { - return { - "result/load_iteration.html": htmlReport(data), - stdout: textSummary(data, { indent: " ", enableColors: true }), - }; -} diff --git a/loadtest/load_vuser_duration.js b/loadtest/load_vuser_duration.js deleted file mode 100644 index 6dfc99b..0000000 --- a/loadtest/load_vuser_duration.js +++ /dev/null @@ -1,52 +0,0 @@ -import http from "k6/http"; -import { check } from "k6"; -import { htmlReport } from "https://raw.githubusercontent.com/benc-uk/k6-reporter/main/dist/bundle.js"; -import { textSummary } from "https://jslib.k6.io/k6-summary/0.0.1/index.js"; - -//scenario 1 (load test vuser and duration) -export const options = { - vus: 350, // simulate number of users requesting the API - duration: "150s", // duration needed for users - - thresholds: { - http_req_failed: ["rate<0.001"], // the error rate must be lower than 0.1% - http_req_duration: ["p(90)<5000"], // 90% of requests must complete below 2000ms - http_req_receiving: ["max<17000"], // max receive request below 17000ms - }, -}; - -export default function () { - const params = { - headers: { - "Content-Type": "application/json", - Authorization: - "Bearer eyJhbGciOiJIUzI1NiJ9.eyJkcml2ZXJfaWQiOjJ9.tGaH3DFnWlPnt6eFzSVKoiMshouJ_w8iiTdTHvIEHJQ", - }, - timeout: "600s", - }; - - const body = { - is_available: true, - current_location: { - longitude: 2, - latitude: 1 - } - }; - - const set_driver_available = http.patch( - "http://localhost:9999/v1/drivers/availability", - JSON.stringify(body), - params - ); - check(set_driver_available, { - "verify success response of set driver available": (set_driver_available) => - set_driver_available.status == 200, - }); -} - -export function handleSummary(data) { - return { - "result/load_vuser_duration.html": htmlReport(data), - stdout: textSummary(data, { indent: " ", enableColors: true }), - }; -} diff --git a/loadtest/patch_availability.load_stages.js b/loadtest/patch_driver_availability.load_stages.js similarity index 70% rename from loadtest/patch_availability.load_stages.js rename to loadtest/patch_driver_availability.load_stages.js index e430b15..1b09f1d 100644 --- a/loadtest/patch_availability.load_stages.js +++ b/loadtest/patch_driver_availability.load_stages.js @@ -6,11 +6,11 @@ import { textSummary } from "https://jslib.k6.io/k6-summary/0.0.1/index.js"; //scenario 2 (load test based on stages) export const options = { stages: [ - { duration: "0.3m", target: 100 }, // simulate ramp-up of traffic from 1 to 100 users over 0.3 minute - { duration: "0.4m", target: 100 }, // stay at 100 users for 0.4 minute - { duration: "0.6m", target: 150 }, // simulate ramp-up of traffic from 100 to 200 users over 0.6 minute - { duration: "1m", target: 250 }, // simulate ramp-up to 300 users over 1 minute - { duration: "1.4m", target: 0 }, // simulate ramp-down to 0 users over 1.4 minute + { duration: "0.3m", target: 20 }, + { duration: "0.4m", target: 20 }, + { duration: "0.6m", target: 50 }, + { duration: "1m", target: 80 }, + { duration: "1.4m", target: 0 }, ], thresholds: { http_req_failed: ["rate<0.001"], // the error rate must be lower than 0.1% @@ -50,7 +50,7 @@ export default function () { export function handleSummary(data) { return { - "result/load_stages/patch_availability.result.html": htmlReport(data), + "result.patch_driver_availability.html": htmlReport(data), stdout: textSummary(data, { indent: " ", enableColors: true }), }; } diff --git a/loadtest/result/load_iteration.html b/loadtest/result/load_iteration.html deleted file mode 100644 index cb42baa..0000000 --- a/loadtest/result/load_iteration.html +++ /dev/null @@ -1,576 +0,0 @@ - - - - - - - - - - - - K6 Load Test: 2024-11-05 12:59 - - - - -

- -   K6 Load Test: 2024-11-05 12:59 -

- -
-
- -

Total Requests

-
1200
-
-
- -
- -

Failed Requests

-
0
-
- -
- -

Breached Thresholds

-
0
-
-
- -

Failed Checks

-
0
-
-
- -
- -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CountRateAverageMaximumMedianMinimum90th Percentile95th Percentile
http_req_duration--455.393261.32295.289.451123.961503.31
http_req_waiting--454.943261.03294.989.231123.421502.44
http_req_connecting--1.67121.19--0.200.95
http_req_tls_handshaking--------
http_req_sending--0.2413.910.060.000.150.62
http_req_receiving--0.211.450.180.050.320.40
http_req_blocked--1.76121.250.010.000.331.58
iteration_duration--457.633261.58296.909.711124.281515.07
-
- - - - -
- - -    Note. All times are in milli-seconds -
- - - - -
-
- -
-

Checks

- -
Passed
1200
-
Failed
0
-
- - - -
-

Iterations

- -
Total
1200
-
Rate
81.94/s
-
- - -
-

Virtual Users

- -
Min
0
-
Max
100
-
-
- -
-
-

Requests

- -
Total
1200
-
Rate
81.94/s
-
- -
-

Data Received

- -
Total
0.20 MB
-
Rate
0.01 mB/s
-
- -
-

Data Sent

- -
Total
0.40 MB
-
Rate
0.03 mB/s
-
-
-
- - - - -
- - - -

• Other Checks

- - - - - - - - - - - - - -
Check NamePassesFailures
verify success response of set driver available12000
-
- -
-
K6 Reporter v2.3.0 - Ben Coleman 2021, [GitHub]
- - diff --git a/loadtest/result/load_stages.html b/loadtest/result/load_stages.html deleted file mode 100644 index 7a952ea..0000000 --- a/loadtest/result/load_stages.html +++ /dev/null @@ -1,576 +0,0 @@ - - - - - - - - - - - - K6 Load Test: 2024-11-06 14:17 - - - - -

- -   K6 Load Test: 2024-11-06 14:17 -

- -
-
- -

Total Requests

-
52926
-
-
- -
- -

Failed Requests

-
2
-
- -
- -

Breached Thresholds

-
0
-
-
- -

Failed Checks

-
2
-
-
- -
- -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CountRateAverageMaximumMedianMinimum90th Percentile95th Percentile
http_req_duration--574.8510346.85300.754.181465.362079.80
http_req_waiting--574.6010346.82300.514.051465.142079.49
http_req_connecting--0.0076.99----
http_req_tls_handshaking--------
http_req_sending--0.062.390.050.010.100.11
http_req_receiving--0.1911.530.17-0.280.33
http_req_blocked--0.0177.170.010.000.010.01
iteration_duration--575.1710347.36301.084.361465.662080.12
-
- - - - -
- - -    Note. All times are in milli-seconds -
- - - - -
-
- -
-

Checks

- -
Passed
52924
-
Failed
2
-
- - - -
-

Iterations

- -
Total
52926
-
Rate
238.40/s
-
- - -
-

Virtual Users

- -
Min
1
-
Max
250
-
-
- -
-
-

Requests

- -
Total
52926
-
Rate
238.40/s
-
- -
-

Data Received

- -
Total
8.68 MB
-
Rate
0.04 mB/s
-
- -
-

Data Sent

- -
Total
17.73 MB
-
Rate
0.08 mB/s
-
-
-
- - - - -
- - - -

• Other Checks

- - - - - - - - - - - - - -
Check NamePassesFailures
verify success response of set driver available529242
-
- -
-
K6 Reporter v2.3.0 - Ben Coleman 2021, [GitHub]
- - diff --git a/loadtest/result/load_stages/.gitkeep b/loadtest/result/load_stages/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/loadtest/result/load_vuser_duration.html b/loadtest/result/load_vuser_duration.html deleted file mode 100644 index bde37f7..0000000 --- a/loadtest/result/load_vuser_duration.html +++ /dev/null @@ -1,576 +0,0 @@ - - - - - - - - - - - - K6 Load Test: 2024-11-05 17:20 - - - - -

- -   K6 Load Test: 2024-11-05 17:20 -

- -
-
- -

Total Requests

-
28088
-
-
- -
- -

Failed Requests

-
136
-
- -
- -

Breached Thresholds

-
1
-
-
- -

Failed Checks

-
136
-
-
- -
- -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CountRateAverageMaximumMedianMinimum90th Percentile95th Percentile
http_req_duration--1878.0420716.401325.3010.594291.705590.11
http_req_waiting--1877.7820716.371325.0210.344291.455589.80
http_req_connecting--0.3699.93----
http_req_tls_handshaking--------
http_req_sending--0.067.480.040.010.110.14
http_req_receiving--0.2026.930.15-0.300.41
http_req_blocked--0.38151.810.010.000.010.02
iteration_duration--1878.8020716.891326.0510.884292.505591.78
-
- - - - -
- - -    Note. All times are in milli-seconds -
- - - - -
-
- -
-

Checks

- -
Passed
27952
-
Failed
136
-
- - - -
-

Iterations

- -
Total
28088
-
Rate
185.15/s
-
- - -
-

Virtual Users

- -
Min
177
-
Max
350
-
-
- -
-
-

Requests

- -
Total
28088
-
Rate
185.15/s
-
- -
-

Data Received

- -
Total
4.58 MB
-
Rate
0.03 mB/s
-
- -
-

Data Sent

- -
Total
9.41 MB
-
Rate
0.06 mB/s
-
-
-
- - - - -
- - - -

• Other Checks

- - - - - - - - - - - - - -
Check NamePassesFailures
verify success response of set driver available27952136
-
- -
- - -