{"id":23074488,"url":"https://github.com/iamazeem/spdlog-vs-zlog","last_synced_at":"2025-10-23T22:32:23.994Z","repository":{"id":188440480,"uuid":"678300694","full_name":"iamazeem/spdlog-vs-zlog","owner":"iamazeem","description":"spdlog vs zlog benchmarks","archived":false,"fork":false,"pushed_at":"2024-02-12T07:10:34.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-16T08:34:49.424Z","etag":null,"topics":["benchmarks","cpp","spdlog","zlog"],"latest_commit_sha":null,"homepage":"https://github.com/iamazeem/spdlog-vs-zlog","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamazeem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-14T08:26:26.000Z","updated_at":"2023-08-16T04:13:50.000Z","dependencies_parsed_at":"2024-01-24T12:31:14.633Z","dependency_job_id":"8383bad7-5838-4d5d-8b45-0677d5f4b179","html_url":"https://github.com/iamazeem/spdlog-vs-zlog","commit_stats":null,"previous_names":["iamazeem/spdlog-vs-zlog"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamazeem%2Fspdlog-vs-zlog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamazeem%2Fspdlog-vs-zlog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamazeem%2Fspdlog-vs-zlog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamazeem%2Fspdlog-vs-zlog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamazeem","download_url":"https://codeload.github.com/iamazeem/spdlog-vs-zlog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237890774,"owners_count":19382565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmarks","cpp","spdlog","zlog"],"created_at":"2024-12-16T08:28:38.512Z","updated_at":"2025-10-23T22:32:13.983Z","avatar_url":"https://github.com/iamazeem.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spdlog-vs-zlog\n\n[![ci](https://github.com/iamazeem/spdlog-vs-zlog/actions/workflows/ci.yml/badge.svg)](https://github.com/iamazeem/spdlog-vs-zlog/actions/workflows/ci.yml)\n\nspdlog vs zlog benchmarks\n\n- [spdlog 1.13.0](https://github.com/gabime/spdlog/releases/tag/v1.13.0)\n- [zlog 1.2.16](https://github.com/HardySimpson/zlog/releases/tag/1.2.16)\n  - Both [`zlog_*`](https://hardysimpson.github.io/zlog/UsersGuide-EN.html#htoc28)\n    and [`dzlog_*`](https://hardysimpson.github.io/zlog/UsersGuide-EN.html#htoc33)\n    APIs are benchmarked.\n  - See [zlog.conf](zlog.conf) and [dzlog.conf](dzlog.conf) for their\n    respective configurations.\n\nTested on Linux and macOS runners via CI. See the most recent run under\n[Actions](https://github.com/iamazeem/spdlog-vs-zlog/actions) tab for the latest\nresults.\n\n## Scenario\n\nComparing `spdlog` and `zlog` in multithreaded context with file rotation.\n\n### Default Parameters\n\n- Threads: 10\n- Iterations: 1,000,000 (100,000 per thread)\n- Rotation: 10 MB (5 files)\n- Optimization Level: `O3`\n\n## Setup\n\nClone:\n\n```shell\ngit clone --recursive https://github.com/iamazeem/spdlog-vs-zlog.git\ncd spdlog-vs-zlog\n```\n\nBuild `zlog` :\n\n```shell\ncd zlog\nmake PREFIX=$PWD/build\nmake PREFIX=$PWD/build install\ncd ..\n```\n\n## Build\n\n```shell\ncmake -S . -B build\ncmake --build build\n```\n\nor,\n\n```shell\nmkdir build\ncd build\ncmake ..\nmake\n```\n\n## Run\n\n```shell\n$ cd build\n$ ./spdlog-vs-zlog\n[2024-02-06 15:05:17.122] [info] threads: 10, iterations: 100,000 per thread\n[2024-02-06 15:05:18.910] [info] spdlog, elapsed time:   1.79 secs, logs/sec:     55,925/sec\n[2024-02-06 15:06:46.941] [info]   zlog, elapsed time:  88.03 secs, logs/sec:      1,135/sec\n[2024-02-06 15:08:13.512] [info]  dzlog, elapsed time:  86.57 secs, logs/sec:      1,155/sec\n```\n\nThe rotated log files are generated under `/tmp` directory:\n\n```shell\nls /tmp/{spdlog,zlog,dzlog}*\n```\n\nThe [CI workflow](.github/workflows/ci.yml) removes these log files after each\niteration:\n\n```shell\nfor i in {1..5}; do\n    echo \"Run $i\"\n    ./spdlog-vs-zlog\n    echo\n    rm /tmp/{spdlog,zlog,dzlog}*\ndone\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamazeem%2Fspdlog-vs-zlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamazeem%2Fspdlog-vs-zlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamazeem%2Fspdlog-vs-zlog/lists"}