GithubHelp home page GithubHelp logo

hlc's Introduction

CUP

Текущий экземпляр проекта только для демонстрации стиля написания кода.

Проект был написан для участия в конкурсе HighLoad Cup от Mail.ru https://highloadcup.ru/rating/

В момент участия в проекте входил в топ 50 по скорости.

TODO:

  1. Выложить тестовые данные, что бы можно было запустить проект с данными.
  2. Написать тесты для компонентов. Тесты не были изначально написаны, тк проект тестировался при его запуске.

It's fine!

Ideas

Install

Prepare go code

go get -d github.com/eaglemoor/hlc

make deps
make gen

Run with docker

make run

Run native

Prepare test data

make data-unpack-train

Run

go build -o ./bin/app && ./bin/app -data-path ./data/data -http :3000

or

make run

Run test

make tester

Benchmarks

net/http

Running 10s test @ http://127.0.0.1:3000
  8 threads and 200 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     2.22ms  311.40us   8.50ms   81.79%
    Req/Sec    11.26k   598.64    15.62k    72.99%
  903830 requests in 10.10s, 1.13GB read
  Socket errors: connect 0, read 61, write 0, timeout 0
Requests/sec:  89473.87
Transfer/sec:    114.26MB

fasthttp

Running 10s test @ http://127.0.0.1:3000
  8 threads and 200 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.94ms  229.96us   6.01ms   83.22%
    Req/Sec    12.90k   768.43    14.46k    68.77%
  1036356 requests in 10.10s, 1.31GB read
  Socket errors: connect 0, read 52, write 0, timeout 0
Requests/sec: 102596.05
Transfer/sec:    132.77MB

fasthttp + fasthttprouter

Running 10s test @ http://127.0.0.1:3000
  8 threads and 200 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.99ms  251.82us   5.38ms   82.00%
    Req/Sec    12.60k   833.37    14.14k    68.28%
  1011510 requests in 10.10s, 1.28GB read
  Socket errors: connect 0, read 60, write 0, timeout 0
Requests/sec: 100144.41
Transfer/sec:    129.60MB

hlc's People

Contributors

eaglemoor avatar

Watchers

 avatar  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.