GithubHelp home page GithubHelp logo

tboox / benchbox Goto Github PK

View Code? Open in Web Editor NEW
32.0 4.0 11.0 21.79 MB

🧀 The Benchmark Testing Box

Home Page: https://tboox.org

License: Apache License 2.0

Lua 21.13% C 55.84% C++ 18.49% Go 4.53%
tbox xmake benchmark coroutine

benchbox's Introduction

The Benchmark Testing Box

Join the chat at https://gitter.im/waruqi/tboox donate

Introduction

Benchbox is a benchmark testing utilities.

Build

Please install xmake first: xmake

    $ xmake

Run case

    $ xmake coroutine -n switch
or  $ xmake coroutine --casename switch

    $ xmake coroutine -n channel
or  $ xmake coroutine --casename channel

Reports

If you want to look the testing results, please refer to reports.

List tests

    $ xmake --help

The results:

    ...

Tasks: 
       coroutine         The coroutine benchmark.
       other             The other benchmark.

List cases

    $ xmake coroutine --help

The results:

The coroutine benchmark.

Options: 

    ...

    -n CASENAME, --casename=CASENAME       The case name.
                                               - switch
                                               - channel

Contacts

简介

Benchbox是一个基准测试包,里面包含许多针对第三方库功能的性能基准测试和对比。

例如:各大开源协程库性能基准测试,等等

编译

请先安装: xmake

然后运行:

    $ xmake

运行测试case

    $ xmake coroutine -n switch
or  $ xmake coroutine --casename switch

    $ xmake coroutine -n channel
or  $ xmake coroutine --casename channel

测试报告

如果想要查看已有的测试结果,请参考:测试报告.

显示所有测试用例

    $ xmake --help

结果如下:

    ...

Tasks: 
       coroutine         The coroutine benchmark.
       other             The other benchmark.

显示某个测试的所有case

    $ xmake coroutine --help

结果如下:

The coroutine benchmark.

Options: 

    ...

    -n CASENAME, --casename=CASENAME       The case name.
                                               - switch
                                               - channel

联系方式

benchbox's People

Contributors

waruqi avatar yyzybb537 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

benchbox's Issues

测试指令无法运行

注:提问题时若使用不能用/没效果/有问题/报错此类模糊表达,但又没有根据下面的模板给出任何相关辅助信息的,将绝对不会有任何反馈。

描述问题

运行 xmake coroutine --casename=switch 测试出错

期待的结果

tbox:               10000000 switches in 187 ms, 53475935 switches per second
boost:              10000000 switches in 199 ms, 50251256 switches per second
libmill:            10000000 switches in 145 ms, 68965517 switches per second
libtask:            10000000 switches in 5280 ms, 1893939 switches per second
libgo(boost):       10000000 switches in 1086 ms, 9208103 switches per second
libco:              10000000 switches in 687 ms, 14556040 switches per second
coroutine(cloudwu): 10000000 switches in 5181 ms, 1930129 switches per second
libfiber(acl):      10000000 switches in 342 ms, 29239766 switches per second
golang:             10000000 switches in 1200 ms, 8333333 switches per second

错误信息

❯ xmake                                                     
note: install or modify (m) these packages (pass -y to skip confirm)?
in xmake-repo:
  -> libmill 1.18 [optional]
in benchbox-repo:
  -> libfiber master [optional]
please input: y (y/n/m)
n
[100%]: build ok!
❯ xmake coroutine --casename=switch -D -v           
finding libtask from xmake ..
finding libfiber from xmake ..
finding libmill from xmake ..
finding libfiber from brew ..
finding libmill from brew ..
finding libgo from xmake ..
finding libco from xmake ..
finding coroutine from xmake ..
finding libaco from xmake ..
finding bzip2 from xmake ..
finding zlib from xmake ..
finding zlib from pacman ..
finding zlib1g-dev from apt ..
finding libfiber from vcpkg ..
checkinfo: vcpkg root directory not found, maybe you need set $VCPKG_ROOT!
finding libfiber from conan ..
finding libfiber from pkgconfig ..
finding libmill from vcpkg ..
checkinfo: vcpkg root directory not found, maybe you need set $VCPKG_ROOT!
finding libmill from conan ..
finding libmill from pkgconfig ..
finding boost from xmake ..
finding tbox from xmake ..
finding libfiber from system ..
finding libmill from system ..
error: @programdir/core/main.lua:279: @programdir/core/sandbox/modules/import/core/base/task.lua:65: @programdir/core/sandbox/modules/import/core/base/task.lua:65: @programdir/actions/config/main.lua:113: project and targets may have been loaded early!
stack traceback:
    [C]: in function 'error'
    [@programdir/core/base/os.lua:829]: in function 'raiselevel'
    [@programdir/core/sandbox/modules/utils.lua:181]: in function 'assert'
    [@programdir/actions/config/main.lua:113]: in function '_check_targets'
    [@programdir/actions/config/main.lua:416]:
    [C]: in function 'load'
    [@programdir/core/base/task.lua:519]: in function 'run'
    [@programdir/core/sandbox/modules/import/core/base/task.lua:63]: in function 'run'
    [@programdir/actions/run/main.lua:186]:
    [C]: in function 'load'
    [@programdir/core/base/task.lua:519]: in function 'run'
    [@programdir/core/sandbox/modules/import/core/base/task.lua:63]: in function 'run'
    [./src/xmake.lua:33]:
    [C]: in function 'load'
    [@programdir/core/base/task.lua:519]: in function 'run'
    [@programdir/core/main.lua:277]: in function 'cotask'
    [@programdir/core/base/scheduler.lua:365]:

stack traceback:
        [C]: in function 'error'
        @programdir/core/base/os.lua:829: in function 'raise'
        @programdir/core/main.lua:279: in function 'cotask'
        @programdir/core/base/scheduler.lua:365: in function <@programdir/core/base/scheduler.lua:362>

相关环境

❯ uname -a    
Linux sun-desktop 5.11.0-36-generic #40~20.04.1-Ubuntu SMP Sat Sep 18 02:14:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
❯ gcc -v           
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) 

其他信息

第一次 libfiber和libmill 自动安装没有成功,运行如上所示
删除src/下libfiber和libmill相关,再次运行也如上所示

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.