This project is a Go application designed to connect to multiple GRPC endpoints, track their performance, and report metrics such as transactions per second (TPS), latency, and error rates. It is particularly useful for monitoring the performance of blockchain nodes or other GRPC services.
- Vibe coded changes to test which endpoint receives tx first and delay between them
- Connects to multiple GRPC endpoints.
- Tracks and reports metrics like TPS, latency, and error rates.
- Supports secure connections using TLS.
- Configurable via environment variables.
- Go 1.16 or later
- Access to GRPC endpoints
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Create a
.envfile: Create a.envfile in the root directory of the project and add your provider details:PROVIDER1_HOST= PROVIDER1_PORT= PROVIDER1_TOKEN= PROVIDER1_USE_TLS=false PROVIDER2_HOST= PROVIDER2_PORT= PROVIDER2_TOKEN= PROVIDER2_USE_TLS=true can rename PROVIDER to whatever and add as many grpc as needed -
Install dependencies: Ensure you have the necessary Go packages installed. You can use
go mod tidyto install any missing dependencies. -
Run the application:
go run main.go
- The application will automatically connect to the endpoints specified in the
.envfile. - It will run for a predefined duration and then output a performance report comparing the endpoints.
- Modify the
.envfile to change the endpoints and their connection details. - Adjust the
TestDurationSecconstant inmain.goto change the test duration.
- Provider1 is configured to use an insecure connection (
UseTLS=false) for testing purposes. This is intentional to demonstrate how the application handles both secure and insecure connections. Ensure that in a production environment, all connections are secured using TLS.