Coder Social home page Coder Social logo

nbson_bench's Introduction

nbson_bench

nbson_bench is an OTP library to benchmark nbson.

Benchmarking

The nbson_BENCH script under priv measures the decoding and encoding times for a series of BSONs containing from 1 to 1M documents using nbson. This escript also executes such deserializations using bson-erlang, a well-known BSON encoder/decoder, for comparison purposes. To execute the benchmark yourself, please run rebar3 compile before executing the script.

Executing the measurement using the .bson files under priv/data produced the table below. Each row corresponds to measuring the decoding time of the BSONs in a given file. The first column specifies the number of documents inside each BSON file, the second column specifies the byte sizes for each of those BSONs and the third and fourth columns show the measured times in µs for nbson and bson-erlang respectively.

You can also execute these benchmarks by running a shell and using the nbson_bench API.

--------------------------------------------------------------------------------------
DECODING PROCESS
--------------------------------------------------------------------------------------
    Size (documents)     File size (bytes)       Nbson Time (µs)  BsonErlang Time (µs)
                   1                   150                     1                     2
                  10                  2156                     0                     0
                 100                 21439                     3                     8
                1000                208773                    38                    77
               10000               2035919                   802                  1897
              100000              20365952                 12768                 28070
--------------------------------------------------------------------------------------
ENCODING PROCESS
--------------------------------------------------------------------------------------
    Size (documents)     File size (bytes)       Nbson Time (µs)  BsonErlang Time (µs)
                   1                   150                     1                     1
                  10                  2156                     0                     0
                 100                 21439                     2                     6
                1000                208773                    33                    66
               10000               2035919                   528                   783
              100000              20365952                  6842                  8572

Those used .bson files were generated using the nbson_corpus Erlang library.

nbson_bench's People

Contributors

alberdi avatar loissotolopez avatar

Watchers

Miguel Rubinos Rodríguez avatar Juan avatar Jose E. Cribeiro Aneiros avatar  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.