Code Monkey home page Code Monkey logo

node-benchmarking-service's Introduction

Description

This service tests performance of BTC and EVM nodes by replicating real-world patterns with specific JSON-RPC payloads. 

Usage

After making the .env file based on the .env.example provided, use

docker-compose up

in this project's directory

Service Architecture

Benchmarking service architecture

REGISTER JOB

POST /jobs

Request Example 1:

{
	"chain": "EVM",
    "endpoint": "https://endpoints.omniatech.io/v1/<chain>/<endpoint-uuid>"
	"threads": 20,
	"duration": 60
}

Request Example 2:

{
	"chain": "BTC",
    "endpoint": "https://endpoints.omniatech.io/v1/<chain>/<endpoint-uuid>"
	"threads": 10,
	"duration": 60
}

Request Example 3:

{
	"chain": "EVM",
    "endpoint": "https://endpoints.omniatech.io/v1/<chain>/<endpoint-uuid>"
	"threads": 20,
	"duration": 60,
	"authorization": "Basic YWxleDoxMjM0"
}

Request Example 4:

{
	"chain": "EVM",
    "endpoint": "https://endpoints.omniatech.io/v1/<chain>/<endpoint-uuid>"
	"threads": 10,
	"duration": 60,
	"authorization": "Bearer MHnQx2fd4714ooTXZTq9"
}

Response Example 1:

201 OK
{
	"id": "l4xt7lgaMdJvBF9K8cO6w4u7djc0pH"
}

Response Example 2:

400 BadRequest
{
    "error": "Failed to deserialize TodoJob object Cause: missing field <field_name>"
}

Response Example 3:

500 InternalServerError
{
    "error": "<message>"
}

GET JOB BY ID

GET /jobs/{job_id}

Request Example:

GET /jobs/l4xt7lgaMdJvBF9K8cO6w4u7djc0pH

Response Example 1:

200 OK
{
	"status": "PENDING"
}

Response Example 2:

200 OK
{
	"status": "ERRORED"
}

Response Example 3:

200 OK
{
	"status": "FINISHED",
	"rps": 70
}

Response Example 4:

404 NotFound
<empty-body>

Response Example 5:

500 InternalServerError
{
    "error": "<message>"
}

node-benchmarking-service's People

Contributors

oprea-alex avatar omniaprotocol avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.