Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 2.71 KB

README.md

File metadata and controls

49 lines (36 loc) · 2.71 KB

Benchmark

This tool runs benchmarking of deserialization performance with the Google Benchmark library (tag: v1.8.4, the latest version supporting C++11) against fkYAML and some C++ YAML library.

Used YAML library for Comparison

Currently, the following C++ YAML libraries tagged with the specified versions respectively:

Currently, the following files are located in the tool/benchmark/cases directory for benchmarking:

  • ubuntu.yml
    • a copy from the .github/workflows directory at the point of the commit 7092059
    • for the benchmarking of an ordinary size/content benchmark
  • citm_catalog.json
  • citm_catalog.yml
    • a YAML version of citm_catalog.json
    • for the benchmarking of a large YAML file

Suggestions are always welcome. Please open a discussion or create a PR.

How to Use

Build and run this tool with the following commands:

$ cd path/to/fkYAML
$ cmake -S . -B build -DCMAKE_BUILD_TYPE={Debug|Release} -DFK_YAML_RUN_BENCHMARK=ON
$ cmake --build build --config {Debug|Release}

# You can specify an arbitrary input file such as /foo/bar/sample.yml or /foo/bar/sample.json
$ ./build/tool/benchmark/benchmarker ./tool/benchmark/macos.yml

Then, you should see a console ouput from the Google Benchmark library in the following format.

-------------------------------------------------------------------------------------
Benchmark                           Time             CPU   Iterations UserCounters...
-------------------------------------------------------------------------------------
bm_fkyaml_parse                 xxxxx ns        xxxxx ns        xxxxx bytes_per_second=xx.xxxxMi/s items_per_second=xx.xxxxk/s
...

Visit the user guide in the Google Benchmark repository for more information on the output format.