Code Monkey home page Code Monkey logo

pref-cloud's Introduction

http benchmark server

This is a simple http server that can be used to benchmark http clients.

Usage

$ go run .

this will start a server on port 8080. You can change the port by setting the PORT environment variable.

Example

  • Request POST /test : This endpoint will return a 200 status code with a response body of {"status": "ok"}.
```json
{
  "url":"http://localhost:9001/board",
  "method":"POST",
  "numUsers":10,
  "numReqs":1000
}
  • Response POST /test 200

We serve the response in the following format:

{
  "ID": 26,
  "CreatedAt": "2024-02-27T21:30:21.618101+09:00",
  "UpdatedAt": "2024-02-27T21:30:21.618101+09:00",
  "DeletedAt": null,
  "url": "http://localhost:9001/board",
  "method": "POST",
  "total_requests": 10000,
  "total_errors": 0,
  "total_success": 10000,
  "StatusCodeCount": {
    "200": 10000
  },
  "total_users": 10,
  "total_duration": 1,
  "mttfb_average": "28.188ms",
  "MTTFBPercentiles": {
    "p50": "13.386ms",
    "p75": "23.908ms",
    "p90": "49.640ms",
    "p95": "103.998ms",
    "p99": "224.680ms"
  },
  "tps_average": 5883650.805324704,
  "TPSPercentiles": {
    "p50": 312,
    "p75": 113,
    "p90": 54,
    "p95": 23,
    "p99": 17
  }
}

pref-cloud's People

Contributors

ghkdqhrbals2 avatar ghkdqhrbals avatar

Watchers

 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.