├── .github └── workflows │ └── benchmarks.yml ├── .gitignore ├── LICENSE ├── README.md ├── apex_test.go ├── bench.json ├── bench_test.go ├── docs ├── chart.js ├── dist │ └── main.js ├── favicon.png ├── index.html ├── justfile ├── main.css ├── main.js ├── package-lock.json ├── package.json ├── pnpm-lock.yaml └── screenshot.png ├── go.mod ├── go.sum ├── log15_test.go ├── logf_test.go ├── logrus_test.go ├── phuslog_test.go ├── screenshot.png ├── setup_test.go ├── slog_test.go ├── slog_zap_test.go ├── zap_test.go └── zerolog_test.go /.github/workflows/benchmarks.yml: -------------------------------------------------------------------------------- 1 | name: Update benchmarks 2 | on: 3 | workflow_dispatch: 4 | schedule: 5 | - cron: '0 0 * * 0' 6 | push: 7 | branches: 8 | - main 9 | 10 | jobs: 11 | run_benchmark: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@v4 16 | with: 17 | ref: ${{ github.head_ref }} 18 | 19 | - name: Set up Go 20 | uses: actions/setup-go@v4 21 | with: 22 | go-version: '1.21' 23 | check-latest: true 24 | 25 | - name: Set up Node.js 26 | uses: actions/setup-node@v4 27 | with: 28 | node-version: 20 29 | 30 | - name: Install the latest versions of each library 31 | run: go get -u ./... && go mod tidy 32 | 33 | - name: Install gobenchdata 34 | run: go install go.bobheadxi.dev/gobenchdata@latest 35 | 36 | - name: Benchmark Go Logging Libraries 37 | run: go test -bench . -benchmem ./... | gobenchdata --json bench.json 38 | 39 | - name: Install dependencies 40 | working-directory: ./docs 41 | run: npm install 42 | 43 | - name: Bundle 44 | working-directory: ./docs 45 | run: npm run build:prod 46 | 47 | - name: Commit benchmark results to repo 48 | uses: EndBug/add-and-commit@v9 49 | with: 50 | message: Update benchmark results 51 | commit: '--no-verify' 52 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules 3 | 4 | # testing 5 | coverage 6 | 7 | # misc 8 | .DS_Store 9 | *.map 10 | 11 | # Logs 12 | logs 13 | *.log 14 | npm-debug.log* 15 | yarn-debug.log* 16 | yarn-error.log* 17 | 18 | # Environmental variables 19 | .env 20 | .env.test 21 | tags 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2021 BetterStack 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Go Logging Benchmarks 2 | 3 | ![Benchmark results](screenshot.png) 4 | 5 | This repo compares the performance of popular 6 | [Go Logging Libraries](https://betterstack.com/community/guides/logging/best-golang-logging-libraries/) 7 | including the new Slog package. 8 | 9 | [See the results](https://betterstack-community.github.io/go-logging-benchmarks/). 10 | 11 | The following libraries are being tested: 12 | 13 | - [Zerolog](https://github.com/rs/zerolog) 14 | - [Zap](https://github.com/uber-go/zap) 15 | - [Apex/log](https://github.com/apex/log) 16 | - [Logrus](https://github.com/sirupsen/logrus) 17 | - [Slog](https://pkg.go.dev/log/slog) 18 | - [SlogZap](https://github.com/uber-go/zap/tree/master/exp/zapslog) (Slog with 19 | Zap backend) 20 | - [Phuslog](https://github.com/phuslu/log) 21 | - [Log15](https://github.com/inconshreveable/log15) 22 | - [Logf](https://github.com/zerodha/logf) 23 | 24 | ## 🟢 Prerequisites 25 | 26 | You only need [a recent version of Go](https://go.dev/doc/install) to execute 27 | the benchmarks. 28 | 29 | ## 📦 Getting started 30 | 31 | - Clone the repository to your computer: 32 | 33 | ```bash 34 | git clone https://github.com/betterstack-community/go-logging-benchmarks 35 | ``` 36 | 37 | ```bash 38 | cd go-logging-benchmarks 39 | ``` 40 | 41 | - Download the dependencies: 42 | 43 | ```bash 44 | go mod tidy 45 | ``` 46 | 47 | - Execute the benchmarks: 48 | 49 | ```bash 50 | go test -bench=. -benchmem 51 | ``` 52 | 53 | ## ⚖ License 54 | 55 | The code used in this project and in the linked tutorial are licensed under the 56 | [Apache License, Version 2.0](LICENSE). 57 | 58 | ## 🤝 Contribute 59 | 60 | If you found an issue with the benchmarks, or you want to propose a new library 61 | for benchmarking, please open an issue or pull request accordingly. 62 | -------------------------------------------------------------------------------- /apex_test.go: -------------------------------------------------------------------------------- 1 | package bench 2 | 3 | import ( 4 | "io" 5 | 6 | apex "github.com/apex/log" 7 | "github.com/apex/log/handlers/json" 8 | ) 9 | 10 | func apexFields() apex.Fields { 11 | return apex.Fields{ 12 | "bytes": ctxBodyBytes, 13 | "request": ctxRequest, 14 | "elapsed_time_ms": ctxTimeElapsedMs, 15 | "user": ctxUser, 16 | "now": ctxTime, 17 | "months": ctxMonths, 18 | "primes": ctxFirst10Primes, 19 | "users": ctxUsers, 20 | "error": ctxErr, 21 | } 22 | } 23 | 24 | func newApex(w io.Writer) *apex.Logger { 25 | writer := json.New(w) 26 | 27 | return &apex.Logger{ 28 | Handler: writer, 29 | Level: apex.InfoLevel, 30 | } 31 | } 32 | 33 | type apexBench struct { 34 | l apex.Interface 35 | } 36 | 37 | func (b *apexBench) new(w io.Writer) logBenchmark { 38 | return &apexBench{ 39 | l: newApex(w), 40 | } 41 | } 42 | 43 | func (b *apexBench) newWithCtx(w io.Writer) logBenchmark { 44 | return &apexBench{ 45 | l: newApex(w).WithFields(apexFields()), 46 | } 47 | } 48 | 49 | func (b *apexBench) name() string { 50 | return "Apex" 51 | } 52 | 53 | func (b *apexBench) logEvent(msg string) { 54 | b.l.Info(msg) 55 | } 56 | 57 | func (b *apexBench) logEventFmt(msg string, args ...any) { 58 | b.l.Infof(msg, args...) 59 | } 60 | 61 | func (b *apexBench) logEventCtx(msg string) { 62 | b.l.WithFields(apexFields()).Info(msg) 63 | } 64 | 65 | func (b *apexBench) logEventCtxWeak(msg string) { 66 | b.logEventCtx(msg) 67 | } 68 | 69 | func (b *apexBench) logDisabled(msg string) { 70 | b.l.Debug(msg) 71 | } 72 | 73 | func (b *apexBench) logDisabledFmt(msg string, args ...any) { 74 | b.l.Debugf(msg, args...) 75 | } 76 | 77 | func (b *apexBench) logDisabledCtx(msg string) { 78 | b.l.WithFields(apexFields()).Debug(msg) 79 | } 80 | 81 | func (b *apexBench) logDisabledCtxWeak(msg string) { 82 | b.logDisabledCtx(msg) 83 | } 84 | -------------------------------------------------------------------------------- /bench.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Date": 1748737555, 4 | "Suites": [ 5 | { 6 | "Goos": "linux", 7 | "Goarch": "amd64", 8 | "Pkg": "github.com/betterstack-community/go-logging-benchmarks", 9 | "Benchmarks": [ 10 | { 11 | "Name": "BenchmarkEvent/Zerolog-4", 12 | "Runs": 9962653, 13 | "NsPerOp": 122.4, 14 | "Mem": { 15 | "BytesPerOp": 0, 16 | "AllocsPerOp": 0, 17 | "MBPerSec": 0 18 | } 19 | }, 20 | { 21 | "Name": "BenchmarkEvent/Phuslog-4", 22 | "Runs": 12652782, 23 | "NsPerOp": 94.82, 24 | "Mem": { 25 | "BytesPerOp": 0, 26 | "AllocsPerOp": 0, 27 | "MBPerSec": 0 28 | } 29 | }, 30 | { 31 | "Name": "BenchmarkEvent/Zap-4", 32 | "Runs": 4257164, 33 | "NsPerOp": 244, 34 | "Mem": { 35 | "BytesPerOp": 0, 36 | "AllocsPerOp": 0, 37 | "MBPerSec": 0 38 | } 39 | }, 40 | { 41 | "Name": "BenchmarkEvent/ZapSugar-4", 42 | "Runs": 4403863, 43 | "NsPerOp": 301, 44 | "Mem": { 45 | "BytesPerOp": 16, 46 | "AllocsPerOp": 1, 47 | "MBPerSec": 0 48 | } 49 | }, 50 | { 51 | "Name": "BenchmarkEvent/Slog-4", 52 | "Runs": 3189133, 53 | "NsPerOp": 385.5, 54 | "Mem": { 55 | "BytesPerOp": 0, 56 | "AllocsPerOp": 0, 57 | "MBPerSec": 0 58 | } 59 | }, 60 | { 61 | "Name": "BenchmarkEvent/SlogZap-4", 62 | "Runs": 2749341, 63 | "NsPerOp": 437.5, 64 | "Mem": { 65 | "BytesPerOp": 0, 66 | "AllocsPerOp": 0, 67 | "MBPerSec": 0 68 | } 69 | }, 70 | { 71 | "Name": "BenchmarkEvent/Apex-4", 72 | "Runs": 824908, 73 | "NsPerOp": 1323, 74 | "Mem": { 75 | "BytesPerOp": 240, 76 | "AllocsPerOp": 5, 77 | "MBPerSec": 0 78 | } 79 | }, 80 | { 81 | "Name": "BenchmarkEvent/Logrus-4", 82 | "Runs": 466008, 83 | "NsPerOp": 2418, 84 | "Mem": { 85 | "BytesPerOp": 1113, 86 | "AllocsPerOp": 23, 87 | "MBPerSec": 0 88 | } 89 | }, 90 | { 91 | "Name": "BenchmarkEvent/Log15-4", 92 | "Runs": 301350, 93 | "NsPerOp": 3736, 94 | "Mem": { 95 | "BytesPerOp": 1432, 96 | "AllocsPerOp": 20, 97 | "MBPerSec": 0 98 | } 99 | }, 100 | { 101 | "Name": "BenchmarkEvent/Logf-4", 102 | "Runs": 6059784, 103 | "NsPerOp": 193.2, 104 | "Mem": { 105 | "BytesPerOp": 0, 106 | "AllocsPerOp": 0, 107 | "MBPerSec": 0 108 | } 109 | }, 110 | { 111 | "Name": "BenchmarkDisabled/Zerolog-4", 112 | "Runs": 479396971, 113 | "NsPerOp": 2.503, 114 | "Mem": { 115 | "BytesPerOp": 0, 116 | "AllocsPerOp": 0, 117 | "MBPerSec": 0 118 | } 119 | }, 120 | { 121 | "Name": "BenchmarkDisabled/Phuslog-4", 122 | "Runs": 512578921, 123 | "NsPerOp": 2.343, 124 | "Mem": { 125 | "BytesPerOp": 0, 126 | "AllocsPerOp": 0, 127 | "MBPerSec": 0 128 | } 129 | }, 130 | { 131 | "Name": "BenchmarkDisabled/Zap-4", 132 | "Runs": 293791959, 133 | "NsPerOp": 4.084, 134 | "Mem": { 135 | "BytesPerOp": 0, 136 | "AllocsPerOp": 0, 137 | "MBPerSec": 0 138 | } 139 | }, 140 | { 141 | "Name": "BenchmarkDisabled/ZapSugar-4", 142 | "Runs": 61955439, 143 | "NsPerOp": 18.51, 144 | "Mem": { 145 | "BytesPerOp": 16, 146 | "AllocsPerOp": 1, 147 | "MBPerSec": 0 148 | } 149 | }, 150 | { 151 | "Name": "BenchmarkDisabled/Slog-4", 152 | "Runs": 295651369, 153 | "NsPerOp": 4.06, 154 | "Mem": { 155 | "BytesPerOp": 0, 156 | "AllocsPerOp": 0, 157 | "MBPerSec": 0 158 | } 159 | }, 160 | { 161 | "Name": "BenchmarkDisabled/SlogZap-4", 162 | "Runs": 247979926, 163 | "NsPerOp": 4.847, 164 | "Mem": { 165 | "BytesPerOp": 0, 166 | "AllocsPerOp": 0, 167 | "MBPerSec": 0 168 | } 169 | }, 170 | { 171 | "Name": "BenchmarkDisabled/Apex-4", 172 | "Runs": 384181666, 173 | "NsPerOp": 2.971, 174 | "Mem": { 175 | "BytesPerOp": 0, 176 | "AllocsPerOp": 0, 177 | "MBPerSec": 0 178 | } 179 | }, 180 | { 181 | "Name": "BenchmarkDisabled/Logrus-4", 182 | "Runs": 68209849, 183 | "NsPerOp": 16.91, 184 | "Mem": { 185 | "BytesPerOp": 16, 186 | "AllocsPerOp": 1, 187 | "MBPerSec": 0 188 | } 189 | }, 190 | { 191 | "Name": "BenchmarkDisabled/Log15-4", 192 | "Runs": 2370252, 193 | "NsPerOp": 511.4, 194 | "Mem": { 195 | "BytesPerOp": 456, 196 | "AllocsPerOp": 3, 197 | "MBPerSec": 0 198 | } 199 | }, 200 | { 201 | "Name": "BenchmarkDisabled/Logf-4", 202 | "Runs": 303670406, 203 | "NsPerOp": 3.987, 204 | "Mem": { 205 | "BytesPerOp": 0, 206 | "AllocsPerOp": 0, 207 | "MBPerSec": 0 208 | } 209 | }, 210 | { 211 | "Name": "BenchmarkEventFmt/Zerolog-4", 212 | "Runs": 2571805, 213 | "NsPerOp": 467, 214 | "Mem": { 215 | "BytesPerOp": 112, 216 | "AllocsPerOp": 1, 217 | "MBPerSec": 0 218 | } 219 | }, 220 | { 221 | "Name": "BenchmarkEventFmt/Phuslog-4", 222 | "Runs": 2844013, 223 | "NsPerOp": 416, 224 | "Mem": { 225 | "BytesPerOp": 0, 226 | "AllocsPerOp": 0, 227 | "MBPerSec": 0 228 | } 229 | }, 230 | { 231 | "Name": "BenchmarkEventFmt/Zap-4", 232 | "Runs": 1692388, 233 | "NsPerOp": 723.7, 234 | "Mem": { 235 | "BytesPerOp": 112, 236 | "AllocsPerOp": 1, 237 | "MBPerSec": 0 238 | } 239 | }, 240 | { 241 | "Name": "BenchmarkEventFmt/ZapSugar-4", 242 | "Runs": 1662757, 243 | "NsPerOp": 699.3, 244 | "Mem": { 245 | "BytesPerOp": 112, 246 | "AllocsPerOp": 1, 247 | "MBPerSec": 0 248 | } 249 | }, 250 | { 251 | "Name": "BenchmarkEventFmt/Slog-4", 252 | "Runs": 1592650, 253 | "NsPerOp": 753.5, 254 | "Mem": { 255 | "BytesPerOp": 112, 256 | "AllocsPerOp": 1, 257 | "MBPerSec": 0 258 | } 259 | }, 260 | { 261 | "Name": "BenchmarkEventFmt/SlogZap-4", 262 | "Runs": 1301108, 263 | "NsPerOp": 945.7, 264 | "Mem": { 265 | "BytesPerOp": 112, 266 | "AllocsPerOp": 1, 267 | "MBPerSec": 0 268 | } 269 | }, 270 | { 271 | "Name": "BenchmarkEventFmt/Apex-4", 272 | "Runs": 451722, 273 | "NsPerOp": 2484, 274 | "Mem": { 275 | "BytesPerOp": 352, 276 | "AllocsPerOp": 6, 277 | "MBPerSec": 0 278 | } 279 | }, 280 | { 281 | "Name": "BenchmarkEventFmt/Logrus-4", 282 | "Runs": 314007, 283 | "NsPerOp": 3665, 284 | "Mem": { 285 | "BytesPerOp": 1289, 286 | "AllocsPerOp": 24, 287 | "MBPerSec": 0 288 | } 289 | }, 290 | { 291 | "Name": "BenchmarkEventFmt/Log15-4", 292 | "Runs": 237878, 293 | "NsPerOp": 4941, 294 | "Mem": { 295 | "BytesPerOp": 1609, 296 | "AllocsPerOp": 21, 297 | "MBPerSec": 0 298 | } 299 | }, 300 | { 301 | "Name": "BenchmarkEventFmt/Logf-4", 302 | "Runs": 2260286, 303 | "NsPerOp": 530.7, 304 | "Mem": { 305 | "BytesPerOp": 112, 306 | "AllocsPerOp": 1, 307 | "MBPerSec": 0 308 | } 309 | }, 310 | { 311 | "Name": "BenchmarkDisabledFmt/Zerolog-4", 312 | "Runs": 349632212, 313 | "NsPerOp": 3.432, 314 | "Mem": { 315 | "BytesPerOp": 0, 316 | "AllocsPerOp": 0, 317 | "MBPerSec": 0 318 | } 319 | }, 320 | { 321 | "Name": "BenchmarkDisabledFmt/Phuslog-4", 322 | "Runs": 450241536, 323 | "NsPerOp": 2.659, 324 | "Mem": { 325 | "BytesPerOp": 0, 326 | "AllocsPerOp": 0, 327 | "MBPerSec": 0 328 | } 329 | }, 330 | { 331 | "Name": "BenchmarkDisabledFmt/Zap-4", 332 | "Runs": 4171738, 333 | "NsPerOp": 280.8, 334 | "Mem": { 335 | "BytesPerOp": 112, 336 | "AllocsPerOp": 1, 337 | "MBPerSec": 0 338 | } 339 | }, 340 | { 341 | "Name": "BenchmarkDisabledFmt/ZapSugar-4", 342 | "Runs": 333518317, 343 | "NsPerOp": 3.597, 344 | "Mem": { 345 | "BytesPerOp": 0, 346 | "AllocsPerOp": 0, 347 | "MBPerSec": 0 348 | } 349 | }, 350 | { 351 | "Name": "BenchmarkDisabledFmt/Slog-4", 352 | "Runs": 4317908, 353 | "NsPerOp": 279.7, 354 | "Mem": { 355 | "BytesPerOp": 112, 356 | "AllocsPerOp": 1, 357 | "MBPerSec": 0 358 | } 359 | }, 360 | { 361 | "Name": "BenchmarkDisabledFmt/SlogZap-4", 362 | "Runs": 4256775, 363 | "NsPerOp": 286, 364 | "Mem": { 365 | "BytesPerOp": 112, 366 | "AllocsPerOp": 1, 367 | "MBPerSec": 0 368 | } 369 | }, 370 | { 371 | "Name": "BenchmarkDisabledFmt/Apex-4", 372 | "Runs": 4314164, 373 | "NsPerOp": 278.7, 374 | "Mem": { 375 | "BytesPerOp": 112, 376 | "AllocsPerOp": 1, 377 | "MBPerSec": 0 378 | } 379 | }, 380 | { 381 | "Name": "BenchmarkDisabledFmt/Logrus-4", 382 | "Runs": 615157041, 383 | "NsPerOp": 1.952, 384 | "Mem": { 385 | "BytesPerOp": 0, 386 | "AllocsPerOp": 0, 387 | "MBPerSec": 0 388 | } 389 | }, 390 | { 391 | "Name": "BenchmarkDisabledFmt/Log15-4", 392 | "Runs": 1419429, 393 | "NsPerOp": 845.6, 394 | "Mem": { 395 | "BytesPerOp": 568, 396 | "AllocsPerOp": 4, 397 | "MBPerSec": 0 398 | } 399 | }, 400 | { 401 | "Name": "BenchmarkDisabledFmt/Logf-4", 402 | "Runs": 4375614, 403 | "NsPerOp": 275.1, 404 | "Mem": { 405 | "BytesPerOp": 112, 406 | "AllocsPerOp": 1, 407 | "MBPerSec": 0 408 | } 409 | }, 410 | { 411 | "Name": "BenchmarkEventCtx/Zerolog-4", 412 | "Runs": 806214, 413 | "NsPerOp": 1462, 414 | "Mem": { 415 | "BytesPerOp": 552, 416 | "AllocsPerOp": 12, 417 | "MBPerSec": 0 418 | } 419 | }, 420 | { 421 | "Name": "BenchmarkEventCtx/Phuslog-4", 422 | "Runs": 594808, 423 | "NsPerOp": 1999, 424 | "Mem": { 425 | "BytesPerOp": 552, 426 | "AllocsPerOp": 12, 427 | "MBPerSec": 0 428 | } 429 | }, 430 | { 431 | "Name": "BenchmarkEventCtx/Zap-4", 432 | "Runs": 531837, 433 | "NsPerOp": 2471, 434 | "Mem": { 435 | "BytesPerOp": 1177, 436 | "AllocsPerOp": 15, 437 | "MBPerSec": 0 438 | } 439 | }, 440 | { 441 | "Name": "BenchmarkEventCtx/ZapSugar-4", 442 | "Runs": 437426, 443 | "NsPerOp": 2948, 444 | "Mem": { 445 | "BytesPerOp": 1858, 446 | "AllocsPerOp": 21, 447 | "MBPerSec": 0 448 | } 449 | }, 450 | { 451 | "Name": "BenchmarkEventCtx/Slog-4", 452 | "Runs": 269935, 453 | "NsPerOp": 4342, 454 | "Mem": { 455 | "BytesPerOp": 2388, 456 | "AllocsPerOp": 28, 457 | "MBPerSec": 0 458 | } 459 | }, 460 | { 461 | "Name": "BenchmarkEventCtx/SlogZap-4", 462 | "Runs": 362494, 463 | "NsPerOp": 3262, 464 | "Mem": { 465 | "BytesPerOp": 1770, 466 | "AllocsPerOp": 19, 467 | "MBPerSec": 0 468 | } 469 | }, 470 | { 471 | "Name": "BenchmarkEventCtx/Apex-4", 472 | "Runs": 87720, 473 | "NsPerOp": 13604, 474 | "Mem": { 475 | "BytesPerOp": 3586, 476 | "AllocsPerOp": 52, 477 | "MBPerSec": 0 478 | } 479 | }, 480 | { 481 | "Name": "BenchmarkEventCtx/Logrus-4", 482 | "Runs": 74301, 483 | "NsPerOp": 16084, 484 | "Mem": { 485 | "BytesPerOp": 5516, 486 | "AllocsPerOp": 67, 487 | "MBPerSec": 0 488 | } 489 | }, 490 | { 491 | "Name": "BenchmarkEventCtx/Log15-4", 492 | "Runs": 68194, 493 | "NsPerOp": 17307, 494 | "Mem": { 495 | "BytesPerOp": 5302, 496 | "AllocsPerOp": 63, 497 | "MBPerSec": 0 498 | } 499 | }, 500 | { 501 | "Name": "BenchmarkEventCtx/Logf-4", 502 | "Runs": 195260, 503 | "NsPerOp": 6050, 504 | "Mem": { 505 | "BytesPerOp": 2513, 506 | "AllocsPerOp": 88, 507 | "MBPerSec": 0 508 | } 509 | }, 510 | { 511 | "Name": "BenchmarkDisabledCtx/Zerolog-4", 512 | "Runs": 24634215, 513 | "NsPerOp": 48.4, 514 | "Mem": { 515 | "BytesPerOp": 72, 516 | "AllocsPerOp": 2, 517 | "MBPerSec": 0 518 | } 519 | }, 520 | { 521 | "Name": "BenchmarkDisabledCtx/Phuslog-4", 522 | "Runs": 25028576, 523 | "NsPerOp": 47.84, 524 | "Mem": { 525 | "BytesPerOp": 72, 526 | "AllocsPerOp": 2, 527 | "MBPerSec": 0 528 | } 529 | }, 530 | { 531 | "Name": "BenchmarkDisabledCtx/Zap-4", 532 | "Runs": 5645414, 533 | "NsPerOp": 211.8, 534 | "Mem": { 535 | "BytesPerOp": 696, 536 | "AllocsPerOp": 5, 537 | "MBPerSec": 0 538 | } 539 | }, 540 | { 541 | "Name": "BenchmarkDisabledCtx/ZapSugar-4", 542 | "Runs": 9395017, 543 | "NsPerOp": 127.6, 544 | "Mem": { 545 | "BytesPerOp": 176, 546 | "AllocsPerOp": 8, 547 | "MBPerSec": 0 548 | } 549 | }, 550 | { 551 | "Name": "BenchmarkDisabledCtx/Slog-4", 552 | "Runs": 6900956, 553 | "NsPerOp": 176, 554 | "Mem": { 555 | "BytesPerOp": 504, 556 | "AllocsPerOp": 5, 557 | "MBPerSec": 0 558 | } 559 | }, 560 | { 561 | "Name": "BenchmarkDisabledCtx/SlogZap-4", 562 | "Runs": 6877462, 563 | "NsPerOp": 175.4, 564 | "Mem": { 565 | "BytesPerOp": 504, 566 | "AllocsPerOp": 5, 567 | "MBPerSec": 0 568 | } 569 | }, 570 | { 571 | "Name": "BenchmarkDisabledCtx/Apex-4", 572 | "Runs": 3158696, 573 | "NsPerOp": 380.8, 574 | "Mem": { 575 | "BytesPerOp": 921, 576 | "AllocsPerOp": 12, 577 | "MBPerSec": 0 578 | } 579 | }, 580 | { 581 | "Name": "BenchmarkDisabledCtx/Logrus-4", 582 | "Runs": 1744086, 583 | "NsPerOp": 687.2, 584 | "Mem": { 585 | "BytesPerOp": 1554, 586 | "AllocsPerOp": 14, 587 | "MBPerSec": 0 588 | } 589 | }, 590 | { 591 | "Name": "BenchmarkDisabledCtx/Log15-4", 592 | "Runs": 1426970, 593 | "NsPerOp": 842.3, 594 | "Mem": { 595 | "BytesPerOp": 1208, 596 | "AllocsPerOp": 13, 597 | "MBPerSec": 0 598 | } 599 | }, 600 | { 601 | "Name": "BenchmarkDisabledCtx/Logf-4", 602 | "Runs": 9451104, 603 | "NsPerOp": 126.1, 604 | "Mem": { 605 | "BytesPerOp": 176, 606 | "AllocsPerOp": 8, 607 | "MBPerSec": 0 608 | } 609 | }, 610 | { 611 | "Name": "BenchmarkEventCtxWeak/Zerolog-4", 612 | "Runs": 413372, 613 | "NsPerOp": 2823, 614 | "Mem": { 615 | "BytesPerOp": 1298, 616 | "AllocsPerOp": 19, 617 | "MBPerSec": 0 618 | } 619 | }, 620 | { 621 | "Name": "BenchmarkEventCtxWeak/Phuslog-4", 622 | "Runs": 369392, 623 | "NsPerOp": 3199, 624 | "Mem": { 625 | "BytesPerOp": 1235, 626 | "AllocsPerOp": 19, 627 | "MBPerSec": 0 628 | } 629 | }, 630 | { 631 | "Name": "BenchmarkEventCtxWeak/Zap-4", 632 | "Runs": 413779, 633 | "NsPerOp": 2889, 634 | "Mem": { 635 | "BytesPerOp": 1859, 636 | "AllocsPerOp": 21, 637 | "MBPerSec": 0 638 | } 639 | }, 640 | { 641 | "Name": "BenchmarkEventCtxWeak/ZapSugar-4", 642 | "Runs": 416980, 643 | "NsPerOp": 3046, 644 | "Mem": { 645 | "BytesPerOp": 1859, 646 | "AllocsPerOp": 21, 647 | "MBPerSec": 0 648 | } 649 | }, 650 | { 651 | "Name": "BenchmarkEventCtxWeak/Slog-4", 652 | "Runs": 270540, 653 | "NsPerOp": 4502, 654 | "Mem": { 655 | "BytesPerOp": 2268, 656 | "AllocsPerOp": 32, 657 | "MBPerSec": 0 658 | } 659 | }, 660 | { 661 | "Name": "BenchmarkEventCtxWeak/SlogZap-4", 662 | "Runs": 385110, 663 | "NsPerOp": 3235, 664 | "Mem": { 665 | "BytesPerOp": 1651, 666 | "AllocsPerOp": 23, 667 | "MBPerSec": 0 668 | } 669 | }, 670 | { 671 | "Name": "BenchmarkEventCtxWeak/Apex-4", 672 | "Runs": 83128, 673 | "NsPerOp": 14488, 674 | "Mem": { 675 | "BytesPerOp": 3601, 676 | "AllocsPerOp": 53, 677 | "MBPerSec": 0 678 | } 679 | }, 680 | { 681 | "Name": "BenchmarkEventCtxWeak/Logrus-4", 682 | "Runs": 72812, 683 | "NsPerOp": 16101, 684 | "Mem": { 685 | "BytesPerOp": 5517, 686 | "AllocsPerOp": 67, 687 | "MBPerSec": 0 688 | } 689 | }, 690 | { 691 | "Name": "BenchmarkEventCtxWeak/Log15-4", 692 | "Runs": 64986, 693 | "NsPerOp": 18698, 694 | "Mem": { 695 | "BytesPerOp": 5646, 696 | "AllocsPerOp": 66, 697 | "MBPerSec": 0 698 | } 699 | }, 700 | { 701 | "Name": "BenchmarkEventCtxWeak/Logf-4", 702 | "Runs": 101650, 703 | "NsPerOp": 11689, 704 | "Mem": { 705 | "BytesPerOp": 4851, 706 | "AllocsPerOp": 168, 707 | "MBPerSec": 0 708 | } 709 | }, 710 | { 711 | "Name": "BenchmarkDisabledCtxWeak/Zerolog-4", 712 | "Runs": 9385537, 713 | "NsPerOp": 125, 714 | "Mem": { 715 | "BytesPerOp": 176, 716 | "AllocsPerOp": 8, 717 | "MBPerSec": 0 718 | } 719 | }, 720 | { 721 | "Name": "BenchmarkDisabledCtxWeak/Phuslog-4", 722 | "Runs": 3895905, 723 | "NsPerOp": 309.7, 724 | "Mem": { 725 | "BytesPerOp": 753, 726 | "AllocsPerOp": 9, 727 | "MBPerSec": 0 728 | } 729 | }, 730 | { 731 | "Name": "BenchmarkDisabledCtxWeak/Zap-4", 732 | "Runs": 9244815, 733 | "NsPerOp": 129.9, 734 | "Mem": { 735 | "BytesPerOp": 176, 736 | "AllocsPerOp": 8, 737 | "MBPerSec": 0 738 | } 739 | }, 740 | { 741 | "Name": "BenchmarkDisabledCtxWeak/ZapSugar-4", 742 | "Runs": 9332401, 743 | "NsPerOp": 129, 744 | "Mem": { 745 | "BytesPerOp": 176, 746 | "AllocsPerOp": 8, 747 | "MBPerSec": 0 748 | } 749 | }, 750 | { 751 | "Name": "BenchmarkDisabledCtxWeak/Slog-4", 752 | "Runs": 9491106, 753 | "NsPerOp": 128.5, 754 | "Mem": { 755 | "BytesPerOp": 176, 756 | "AllocsPerOp": 8, 757 | "MBPerSec": 0 758 | } 759 | }, 760 | { 761 | "Name": "BenchmarkDisabledCtxWeak/SlogZap-4", 762 | "Runs": 9209412, 763 | "NsPerOp": 129.4, 764 | "Mem": { 765 | "BytesPerOp": 176, 766 | "AllocsPerOp": 8, 767 | "MBPerSec": 0 768 | } 769 | }, 770 | { 771 | "Name": "BenchmarkDisabledCtxWeak/Apex-4", 772 | "Runs": 2964459, 773 | "NsPerOp": 404.2, 774 | "Mem": { 775 | "BytesPerOp": 937, 776 | "AllocsPerOp": 13, 777 | "MBPerSec": 0 778 | } 779 | }, 780 | { 781 | "Name": "BenchmarkDisabledCtxWeak/Logrus-4", 782 | "Runs": 1725340, 783 | "NsPerOp": 692.3, 784 | "Mem": { 785 | "BytesPerOp": 1554, 786 | "AllocsPerOp": 14, 787 | "MBPerSec": 0 788 | } 789 | }, 790 | { 791 | "Name": "BenchmarkDisabledCtxWeak/Log15-4", 792 | "Runs": 1364966, 793 | "NsPerOp": 876.7, 794 | "Mem": { 795 | "BytesPerOp": 1496, 796 | "AllocsPerOp": 13, 797 | "MBPerSec": 0 798 | } 799 | }, 800 | { 801 | "Name": "BenchmarkDisabledCtxWeak/Logf-4", 802 | "Runs": 9426561, 803 | "NsPerOp": 125.9, 804 | "Mem": { 805 | "BytesPerOp": 176, 806 | "AllocsPerOp": 8, 807 | "MBPerSec": 0 808 | } 809 | }, 810 | { 811 | "Name": "BenchmarkEventAccumulatedCtx/Zerolog-4", 812 | "Runs": 10085317, 813 | "NsPerOp": 116.2, 814 | "Mem": { 815 | "BytesPerOp": 0, 816 | "AllocsPerOp": 0, 817 | "MBPerSec": 0 818 | } 819 | }, 820 | { 821 | "Name": "BenchmarkEventAccumulatedCtx/Phuslog-4", 822 | "Runs": 12260790, 823 | "NsPerOp": 97.49, 824 | "Mem": { 825 | "BytesPerOp": 0, 826 | "AllocsPerOp": 0, 827 | "MBPerSec": 0 828 | } 829 | }, 830 | { 831 | "Name": "BenchmarkEventAccumulatedCtx/Zap-4", 832 | "Runs": 4854060, 833 | "NsPerOp": 248.8, 834 | "Mem": { 835 | "BytesPerOp": 0, 836 | "AllocsPerOp": 0, 837 | "MBPerSec": 0 838 | } 839 | }, 840 | { 841 | "Name": "BenchmarkEventAccumulatedCtx/ZapSugar-4", 842 | "Runs": 4354441, 843 | "NsPerOp": 292.3, 844 | "Mem": { 845 | "BytesPerOp": 16, 846 | "AllocsPerOp": 1, 847 | "MBPerSec": 0 848 | } 849 | }, 850 | { 851 | "Name": "BenchmarkEventAccumulatedCtx/Slog-4", 852 | "Runs": 3122140, 853 | "NsPerOp": 386.2, 854 | "Mem": { 855 | "BytesPerOp": 0, 856 | "AllocsPerOp": 0, 857 | "MBPerSec": 0 858 | } 859 | }, 860 | { 861 | "Name": "BenchmarkEventAccumulatedCtx/SlogZap-4", 862 | "Runs": 2686797, 863 | "NsPerOp": 451, 864 | "Mem": { 865 | "BytesPerOp": 0, 866 | "AllocsPerOp": 0, 867 | "MBPerSec": 0 868 | } 869 | }, 870 | { 871 | "Name": "BenchmarkEventAccumulatedCtx/Apex-4", 872 | "Runs": 89863, 873 | "NsPerOp": 13101, 874 | "Mem": { 875 | "BytesPerOp": 2662, 876 | "AllocsPerOp": 40, 877 | "MBPerSec": 0 878 | } 879 | }, 880 | { 881 | "Name": "BenchmarkEventAccumulatedCtx/Logrus-4", 882 | "Runs": 444586, 883 | "NsPerOp": 2427, 884 | "Mem": { 885 | "BytesPerOp": 1113, 886 | "AllocsPerOp": 23, 887 | "MBPerSec": 0 888 | } 889 | }, 890 | { 891 | "Name": "BenchmarkEventAccumulatedCtx/Log15-4", 892 | "Runs": 70006, 893 | "NsPerOp": 17101, 894 | "Mem": { 895 | "BytesPerOp": 4836, 896 | "AllocsPerOp": 54, 897 | "MBPerSec": 0 898 | } 899 | }, 900 | { 901 | "Name": "BenchmarkEventAccumulatedCtx/Logf-4", 902 | "Runs": 197329, 903 | "NsPerOp": 5995, 904 | "Mem": { 905 | "BytesPerOp": 2337, 906 | "AllocsPerOp": 80, 907 | "MBPerSec": 0 908 | } 909 | }, 910 | { 911 | "Name": "BenchmarkDisabledAccumulatedCtx/Zerolog-4", 912 | "Runs": 475131328, 913 | "NsPerOp": 2.531, 914 | "Mem": { 915 | "BytesPerOp": 0, 916 | "AllocsPerOp": 0, 917 | "MBPerSec": 0 918 | } 919 | }, 920 | { 921 | "Name": "BenchmarkDisabledAccumulatedCtx/Phuslog-4", 922 | "Runs": 504664128, 923 | "NsPerOp": 2.389, 924 | "Mem": { 925 | "BytesPerOp": 0, 926 | "AllocsPerOp": 0, 927 | "MBPerSec": 0 928 | } 929 | }, 930 | { 931 | "Name": "BenchmarkDisabledAccumulatedCtx/Zap-4", 932 | "Runs": 291356040, 933 | "NsPerOp": 4.111, 934 | "Mem": { 935 | "BytesPerOp": 0, 936 | "AllocsPerOp": 0, 937 | "MBPerSec": 0 938 | } 939 | }, 940 | { 941 | "Name": "BenchmarkDisabledAccumulatedCtx/ZapSugar-4", 942 | "Runs": 62519478, 943 | "NsPerOp": 18.6, 944 | "Mem": { 945 | "BytesPerOp": 16, 946 | "AllocsPerOp": 1, 947 | "MBPerSec": 0 948 | } 949 | }, 950 | { 951 | "Name": "BenchmarkDisabledAccumulatedCtx/Slog-4", 952 | "Runs": 293121105, 953 | "NsPerOp": 4.081, 954 | "Mem": { 955 | "BytesPerOp": 0, 956 | "AllocsPerOp": 0, 957 | "MBPerSec": 0 958 | } 959 | }, 960 | { 961 | "Name": "BenchmarkDisabledAccumulatedCtx/SlogZap-4", 962 | "Runs": 248096292, 963 | "NsPerOp": 4.841, 964 | "Mem": { 965 | "BytesPerOp": 0, 966 | "AllocsPerOp": 0, 967 | "MBPerSec": 0 968 | } 969 | }, 970 | { 971 | "Name": "BenchmarkDisabledAccumulatedCtx/Apex-4", 972 | "Runs": 512314122, 973 | "NsPerOp": 2.343, 974 | "Mem": { 975 | "BytesPerOp": 0, 976 | "AllocsPerOp": 0, 977 | "MBPerSec": 0 978 | } 979 | }, 980 | { 981 | "Name": "BenchmarkDisabledAccumulatedCtx/Logrus-4", 982 | "Runs": 68333880, 983 | "NsPerOp": 16.85, 984 | "Mem": { 985 | "BytesPerOp": 16, 986 | "AllocsPerOp": 1, 987 | "MBPerSec": 0 988 | } 989 | }, 990 | { 991 | "Name": "BenchmarkDisabledAccumulatedCtx/Log15-4", 992 | "Runs": 2051424, 993 | "NsPerOp": 587.6, 994 | "Mem": { 995 | "BytesPerOp": 744, 996 | "AllocsPerOp": 4, 997 | "MBPerSec": 0 998 | } 999 | }, 1000 | { 1001 | "Name": "BenchmarkDisabledAccumulatedCtx/Logf-4", 1002 | "Runs": 303464916, 1003 | "NsPerOp": 3.953, 1004 | "Mem": { 1005 | "BytesPerOp": 0, 1006 | "AllocsPerOp": 0, 1007 | "MBPerSec": 0 1008 | } 1009 | } 1010 | ] 1011 | } 1012 | ] 1013 | } 1014 | ] -------------------------------------------------------------------------------- /bench_test.go: -------------------------------------------------------------------------------- 1 | package bench 2 | 3 | import ( 4 | "io" 5 | "testing" 6 | ) 7 | 8 | // BenchmarkEvent tests the performance of logging a simple message with no 9 | // contextual fields. 10 | func BenchmarkEvent(b *testing.B) { 11 | b.Logf("Log a simple message without any contexual fields") 12 | 13 | for _, v := range loggers { 14 | b.Run(v.name(), func(b *testing.B) { 15 | out := &blackhole{} 16 | l := v.new(out) 17 | 18 | b.ResetTimer() 19 | 20 | b.RunParallel(func(pb *testing.PB) { 21 | for pb.Next() { 22 | l.logEvent(logMsg) 23 | } 24 | }) 25 | 26 | if out.WriteCount() != uint64(b.N) { 27 | b.Fatalf( 28 | "Mismatch in log write count. Expected: %d, Actual: %d", 29 | b.N, 30 | out.WriteCount(), 31 | ) 32 | } 33 | }) 34 | } 35 | } 36 | 37 | // BenchmarkDisabled tests the impact of logging at a disabled level for 38 | // each library to determine how much overhead is incurred. 39 | func BenchmarkDisabled(b *testing.B) { 40 | b.Logf("Log an event without any contexual fields") 41 | 42 | for _, v := range loggers { 43 | b.Run(v.name(), func(b *testing.B) { 44 | l := v.new(io.Discard) 45 | 46 | b.ResetTimer() 47 | 48 | b.RunParallel(func(pb *testing.PB) { 49 | for pb.Next() { 50 | l.logDisabled(logMsg) 51 | } 52 | }) 53 | }) 54 | } 55 | } 56 | 57 | // BenchmarkEventFmt tests the performance of logging a simple message with 58 | // string formatting verbs. 59 | func BenchmarkEventFmt(b *testing.B) { 60 | b.Logf("Log a simple message using string formatting verbs") 61 | 62 | for _, v := range loggers { 63 | b.Run(v.name(), func(b *testing.B) { 64 | out := &blackhole{} 65 | l := v.new(out) 66 | 67 | b.ResetTimer() 68 | 69 | b.RunParallel(func(pb *testing.PB) { 70 | for pb.Next() { 71 | l.logEventFmt(logMsgFmt, logMsgArgs...) 72 | } 73 | }) 74 | 75 | if out.WriteCount() != uint64(b.N) { 76 | b.Fatalf( 77 | "Mismatch in log write count. Expected: %d, Actual: %d", 78 | b.N, 79 | out.WriteCount(), 80 | ) 81 | } 82 | }) 83 | } 84 | } 85 | 86 | // BenchmarkDisabledFmt tests the performance of logging at a disabled level with 87 | // string formatting verbs. 88 | func BenchmarkDisabledFmt(b *testing.B) { 89 | b.Logf("Log at a disabled level with string formatting verbs") 90 | 91 | for _, v := range loggers { 92 | b.Run(v.name(), func(b *testing.B) { 93 | l := v.new(io.Discard) 94 | 95 | b.ResetTimer() 96 | 97 | b.RunParallel(func(pb *testing.PB) { 98 | for pb.Next() { 99 | l.logDisabledFmt(logMsgFmt, logMsgArgs...) 100 | } 101 | }) 102 | }) 103 | } 104 | } 105 | 106 | // BenchmarkEventCtx test the performance impact of each library when 107 | // logging an event with several contextual fields. 108 | func BenchmarkEventCtx(b *testing.B) { 109 | b.Logf("Log an event with several contextual fields") 110 | 111 | for _, v := range loggers { 112 | b.Run(v.name(), func(b *testing.B) { 113 | out := &blackhole{} 114 | l := v.new(out) 115 | 116 | b.ResetTimer() 117 | 118 | b.RunParallel(func(pb *testing.PB) { 119 | for pb.Next() { 120 | l.logEventCtx(logMsg) 121 | } 122 | }) 123 | 124 | if out.WriteCount() != uint64(b.N) { 125 | b.Fatalf( 126 | "Mismatch in log write count. Expected: %d, Actual: %d", 127 | b.N, 128 | out.WriteCount(), 129 | ) 130 | } 131 | }) 132 | } 133 | } 134 | 135 | // BenchmarkDisabledCtx tests the performance impact of logging an event 136 | // at a disabled level with several contextual fields. 137 | func BenchmarkDisabledCtx(b *testing.B) { 138 | b.Logf("Log a disabled event with several contextual fields") 139 | 140 | for _, v := range loggers { 141 | b.Run(v.name(), func(b *testing.B) { 142 | l := v.new(io.Discard) 143 | 144 | b.ResetTimer() 145 | 146 | b.RunParallel(func(pb *testing.PB) { 147 | for pb.Next() { 148 | l.logDisabledCtx(logMsg) 149 | } 150 | }) 151 | }) 152 | } 153 | } 154 | 155 | // BenchmarkEventCtxWeak tests the impact of logging an event with weakly typed 156 | // contextual fields. 157 | func BenchmarkEventCtxWeak(b *testing.B) { 158 | b.Logf("Log an event with weakly typed contextual fields") 159 | 160 | for _, v := range loggers { 161 | b.Run(v.name(), func(b *testing.B) { 162 | out := &blackhole{} 163 | l := v.newWithCtx(out) 164 | 165 | b.ResetTimer() 166 | 167 | b.RunParallel(func(pb *testing.PB) { 168 | for pb.Next() { 169 | l.logEventCtxWeak(logMsg) 170 | } 171 | }) 172 | 173 | if out.WriteCount() != uint64(b.N) { 174 | b.Fatalf( 175 | "Mismatch in log write count. Expected: %d, Actual: %d", 176 | b.N, 177 | out.WriteCount(), 178 | ) 179 | } 180 | }) 181 | } 182 | } 183 | 184 | // BenchmarkDisabledCtxWeak tests the impact of logging at a disabled level 185 | // with weakly typed contextual fields. 186 | func BenchmarkDisabledCtxWeak(b *testing.B) { 187 | b.Logf("Log at a disabled level with weakly typed contextual fields") 188 | 189 | for _, v := range loggers { 190 | b.Run(v.name(), func(b *testing.B) { 191 | l := v.newWithCtx(io.Discard) 192 | 193 | b.ResetTimer() 194 | 195 | b.RunParallel(func(pb *testing.PB) { 196 | for pb.Next() { 197 | l.logDisabledCtxWeak(logMsg) 198 | } 199 | }) 200 | }) 201 | } 202 | } 203 | 204 | // BenchmarkEventAccumulatedCtx tests the impact of creating a logger with 205 | // accumulated context and using it to log events. 206 | func BenchmarkEventAccumulatedCtx(b *testing.B) { 207 | b.Logf("Log an event with some accumulated context") 208 | 209 | for _, v := range loggers { 210 | b.Run(v.name(), func(b *testing.B) { 211 | out := &blackhole{} 212 | l := v.newWithCtx(out) 213 | 214 | b.ResetTimer() 215 | 216 | b.RunParallel(func(pb *testing.PB) { 217 | for pb.Next() { 218 | l.logEvent(logMsg) 219 | } 220 | }) 221 | 222 | if out.WriteCount() != uint64(b.N) { 223 | b.Fatalf( 224 | "Mismatch in log write count. Expected: %d, Actual: %d", 225 | b.N, 226 | out.WriteCount(), 227 | ) 228 | } 229 | }) 230 | } 231 | } 232 | 233 | // BenchmarkDisabledAccumulatedCtx creates a logger with accumulated context, 234 | // but logs at a disabled level. 235 | func BenchmarkDisabledAccumulatedCtx(b *testing.B) { 236 | b.Logf("Log a disabled event with some accumulated context") 237 | 238 | for _, v := range loggers { 239 | b.Run(v.name(), func(b *testing.B) { 240 | l := v.newWithCtx(io.Discard) 241 | 242 | b.ResetTimer() 243 | 244 | b.RunParallel(func(pb *testing.PB) { 245 | for pb.Next() { 246 | l.logDisabled(logMsg) 247 | } 248 | }) 249 | }) 250 | } 251 | } 252 | -------------------------------------------------------------------------------- /docs/chart.js: -------------------------------------------------------------------------------- 1 | const lineChartOptions = { 2 | chart: { 3 | type: 'bar', 4 | fontFamily: 'Inter, sans-serif', 5 | height: 550, 6 | toolbar: { 7 | show: true, 8 | }, 9 | animations: { 10 | enabled: false, 11 | }, 12 | }, 13 | plotOptions: { 14 | bar: { 15 | horizontal: false, 16 | columnWidth: '80%', 17 | endingShape: 'rounded', 18 | }, 19 | }, 20 | dataLabels: { 21 | enabled: false, 22 | }, 23 | stroke: { 24 | show: true, 25 | width: 2, 26 | }, 27 | xaxis: { 28 | labels: { 29 | style: { 30 | fontSize: '14px', 31 | }, 32 | }, 33 | tooltip: { 34 | enabled: true, 35 | offsetY: 25, 36 | formatter: function (val, opts) { 37 | switch (val) { 38 | case 'Event': 39 | return 'Log a message with no context'; 40 | case 'EventFmt': 41 | return 'Log a message with string-formatted variables'; 42 | case 'EventCtx': 43 | return 'Log a message with contexual fields'; 44 | case 'EventCtxWeak': 45 | return 'Log a message with loosely-typed contexual fields'; 46 | case 'EventAccumulatedCtx': 47 | return 'Log a message with accumulated contexual fields'; 48 | case 'Disabled': 49 | return 'Log a message at a disabled level'; 50 | case 'DisabledFmt': 51 | return 'Log at a disabled level with string-formatted variables'; 52 | case 'DisabledCtx': 53 | return 'Log at a disabled level with contextual fields'; 54 | case 'DisabledCtxWeak': 55 | return 'Log at a disabled level with loosely-typed contextual fields'; 56 | case 'DisabledAccumulatedCtx': 57 | return 'Log at a disabled level with accumulated contextual fields'; 58 | default: 59 | return val; 60 | } 61 | }, 62 | }, 63 | }, 64 | yaxis: [ 65 | { 66 | labels: { 67 | style: { 68 | fontSize: '14px', 69 | }, 70 | }, 71 | decimalsInFloat: 0, 72 | title: { 73 | style: { 74 | fontSize: '13px', 75 | }, 76 | }, 77 | }, 78 | ], 79 | fill: { 80 | opacity: 1, 81 | }, 82 | title: { 83 | text: 'Execution time', 84 | margin: 20, 85 | style: { 86 | fontSize: '24px', 87 | }, 88 | }, 89 | subtitle: { 90 | text: '', 91 | margin: 30, 92 | style: { 93 | fontSize: '16px', 94 | }, 95 | }, 96 | legend: { 97 | fontSize: '16px', 98 | position: 'bottom', 99 | itemMargin: { 100 | horizontal: 15, 101 | vertical: 25, 102 | }, 103 | }, 104 | colors: [ 105 | '#008FFB', 106 | '#00E396', 107 | '#FF9800', 108 | '#E91E63', 109 | '#775DD0', 110 | '#5653FE', 111 | '#FD6A6A', 112 | '#66DA26', 113 | '#546E7A', 114 | '#2E294E', 115 | ], 116 | }; 117 | 118 | export default function (obj) { 119 | lineChartOptions.series = obj.series; 120 | lineChartOptions.xaxis.categories = obj.categories; 121 | lineChartOptions.yaxis[0].title.text = obj.yaxis; 122 | lineChartOptions.title.text = obj.title; 123 | lineChartOptions.subtitle.text = obj.subtitle || 'A lower score is better'; 124 | 125 | return lineChartOptions; 126 | } 127 | -------------------------------------------------------------------------------- /docs/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betterstack-community/go-logging-benchmarks/4da78d7e2de62608432c606e571ec7e7e380d7b4/docs/favicon.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | Go Logging Benchmarks 17 | 18 | 19 | 20 | 73 |
74 |
75 |

76 | This page compares the performance of popular Go logging libraries 77 | including the standard library slog package. The benchmark results are 78 | computed using the latest 79 | version of each library and updated once a week. See the 80 | repository 81 | here or read the 82 | accompanying comparison article. 83 |

84 |
85 | 86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /docs/justfile: -------------------------------------------------------------------------------- 1 | APP := "benchmarks" 2 | 3 | default: server 4 | 5 | build-dev: 6 | pnpm build:dev 7 | 8 | build-prod: 9 | pnpm build:prod 10 | 11 | clean: 12 | rm -r dist 13 | 14 | server: 15 | pnpm run server 16 | -------------------------------------------------------------------------------- /docs/main.css: -------------------------------------------------------------------------------- 1 | html { 2 | box-sizing: border-box; 3 | font-size: 16px; 4 | } 5 | 6 | *, 7 | *:before, 8 | *:after { 9 | box-sizing: inherit; 10 | } 11 | 12 | body, 13 | h1, 14 | h2, 15 | h3, 16 | h4, 17 | h5, 18 | h6, 19 | p, 20 | ol, 21 | ul { 22 | margin: 0; 23 | padding: 0; 24 | font-weight: normal; 25 | } 26 | 27 | img { 28 | max-width: 100%; 29 | height: auto; 30 | } 31 | /* End of reset */ 32 | 33 | body { 34 | font-family: 'Lato', sans-serif; 35 | line-height: 1.4; 36 | background-color: rgba(250, 250, 250, 1); 37 | } 38 | 39 | section { 40 | margin-bottom: 50px; 41 | } 42 | 43 | h2 { 44 | margin-bottom: 15px; 45 | font-weight: 700; 46 | } 47 | 48 | p { 49 | margin-bottom: 15px; 50 | } 51 | 52 | li { 53 | margin-bottom: 10px; 54 | } 55 | 56 | nav { 57 | display: flex; 58 | justify-content: space-between; 59 | padding: 20px 50px; 60 | background-color: white; 61 | border-bottom-style: solid; 62 | border-bottom-width: 1px; 63 | border-bottom-color: rgb(234 236 241/1); 64 | } 65 | 66 | .plain-link { 67 | color: inherit; 68 | text-decoration: none; 69 | background: none; 70 | cursor: pointer; 71 | border: none; 72 | padding: 0; 73 | margin: 0; 74 | font-size: inherit; 75 | font-weight: inherit; 76 | font-style: inherit; 77 | font-family: inherit; 78 | line-height: inherit; 79 | display: contents; 80 | } 81 | 82 | .plain-link:hover, 83 | .plain-link:active, 84 | .plain-link:focus { 85 | color: inherit; 86 | text-decoration: none; 87 | background: none; 88 | border: none; 89 | outline: none; 90 | } 91 | 92 | .button-link { 93 | display: inline-block; 94 | padding: 10px 20px; 95 | background: linear-gradient(0deg, #5b63d3, #5b63d3), 96 | linear-gradient(258.47deg, #5b63d3 38.52%, #795fd0 98.47%); 97 | color: #ffffff; /* White text */ 98 | border-radius: 4px; /* Rounded corners */ 99 | text-decoration: none; /* Remove underline */ 100 | font-size: 16px; /* Text size */ 101 | border: none; /* No border */ 102 | cursor: pointer; /* Hand cursor on hover */ 103 | transition: background-color 0.3s; /* Smooth transition */ 104 | } 105 | 106 | .button-link:focus { 107 | outline: none; /* Remove focus outline */ 108 | box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.5); /* Add a blue glow when focused */ 109 | } 110 | 111 | .main { 112 | margin: 0 auto; 113 | padding: 50px; 114 | max-width: 1200px; 115 | } 116 | 117 | .column { 118 | margin-top: 50px; 119 | border-radius: 5px; 120 | background-color: #fff; 121 | padding: 15px; 122 | margin-bottom: 30px; 123 | box-shadow: rgba(17, 17, 26, 0.05) 0px 1px 0px, 124 | rgba(17, 17, 26, 0.1) 0px 0px 8px; 125 | } 126 | 127 | .chart { 128 | min-height: 500px; 129 | } 130 | 131 | @media screen and (max-width: 550px) { 132 | html { 133 | font-size: 14px; 134 | } 135 | 136 | nav { 137 | padding-left: 15px; 138 | padding-right: 15px; 139 | } 140 | 141 | h1 { 142 | display: none; 143 | } 144 | 145 | .main { 146 | padding-left: 15px; 147 | padding-right: 15px; 148 | } 149 | } 150 | -------------------------------------------------------------------------------- /docs/main.js: -------------------------------------------------------------------------------- 1 | import ApexCharts from 'apexcharts'; 2 | import chart from './chart.js'; 3 | import data from '../bench.json'; 4 | 5 | let categories = []; 6 | let libraries = []; 7 | 8 | const series = { 9 | executionTime: [], 10 | executionTimeDisabled: [], 11 | memoryUsage: [], 12 | memoryUsageDisabled: [], 13 | totalRuns: [], 14 | totalRunsDisabled: [], 15 | allocations: [], 16 | allocationsDisabled: [], 17 | }; 18 | 19 | function pushToCharts(prop, lib, value) { 20 | const i = series[prop].findIndex((obj) => obj.name === lib); 21 | if (i === -1) { 22 | series[prop].push({ 23 | name: lib, 24 | data: [value], 25 | }); 26 | } else { 27 | series[prop][i].data.push(value); 28 | } 29 | } 30 | 31 | const benchmarks = data[0].Suites[0].Benchmarks; 32 | 33 | benchmarks.forEach((item) => { 34 | const benchName = item.Name.split('/')[0].split('Benchmark')[1]; 35 | const library = item.Name.split('/')[1].split('-')[0]; 36 | categories.push(benchName); 37 | libraries.push(library); 38 | 39 | if (!benchName.includes('Disabled')) { 40 | pushToCharts('executionTime', library, item.NsPerOp); 41 | pushToCharts('memoryUsage', library, item.Mem.BytesPerOp); 42 | pushToCharts('totalRuns', library, item.Runs); 43 | pushToCharts('allocations', library, item.Mem.AllocsPerOp); 44 | } else { 45 | pushToCharts('executionTimeDisabled', library, item.NsPerOp); 46 | pushToCharts('memoryUsageDisabled', library, item.Mem.BytesPerOp); 47 | pushToCharts('totalRunsDisabled', library, item.Runs); 48 | pushToCharts('allocationsDisabled', library, item.Mem.AllocsPerOp); 49 | } 50 | }); 51 | 52 | const uniqueCategories = Array.from(new Set(categories)); 53 | 54 | const enabledCategories = uniqueCategories.filter( 55 | (e) => !e.includes('Disabled') 56 | ); 57 | const disabledCategories = uniqueCategories.filter((e) => 58 | e.includes('Disabled') 59 | ); 60 | 61 | const executionTimeChart = new ApexCharts( 62 | document.querySelector('#js-nano-chart'), 63 | chart({ 64 | series: series.executionTime, 65 | categories: enabledCategories, 66 | title: 'Execution time', 67 | subtitle: 'Average execution time per logged event (lower is better)', 68 | yaxis: 'nanoseconds', 69 | }) 70 | ); 71 | executionTimeChart.render(); 72 | 73 | const executionTimeDisabledChart = new ApexCharts( 74 | document.querySelector('#js-nano-chart-disabled'), 75 | chart({ 76 | series: series.executionTimeDisabled, 77 | categories: disabledCategories, 78 | title: 'Execution time (disabled)', 79 | subtitle: 'Average execution time per disabled log (lower is better)', 80 | yaxis: 'nanoseconds', 81 | }) 82 | ); 83 | executionTimeDisabledChart.render(); 84 | 85 | const allocsChart = new ApexCharts( 86 | document.querySelector('#js-allocs-chart'), 87 | chart({ 88 | series: series.allocations, 89 | categories: enabledCategories, 90 | title: 'Heap allocations', 91 | subtitle: 'Incurred allocations per logged event (lower is better)', 92 | yaxis: 'allocations', 93 | }) 94 | ); 95 | allocsChart.render(); 96 | 97 | const allocsDisabledChart = new ApexCharts( 98 | document.querySelector('#js-allocs-chart-disabled'), 99 | chart({ 100 | series: series.allocationsDisabled, 101 | categories: disabledCategories, 102 | title: 'Heap allocations (disabled)', 103 | subtitle: 'Incurred allocations per disabled event (lower is better)', 104 | yaxis: 'allocations', 105 | }) 106 | ); 107 | allocsDisabledChart.render(); 108 | 109 | const memoryUsageChart = new ApexCharts( 110 | document.querySelector('#js-bytes-chart'), 111 | chart({ 112 | series: series.memoryUsage, 113 | categories: enabledCategories, 114 | title: 'Memory usage', 115 | subtitle: 'Bytes allocated per logged event (lower is better)', 116 | yaxis: 'bytes', 117 | }) 118 | ); 119 | memoryUsageChart.render(); 120 | 121 | const memoryUsageDisabledChart = new ApexCharts( 122 | document.querySelector('#js-bytes-chart-disabled'), 123 | chart({ 124 | series: series.memoryUsageDisabled, 125 | categories: disabledCategories, 126 | title: 'Memory usage (disabled)', 127 | subtitle: 'Bytes allocated per disabled event (lower is better)', 128 | yaxis: 'bytes', 129 | }) 130 | ); 131 | memoryUsageDisabledChart.render(); 132 | 133 | const totalOpsChart = new ApexCharts( 134 | document.querySelector('#js-run-chart'), 135 | chart({ 136 | series: series.totalRuns, 137 | categories: enabledCategories, 138 | title: 'Total events', 139 | subtitle: 'Number of events logged (higher is better)', 140 | yaxis: 'iterations', 141 | }) 142 | ); 143 | totalOpsChart.render(); 144 | 145 | const totalOpsDisabledChart = new ApexCharts( 146 | document.querySelector('#js-run-chart-disabled'), 147 | chart({ 148 | series: series.totalRunsDisabled, 149 | categories: disabledCategories, 150 | title: 'Total events (disabled)', 151 | subtitle: 'Number of disabled events skipped (higher is better)', 152 | yaxis: 'iterations', 153 | }) 154 | ); 155 | totalOpsDisabledChart.render(); 156 | -------------------------------------------------------------------------------- /docs/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "benchmark", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "benchmark", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "apexcharts": "^3.43.0" 13 | }, 14 | "devDependencies": { 15 | "esbuild": "^0.19.4", 16 | "http-server": "^14.1.1" 17 | } 18 | }, 19 | "node_modules/@esbuild/android-arm": { 20 | "version": "0.19.5", 21 | "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.5.tgz", 22 | "integrity": "sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==", 23 | "cpu": [ 24 | "arm" 25 | ], 26 | "dev": true, 27 | "optional": true, 28 | "os": [ 29 | "android" 30 | ], 31 | "engines": { 32 | "node": ">=12" 33 | } 34 | }, 35 | "node_modules/@esbuild/android-arm64": { 36 | "version": "0.19.5", 37 | "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz", 38 | "integrity": "sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==", 39 | "cpu": [ 40 | "arm64" 41 | ], 42 | "dev": true, 43 | "optional": true, 44 | "os": [ 45 | "android" 46 | ], 47 | "engines": { 48 | "node": ">=12" 49 | } 50 | }, 51 | "node_modules/@esbuild/android-x64": { 52 | "version": "0.19.5", 53 | "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.5.tgz", 54 | "integrity": "sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==", 55 | "cpu": [ 56 | "x64" 57 | ], 58 | "dev": true, 59 | "optional": true, 60 | "os": [ 61 | "android" 62 | ], 63 | "engines": { 64 | "node": ">=12" 65 | } 66 | }, 67 | "node_modules/@esbuild/darwin-arm64": { 68 | "version": "0.19.5", 69 | "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz", 70 | "integrity": "sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==", 71 | "cpu": [ 72 | "arm64" 73 | ], 74 | "dev": true, 75 | "optional": true, 76 | "os": [ 77 | "darwin" 78 | ], 79 | "engines": { 80 | "node": ">=12" 81 | } 82 | }, 83 | "node_modules/@esbuild/darwin-x64": { 84 | "version": "0.19.5", 85 | "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz", 86 | "integrity": "sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==", 87 | "cpu": [ 88 | "x64" 89 | ], 90 | "dev": true, 91 | "optional": true, 92 | "os": [ 93 | "darwin" 94 | ], 95 | "engines": { 96 | "node": ">=12" 97 | } 98 | }, 99 | "node_modules/@esbuild/freebsd-arm64": { 100 | "version": "0.19.5", 101 | "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz", 102 | "integrity": "sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==", 103 | "cpu": [ 104 | "arm64" 105 | ], 106 | "dev": true, 107 | "optional": true, 108 | "os": [ 109 | "freebsd" 110 | ], 111 | "engines": { 112 | "node": ">=12" 113 | } 114 | }, 115 | "node_modules/@esbuild/freebsd-x64": { 116 | "version": "0.19.5", 117 | "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz", 118 | "integrity": "sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==", 119 | "cpu": [ 120 | "x64" 121 | ], 122 | "dev": true, 123 | "optional": true, 124 | "os": [ 125 | "freebsd" 126 | ], 127 | "engines": { 128 | "node": ">=12" 129 | } 130 | }, 131 | "node_modules/@esbuild/linux-arm": { 132 | "version": "0.19.5", 133 | "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz", 134 | "integrity": "sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==", 135 | "cpu": [ 136 | "arm" 137 | ], 138 | "dev": true, 139 | "optional": true, 140 | "os": [ 141 | "linux" 142 | ], 143 | "engines": { 144 | "node": ">=12" 145 | } 146 | }, 147 | "node_modules/@esbuild/linux-arm64": { 148 | "version": "0.19.5", 149 | "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz", 150 | "integrity": "sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==", 151 | "cpu": [ 152 | "arm64" 153 | ], 154 | "dev": true, 155 | "optional": true, 156 | "os": [ 157 | "linux" 158 | ], 159 | "engines": { 160 | "node": ">=12" 161 | } 162 | }, 163 | "node_modules/@esbuild/linux-ia32": { 164 | "version": "0.19.5", 165 | "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz", 166 | "integrity": "sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==", 167 | "cpu": [ 168 | "ia32" 169 | ], 170 | "dev": true, 171 | "optional": true, 172 | "os": [ 173 | "linux" 174 | ], 175 | "engines": { 176 | "node": ">=12" 177 | } 178 | }, 179 | "node_modules/@esbuild/linux-loong64": { 180 | "version": "0.19.5", 181 | "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz", 182 | "integrity": "sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==", 183 | "cpu": [ 184 | "loong64" 185 | ], 186 | "dev": true, 187 | "optional": true, 188 | "os": [ 189 | "linux" 190 | ], 191 | "engines": { 192 | "node": ">=12" 193 | } 194 | }, 195 | "node_modules/@esbuild/linux-mips64el": { 196 | "version": "0.19.5", 197 | "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz", 198 | "integrity": "sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==", 199 | "cpu": [ 200 | "mips64el" 201 | ], 202 | "dev": true, 203 | "optional": true, 204 | "os": [ 205 | "linux" 206 | ], 207 | "engines": { 208 | "node": ">=12" 209 | } 210 | }, 211 | "node_modules/@esbuild/linux-ppc64": { 212 | "version": "0.19.5", 213 | "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz", 214 | "integrity": "sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==", 215 | "cpu": [ 216 | "ppc64" 217 | ], 218 | "dev": true, 219 | "optional": true, 220 | "os": [ 221 | "linux" 222 | ], 223 | "engines": { 224 | "node": ">=12" 225 | } 226 | }, 227 | "node_modules/@esbuild/linux-riscv64": { 228 | "version": "0.19.5", 229 | "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz", 230 | "integrity": "sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==", 231 | "cpu": [ 232 | "riscv64" 233 | ], 234 | "dev": true, 235 | "optional": true, 236 | "os": [ 237 | "linux" 238 | ], 239 | "engines": { 240 | "node": ">=12" 241 | } 242 | }, 243 | "node_modules/@esbuild/linux-s390x": { 244 | "version": "0.19.5", 245 | "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz", 246 | "integrity": "sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==", 247 | "cpu": [ 248 | "s390x" 249 | ], 250 | "dev": true, 251 | "optional": true, 252 | "os": [ 253 | "linux" 254 | ], 255 | "engines": { 256 | "node": ">=12" 257 | } 258 | }, 259 | "node_modules/@esbuild/linux-x64": { 260 | "version": "0.19.5", 261 | "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz", 262 | "integrity": "sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==", 263 | "cpu": [ 264 | "x64" 265 | ], 266 | "dev": true, 267 | "optional": true, 268 | "os": [ 269 | "linux" 270 | ], 271 | "engines": { 272 | "node": ">=12" 273 | } 274 | }, 275 | "node_modules/@esbuild/netbsd-x64": { 276 | "version": "0.19.5", 277 | "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz", 278 | "integrity": "sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==", 279 | "cpu": [ 280 | "x64" 281 | ], 282 | "dev": true, 283 | "optional": true, 284 | "os": [ 285 | "netbsd" 286 | ], 287 | "engines": { 288 | "node": ">=12" 289 | } 290 | }, 291 | "node_modules/@esbuild/openbsd-x64": { 292 | "version": "0.19.5", 293 | "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz", 294 | "integrity": "sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==", 295 | "cpu": [ 296 | "x64" 297 | ], 298 | "dev": true, 299 | "optional": true, 300 | "os": [ 301 | "openbsd" 302 | ], 303 | "engines": { 304 | "node": ">=12" 305 | } 306 | }, 307 | "node_modules/@esbuild/sunos-x64": { 308 | "version": "0.19.5", 309 | "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz", 310 | "integrity": "sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==", 311 | "cpu": [ 312 | "x64" 313 | ], 314 | "dev": true, 315 | "optional": true, 316 | "os": [ 317 | "sunos" 318 | ], 319 | "engines": { 320 | "node": ">=12" 321 | } 322 | }, 323 | "node_modules/@esbuild/win32-arm64": { 324 | "version": "0.19.5", 325 | "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz", 326 | "integrity": "sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==", 327 | "cpu": [ 328 | "arm64" 329 | ], 330 | "dev": true, 331 | "optional": true, 332 | "os": [ 333 | "win32" 334 | ], 335 | "engines": { 336 | "node": ">=12" 337 | } 338 | }, 339 | "node_modules/@esbuild/win32-ia32": { 340 | "version": "0.19.5", 341 | "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz", 342 | "integrity": "sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==", 343 | "cpu": [ 344 | "ia32" 345 | ], 346 | "dev": true, 347 | "optional": true, 348 | "os": [ 349 | "win32" 350 | ], 351 | "engines": { 352 | "node": ">=12" 353 | } 354 | }, 355 | "node_modules/@esbuild/win32-x64": { 356 | "version": "0.19.5", 357 | "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz", 358 | "integrity": "sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==", 359 | "cpu": [ 360 | "x64" 361 | ], 362 | "dev": true, 363 | "optional": true, 364 | "os": [ 365 | "win32" 366 | ], 367 | "engines": { 368 | "node": ">=12" 369 | } 370 | }, 371 | "node_modules/@yr/monotone-cubic-spline": { 372 | "version": "1.0.3", 373 | "resolved": "https://registry.npmjs.org/@yr/monotone-cubic-spline/-/monotone-cubic-spline-1.0.3.tgz", 374 | "integrity": "sha512-FQXkOta0XBSUPHndIKON2Y9JeQz5ZeMqLYZVVK93FliNBFm7LNMIZmY6FrMEB9XPcDbE2bekMbZD6kzDkxwYjA==" 375 | }, 376 | "node_modules/ansi-styles": { 377 | "version": "4.3.0", 378 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 379 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 380 | "dev": true, 381 | "dependencies": { 382 | "color-convert": "^2.0.1" 383 | }, 384 | "engines": { 385 | "node": ">=8" 386 | }, 387 | "funding": { 388 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 389 | } 390 | }, 391 | "node_modules/apexcharts": { 392 | "version": "3.44.0", 393 | "resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.44.0.tgz", 394 | "integrity": "sha512-u7Xzrbcxc2yWznN78Jh5NMCYVAsWDfBjRl5ea++rVzFAqjU2hLz4RgKIFwYOBDRQtW1e/Qz8azJTqIJ1+Vu9Qg==", 395 | "dependencies": { 396 | "@yr/monotone-cubic-spline": "^1.0.3", 397 | "svg.draggable.js": "^2.2.2", 398 | "svg.easing.js": "^2.0.0", 399 | "svg.filter.js": "^2.0.2", 400 | "svg.pathmorphing.js": "^0.1.3", 401 | "svg.resize.js": "^1.4.3", 402 | "svg.select.js": "^3.0.1" 403 | } 404 | }, 405 | "node_modules/async": { 406 | "version": "2.6.4", 407 | "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", 408 | "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", 409 | "dev": true, 410 | "dependencies": { 411 | "lodash": "^4.17.14" 412 | } 413 | }, 414 | "node_modules/basic-auth": { 415 | "version": "2.0.1", 416 | "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", 417 | "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", 418 | "dev": true, 419 | "dependencies": { 420 | "safe-buffer": "5.1.2" 421 | }, 422 | "engines": { 423 | "node": ">= 0.8" 424 | } 425 | }, 426 | "node_modules/call-bind": { 427 | "version": "1.0.5", 428 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", 429 | "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", 430 | "dev": true, 431 | "dependencies": { 432 | "function-bind": "^1.1.2", 433 | "get-intrinsic": "^1.2.1", 434 | "set-function-length": "^1.1.1" 435 | }, 436 | "funding": { 437 | "url": "https://github.com/sponsors/ljharb" 438 | } 439 | }, 440 | "node_modules/chalk": { 441 | "version": "4.1.2", 442 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 443 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 444 | "dev": true, 445 | "dependencies": { 446 | "ansi-styles": "^4.1.0", 447 | "supports-color": "^7.1.0" 448 | }, 449 | "engines": { 450 | "node": ">=10" 451 | }, 452 | "funding": { 453 | "url": "https://github.com/chalk/chalk?sponsor=1" 454 | } 455 | }, 456 | "node_modules/color-convert": { 457 | "version": "2.0.1", 458 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 459 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 460 | "dev": true, 461 | "dependencies": { 462 | "color-name": "~1.1.4" 463 | }, 464 | "engines": { 465 | "node": ">=7.0.0" 466 | } 467 | }, 468 | "node_modules/color-name": { 469 | "version": "1.1.4", 470 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 471 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 472 | "dev": true 473 | }, 474 | "node_modules/corser": { 475 | "version": "2.0.1", 476 | "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz", 477 | "integrity": "sha512-utCYNzRSQIZNPIcGZdQc92UVJYAhtGAteCFg0yRaFm8f0P+CPtyGyHXJcGXnffjCybUCEx3FQ2G7U3/o9eIkVQ==", 478 | "dev": true, 479 | "engines": { 480 | "node": ">= 0.4.0" 481 | } 482 | }, 483 | "node_modules/debug": { 484 | "version": "3.2.7", 485 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", 486 | "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", 487 | "dev": true, 488 | "dependencies": { 489 | "ms": "^2.1.1" 490 | } 491 | }, 492 | "node_modules/define-data-property": { 493 | "version": "1.1.1", 494 | "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", 495 | "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", 496 | "dev": true, 497 | "dependencies": { 498 | "get-intrinsic": "^1.2.1", 499 | "gopd": "^1.0.1", 500 | "has-property-descriptors": "^1.0.0" 501 | }, 502 | "engines": { 503 | "node": ">= 0.4" 504 | } 505 | }, 506 | "node_modules/esbuild": { 507 | "version": "0.19.5", 508 | "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz", 509 | "integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==", 510 | "dev": true, 511 | "hasInstallScript": true, 512 | "bin": { 513 | "esbuild": "bin/esbuild" 514 | }, 515 | "engines": { 516 | "node": ">=12" 517 | }, 518 | "optionalDependencies": { 519 | "@esbuild/android-arm": "0.19.5", 520 | "@esbuild/android-arm64": "0.19.5", 521 | "@esbuild/android-x64": "0.19.5", 522 | "@esbuild/darwin-arm64": "0.19.5", 523 | "@esbuild/darwin-x64": "0.19.5", 524 | "@esbuild/freebsd-arm64": "0.19.5", 525 | "@esbuild/freebsd-x64": "0.19.5", 526 | "@esbuild/linux-arm": "0.19.5", 527 | "@esbuild/linux-arm64": "0.19.5", 528 | "@esbuild/linux-ia32": "0.19.5", 529 | "@esbuild/linux-loong64": "0.19.5", 530 | "@esbuild/linux-mips64el": "0.19.5", 531 | "@esbuild/linux-ppc64": "0.19.5", 532 | "@esbuild/linux-riscv64": "0.19.5", 533 | "@esbuild/linux-s390x": "0.19.5", 534 | "@esbuild/linux-x64": "0.19.5", 535 | "@esbuild/netbsd-x64": "0.19.5", 536 | "@esbuild/openbsd-x64": "0.19.5", 537 | "@esbuild/sunos-x64": "0.19.5", 538 | "@esbuild/win32-arm64": "0.19.5", 539 | "@esbuild/win32-ia32": "0.19.5", 540 | "@esbuild/win32-x64": "0.19.5" 541 | } 542 | }, 543 | "node_modules/eventemitter3": { 544 | "version": "4.0.7", 545 | "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", 546 | "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", 547 | "dev": true 548 | }, 549 | "node_modules/follow-redirects": { 550 | "version": "1.15.3", 551 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", 552 | "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", 553 | "dev": true, 554 | "funding": [ 555 | { 556 | "type": "individual", 557 | "url": "https://github.com/sponsors/RubenVerborgh" 558 | } 559 | ], 560 | "engines": { 561 | "node": ">=4.0" 562 | }, 563 | "peerDependenciesMeta": { 564 | "debug": { 565 | "optional": true 566 | } 567 | } 568 | }, 569 | "node_modules/function-bind": { 570 | "version": "1.1.2", 571 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 572 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 573 | "dev": true, 574 | "funding": { 575 | "url": "https://github.com/sponsors/ljharb" 576 | } 577 | }, 578 | "node_modules/get-intrinsic": { 579 | "version": "1.2.2", 580 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", 581 | "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", 582 | "dev": true, 583 | "dependencies": { 584 | "function-bind": "^1.1.2", 585 | "has-proto": "^1.0.1", 586 | "has-symbols": "^1.0.3", 587 | "hasown": "^2.0.0" 588 | }, 589 | "funding": { 590 | "url": "https://github.com/sponsors/ljharb" 591 | } 592 | }, 593 | "node_modules/gopd": { 594 | "version": "1.0.1", 595 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", 596 | "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", 597 | "dev": true, 598 | "dependencies": { 599 | "get-intrinsic": "^1.1.3" 600 | }, 601 | "funding": { 602 | "url": "https://github.com/sponsors/ljharb" 603 | } 604 | }, 605 | "node_modules/has-flag": { 606 | "version": "4.0.0", 607 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 608 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 609 | "dev": true, 610 | "engines": { 611 | "node": ">=8" 612 | } 613 | }, 614 | "node_modules/has-property-descriptors": { 615 | "version": "1.0.1", 616 | "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", 617 | "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", 618 | "dev": true, 619 | "dependencies": { 620 | "get-intrinsic": "^1.2.2" 621 | }, 622 | "funding": { 623 | "url": "https://github.com/sponsors/ljharb" 624 | } 625 | }, 626 | "node_modules/has-proto": { 627 | "version": "1.0.1", 628 | "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", 629 | "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", 630 | "dev": true, 631 | "engines": { 632 | "node": ">= 0.4" 633 | }, 634 | "funding": { 635 | "url": "https://github.com/sponsors/ljharb" 636 | } 637 | }, 638 | "node_modules/has-symbols": { 639 | "version": "1.0.3", 640 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", 641 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", 642 | "dev": true, 643 | "engines": { 644 | "node": ">= 0.4" 645 | }, 646 | "funding": { 647 | "url": "https://github.com/sponsors/ljharb" 648 | } 649 | }, 650 | "node_modules/hasown": { 651 | "version": "2.0.0", 652 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", 653 | "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", 654 | "dev": true, 655 | "dependencies": { 656 | "function-bind": "^1.1.2" 657 | }, 658 | "engines": { 659 | "node": ">= 0.4" 660 | } 661 | }, 662 | "node_modules/he": { 663 | "version": "1.2.0", 664 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 665 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 666 | "dev": true, 667 | "bin": { 668 | "he": "bin/he" 669 | } 670 | }, 671 | "node_modules/html-encoding-sniffer": { 672 | "version": "3.0.0", 673 | "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", 674 | "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", 675 | "dev": true, 676 | "dependencies": { 677 | "whatwg-encoding": "^2.0.0" 678 | }, 679 | "engines": { 680 | "node": ">=12" 681 | } 682 | }, 683 | "node_modules/http-proxy": { 684 | "version": "1.18.1", 685 | "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", 686 | "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", 687 | "dev": true, 688 | "dependencies": { 689 | "eventemitter3": "^4.0.0", 690 | "follow-redirects": "^1.0.0", 691 | "requires-port": "^1.0.0" 692 | }, 693 | "engines": { 694 | "node": ">=8.0.0" 695 | } 696 | }, 697 | "node_modules/http-server": { 698 | "version": "14.1.1", 699 | "resolved": "https://registry.npmjs.org/http-server/-/http-server-14.1.1.tgz", 700 | "integrity": "sha512-+cbxadF40UXd9T01zUHgA+rlo2Bg1Srer4+B4NwIHdaGxAGGv59nYRnGGDJ9LBk7alpS0US+J+bLLdQOOkJq4A==", 701 | "dev": true, 702 | "dependencies": { 703 | "basic-auth": "^2.0.1", 704 | "chalk": "^4.1.2", 705 | "corser": "^2.0.1", 706 | "he": "^1.2.0", 707 | "html-encoding-sniffer": "^3.0.0", 708 | "http-proxy": "^1.18.1", 709 | "mime": "^1.6.0", 710 | "minimist": "^1.2.6", 711 | "opener": "^1.5.1", 712 | "portfinder": "^1.0.28", 713 | "secure-compare": "3.0.1", 714 | "union": "~0.5.0", 715 | "url-join": "^4.0.1" 716 | }, 717 | "bin": { 718 | "http-server": "bin/http-server" 719 | }, 720 | "engines": { 721 | "node": ">=12" 722 | } 723 | }, 724 | "node_modules/iconv-lite": { 725 | "version": "0.6.3", 726 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", 727 | "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", 728 | "dev": true, 729 | "dependencies": { 730 | "safer-buffer": ">= 2.1.2 < 3.0.0" 731 | }, 732 | "engines": { 733 | "node": ">=0.10.0" 734 | } 735 | }, 736 | "node_modules/lodash": { 737 | "version": "4.17.21", 738 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 739 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", 740 | "dev": true 741 | }, 742 | "node_modules/mime": { 743 | "version": "1.6.0", 744 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 745 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 746 | "dev": true, 747 | "bin": { 748 | "mime": "cli.js" 749 | }, 750 | "engines": { 751 | "node": ">=4" 752 | } 753 | }, 754 | "node_modules/minimist": { 755 | "version": "1.2.8", 756 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", 757 | "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", 758 | "dev": true, 759 | "funding": { 760 | "url": "https://github.com/sponsors/ljharb" 761 | } 762 | }, 763 | "node_modules/mkdirp": { 764 | "version": "0.5.6", 765 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", 766 | "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", 767 | "dev": true, 768 | "dependencies": { 769 | "minimist": "^1.2.6" 770 | }, 771 | "bin": { 772 | "mkdirp": "bin/cmd.js" 773 | } 774 | }, 775 | "node_modules/ms": { 776 | "version": "2.1.3", 777 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 778 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 779 | "dev": true 780 | }, 781 | "node_modules/object-inspect": { 782 | "version": "1.13.1", 783 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", 784 | "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", 785 | "dev": true, 786 | "funding": { 787 | "url": "https://github.com/sponsors/ljharb" 788 | } 789 | }, 790 | "node_modules/opener": { 791 | "version": "1.5.2", 792 | "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", 793 | "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", 794 | "dev": true, 795 | "bin": { 796 | "opener": "bin/opener-bin.js" 797 | } 798 | }, 799 | "node_modules/portfinder": { 800 | "version": "1.0.32", 801 | "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.32.tgz", 802 | "integrity": "sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==", 803 | "dev": true, 804 | "dependencies": { 805 | "async": "^2.6.4", 806 | "debug": "^3.2.7", 807 | "mkdirp": "^0.5.6" 808 | }, 809 | "engines": { 810 | "node": ">= 0.12.0" 811 | } 812 | }, 813 | "node_modules/qs": { 814 | "version": "6.11.2", 815 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", 816 | "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", 817 | "dev": true, 818 | "dependencies": { 819 | "side-channel": "^1.0.4" 820 | }, 821 | "engines": { 822 | "node": ">=0.6" 823 | }, 824 | "funding": { 825 | "url": "https://github.com/sponsors/ljharb" 826 | } 827 | }, 828 | "node_modules/requires-port": { 829 | "version": "1.0.0", 830 | "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", 831 | "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", 832 | "dev": true 833 | }, 834 | "node_modules/safe-buffer": { 835 | "version": "5.1.2", 836 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 837 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", 838 | "dev": true 839 | }, 840 | "node_modules/safer-buffer": { 841 | "version": "2.1.2", 842 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 843 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 844 | "dev": true 845 | }, 846 | "node_modules/secure-compare": { 847 | "version": "3.0.1", 848 | "resolved": "https://registry.npmjs.org/secure-compare/-/secure-compare-3.0.1.tgz", 849 | "integrity": "sha512-AckIIV90rPDcBcglUwXPF3kg0P0qmPsPXAj6BBEENQE1p5yA1xfmDJzfi1Tappj37Pv2mVbKpL3Z1T+Nn7k1Qw==", 850 | "dev": true 851 | }, 852 | "node_modules/set-function-length": { 853 | "version": "1.1.1", 854 | "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", 855 | "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", 856 | "dev": true, 857 | "dependencies": { 858 | "define-data-property": "^1.1.1", 859 | "get-intrinsic": "^1.2.1", 860 | "gopd": "^1.0.1", 861 | "has-property-descriptors": "^1.0.0" 862 | }, 863 | "engines": { 864 | "node": ">= 0.4" 865 | } 866 | }, 867 | "node_modules/side-channel": { 868 | "version": "1.0.4", 869 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", 870 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", 871 | "dev": true, 872 | "dependencies": { 873 | "call-bind": "^1.0.0", 874 | "get-intrinsic": "^1.0.2", 875 | "object-inspect": "^1.9.0" 876 | }, 877 | "funding": { 878 | "url": "https://github.com/sponsors/ljharb" 879 | } 880 | }, 881 | "node_modules/supports-color": { 882 | "version": "7.2.0", 883 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 884 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 885 | "dev": true, 886 | "dependencies": { 887 | "has-flag": "^4.0.0" 888 | }, 889 | "engines": { 890 | "node": ">=8" 891 | } 892 | }, 893 | "node_modules/svg.draggable.js": { 894 | "version": "2.2.2", 895 | "resolved": "https://registry.npmjs.org/svg.draggable.js/-/svg.draggable.js-2.2.2.tgz", 896 | "integrity": "sha512-JzNHBc2fLQMzYCZ90KZHN2ohXL0BQJGQimK1kGk6AvSeibuKcIdDX9Kr0dT9+UJ5O8nYA0RB839Lhvk4CY4MZw==", 897 | "dependencies": { 898 | "svg.js": "^2.0.1" 899 | }, 900 | "engines": { 901 | "node": ">= 0.8.0" 902 | } 903 | }, 904 | "node_modules/svg.easing.js": { 905 | "version": "2.0.0", 906 | "resolved": "https://registry.npmjs.org/svg.easing.js/-/svg.easing.js-2.0.0.tgz", 907 | "integrity": "sha512-//ctPdJMGy22YoYGV+3HEfHbm6/69LJUTAqI2/5qBvaNHZ9uUFVC82B0Pl299HzgH13rKrBgi4+XyXXyVWWthA==", 908 | "dependencies": { 909 | "svg.js": ">=2.3.x" 910 | }, 911 | "engines": { 912 | "node": ">= 0.8.0" 913 | } 914 | }, 915 | "node_modules/svg.filter.js": { 916 | "version": "2.0.2", 917 | "resolved": "https://registry.npmjs.org/svg.filter.js/-/svg.filter.js-2.0.2.tgz", 918 | "integrity": "sha512-xkGBwU+dKBzqg5PtilaTb0EYPqPfJ9Q6saVldX+5vCRy31P6TlRCP3U9NxH3HEufkKkpNgdTLBJnmhDHeTqAkw==", 919 | "dependencies": { 920 | "svg.js": "^2.2.5" 921 | }, 922 | "engines": { 923 | "node": ">= 0.8.0" 924 | } 925 | }, 926 | "node_modules/svg.js": { 927 | "version": "2.7.1", 928 | "resolved": "https://registry.npmjs.org/svg.js/-/svg.js-2.7.1.tgz", 929 | "integrity": "sha512-ycbxpizEQktk3FYvn/8BH+6/EuWXg7ZpQREJvgacqn46gIddG24tNNe4Son6omdXCnSOaApnpZw6MPCBA1dODA==" 930 | }, 931 | "node_modules/svg.pathmorphing.js": { 932 | "version": "0.1.3", 933 | "resolved": "https://registry.npmjs.org/svg.pathmorphing.js/-/svg.pathmorphing.js-0.1.3.tgz", 934 | "integrity": "sha512-49HWI9X4XQR/JG1qXkSDV8xViuTLIWm/B/7YuQELV5KMOPtXjiwH4XPJvr/ghEDibmLQ9Oc22dpWpG0vUDDNww==", 935 | "dependencies": { 936 | "svg.js": "^2.4.0" 937 | }, 938 | "engines": { 939 | "node": ">= 0.8.0" 940 | } 941 | }, 942 | "node_modules/svg.resize.js": { 943 | "version": "1.4.3", 944 | "resolved": "https://registry.npmjs.org/svg.resize.js/-/svg.resize.js-1.4.3.tgz", 945 | "integrity": "sha512-9k5sXJuPKp+mVzXNvxz7U0uC9oVMQrrf7cFsETznzUDDm0x8+77dtZkWdMfRlmbkEEYvUn9btKuZ3n41oNA+uw==", 946 | "dependencies": { 947 | "svg.js": "^2.6.5", 948 | "svg.select.js": "^2.1.2" 949 | }, 950 | "engines": { 951 | "node": ">= 0.8.0" 952 | } 953 | }, 954 | "node_modules/svg.resize.js/node_modules/svg.select.js": { 955 | "version": "2.1.2", 956 | "resolved": "https://registry.npmjs.org/svg.select.js/-/svg.select.js-2.1.2.tgz", 957 | "integrity": "sha512-tH6ABEyJsAOVAhwcCjF8mw4crjXSI1aa7j2VQR8ZuJ37H2MBUbyeqYr5nEO7sSN3cy9AR9DUwNg0t/962HlDbQ==", 958 | "dependencies": { 959 | "svg.js": "^2.2.5" 960 | }, 961 | "engines": { 962 | "node": ">= 0.8.0" 963 | } 964 | }, 965 | "node_modules/svg.select.js": { 966 | "version": "3.0.1", 967 | "resolved": "https://registry.npmjs.org/svg.select.js/-/svg.select.js-3.0.1.tgz", 968 | "integrity": "sha512-h5IS/hKkuVCbKSieR9uQCj9w+zLHoPh+ce19bBYyqF53g6mnPB8sAtIbe1s9dh2S2fCmYX2xel1Ln3PJBbK4kw==", 969 | "dependencies": { 970 | "svg.js": "^2.6.5" 971 | }, 972 | "engines": { 973 | "node": ">= 0.8.0" 974 | } 975 | }, 976 | "node_modules/union": { 977 | "version": "0.5.0", 978 | "resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz", 979 | "integrity": "sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==", 980 | "dev": true, 981 | "dependencies": { 982 | "qs": "^6.4.0" 983 | }, 984 | "engines": { 985 | "node": ">= 0.8.0" 986 | } 987 | }, 988 | "node_modules/url-join": { 989 | "version": "4.0.1", 990 | "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", 991 | "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", 992 | "dev": true 993 | }, 994 | "node_modules/whatwg-encoding": { 995 | "version": "2.0.0", 996 | "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", 997 | "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", 998 | "dev": true, 999 | "dependencies": { 1000 | "iconv-lite": "0.6.3" 1001 | }, 1002 | "engines": { 1003 | "node": ">=12" 1004 | } 1005 | } 1006 | } 1007 | } 1008 | -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "benchmark", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "main.js", 6 | "scripts": { 7 | "build:prod": "esbuild --bundle --minify --outfile=dist/main.js main.js", 8 | "build:dev": "esbuild --watch --bundle --minify --outfile=dist/main.js main.js", 9 | "server": "http-server -p 4000" 10 | }, 11 | "keywords": [], 12 | "author": "", 13 | "license": "ISC", 14 | "dependencies": { 15 | "apexcharts": "^3.43.0" 16 | }, 17 | "devDependencies": { 18 | "http-server": "^14.1.1", 19 | "esbuild": "^0.19.4" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /docs/pnpm-lock.yaml: -------------------------------------------------------------------------------- 1 | lockfileVersion: '6.0' 2 | 3 | settings: 4 | autoInstallPeers: true 5 | excludeLinksFromLockfile: false 6 | 7 | dependencies: 8 | apexcharts: 9 | specifier: ^3.43.0 10 | version: 3.44.0 11 | esbuild: 12 | specifier: ^0.19.4 13 | version: 0.19.5 14 | 15 | devDependencies: 16 | http-server: 17 | specifier: ^14.1.1 18 | version: 14.1.1 19 | 20 | packages: 21 | 22 | /@esbuild/android-arm64@0.19.5: 23 | resolution: {integrity: sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==} 24 | engines: {node: '>=12'} 25 | cpu: [arm64] 26 | os: [android] 27 | requiresBuild: true 28 | dev: false 29 | optional: true 30 | 31 | /@esbuild/android-arm@0.19.5: 32 | resolution: {integrity: sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==} 33 | engines: {node: '>=12'} 34 | cpu: [arm] 35 | os: [android] 36 | requiresBuild: true 37 | dev: false 38 | optional: true 39 | 40 | /@esbuild/android-x64@0.19.5: 41 | resolution: {integrity: sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==} 42 | engines: {node: '>=12'} 43 | cpu: [x64] 44 | os: [android] 45 | requiresBuild: true 46 | dev: false 47 | optional: true 48 | 49 | /@esbuild/darwin-arm64@0.19.5: 50 | resolution: {integrity: sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==} 51 | engines: {node: '>=12'} 52 | cpu: [arm64] 53 | os: [darwin] 54 | requiresBuild: true 55 | dev: false 56 | optional: true 57 | 58 | /@esbuild/darwin-x64@0.19.5: 59 | resolution: {integrity: sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==} 60 | engines: {node: '>=12'} 61 | cpu: [x64] 62 | os: [darwin] 63 | requiresBuild: true 64 | dev: false 65 | optional: true 66 | 67 | /@esbuild/freebsd-arm64@0.19.5: 68 | resolution: {integrity: sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==} 69 | engines: {node: '>=12'} 70 | cpu: [arm64] 71 | os: [freebsd] 72 | requiresBuild: true 73 | dev: false 74 | optional: true 75 | 76 | /@esbuild/freebsd-x64@0.19.5: 77 | resolution: {integrity: sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==} 78 | engines: {node: '>=12'} 79 | cpu: [x64] 80 | os: [freebsd] 81 | requiresBuild: true 82 | dev: false 83 | optional: true 84 | 85 | /@esbuild/linux-arm64@0.19.5: 86 | resolution: {integrity: sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==} 87 | engines: {node: '>=12'} 88 | cpu: [arm64] 89 | os: [linux] 90 | requiresBuild: true 91 | dev: false 92 | optional: true 93 | 94 | /@esbuild/linux-arm@0.19.5: 95 | resolution: {integrity: sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==} 96 | engines: {node: '>=12'} 97 | cpu: [arm] 98 | os: [linux] 99 | requiresBuild: true 100 | dev: false 101 | optional: true 102 | 103 | /@esbuild/linux-ia32@0.19.5: 104 | resolution: {integrity: sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==} 105 | engines: {node: '>=12'} 106 | cpu: [ia32] 107 | os: [linux] 108 | requiresBuild: true 109 | dev: false 110 | optional: true 111 | 112 | /@esbuild/linux-loong64@0.19.5: 113 | resolution: {integrity: sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==} 114 | engines: {node: '>=12'} 115 | cpu: [loong64] 116 | os: [linux] 117 | requiresBuild: true 118 | dev: false 119 | optional: true 120 | 121 | /@esbuild/linux-mips64el@0.19.5: 122 | resolution: {integrity: sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==} 123 | engines: {node: '>=12'} 124 | cpu: [mips64el] 125 | os: [linux] 126 | requiresBuild: true 127 | dev: false 128 | optional: true 129 | 130 | /@esbuild/linux-ppc64@0.19.5: 131 | resolution: {integrity: sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==} 132 | engines: {node: '>=12'} 133 | cpu: [ppc64] 134 | os: [linux] 135 | requiresBuild: true 136 | dev: false 137 | optional: true 138 | 139 | /@esbuild/linux-riscv64@0.19.5: 140 | resolution: {integrity: sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==} 141 | engines: {node: '>=12'} 142 | cpu: [riscv64] 143 | os: [linux] 144 | requiresBuild: true 145 | dev: false 146 | optional: true 147 | 148 | /@esbuild/linux-s390x@0.19.5: 149 | resolution: {integrity: sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==} 150 | engines: {node: '>=12'} 151 | cpu: [s390x] 152 | os: [linux] 153 | requiresBuild: true 154 | dev: false 155 | optional: true 156 | 157 | /@esbuild/linux-x64@0.19.5: 158 | resolution: {integrity: sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==} 159 | engines: {node: '>=12'} 160 | cpu: [x64] 161 | os: [linux] 162 | requiresBuild: true 163 | dev: false 164 | optional: true 165 | 166 | /@esbuild/netbsd-x64@0.19.5: 167 | resolution: {integrity: sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==} 168 | engines: {node: '>=12'} 169 | cpu: [x64] 170 | os: [netbsd] 171 | requiresBuild: true 172 | dev: false 173 | optional: true 174 | 175 | /@esbuild/openbsd-x64@0.19.5: 176 | resolution: {integrity: sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==} 177 | engines: {node: '>=12'} 178 | cpu: [x64] 179 | os: [openbsd] 180 | requiresBuild: true 181 | dev: false 182 | optional: true 183 | 184 | /@esbuild/sunos-x64@0.19.5: 185 | resolution: {integrity: sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==} 186 | engines: {node: '>=12'} 187 | cpu: [x64] 188 | os: [sunos] 189 | requiresBuild: true 190 | dev: false 191 | optional: true 192 | 193 | /@esbuild/win32-arm64@0.19.5: 194 | resolution: {integrity: sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==} 195 | engines: {node: '>=12'} 196 | cpu: [arm64] 197 | os: [win32] 198 | requiresBuild: true 199 | dev: false 200 | optional: true 201 | 202 | /@esbuild/win32-ia32@0.19.5: 203 | resolution: {integrity: sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==} 204 | engines: {node: '>=12'} 205 | cpu: [ia32] 206 | os: [win32] 207 | requiresBuild: true 208 | dev: false 209 | optional: true 210 | 211 | /@esbuild/win32-x64@0.19.5: 212 | resolution: {integrity: sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==} 213 | engines: {node: '>=12'} 214 | cpu: [x64] 215 | os: [win32] 216 | requiresBuild: true 217 | dev: false 218 | optional: true 219 | 220 | /@yr/monotone-cubic-spline@1.0.3: 221 | resolution: {integrity: sha512-FQXkOta0XBSUPHndIKON2Y9JeQz5ZeMqLYZVVK93FliNBFm7LNMIZmY6FrMEB9XPcDbE2bekMbZD6kzDkxwYjA==} 222 | dev: false 223 | 224 | /ansi-styles@4.3.0: 225 | resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} 226 | engines: {node: '>=8'} 227 | dependencies: 228 | color-convert: 2.0.1 229 | dev: true 230 | 231 | /apexcharts@3.44.0: 232 | resolution: {integrity: sha512-u7Xzrbcxc2yWznN78Jh5NMCYVAsWDfBjRl5ea++rVzFAqjU2hLz4RgKIFwYOBDRQtW1e/Qz8azJTqIJ1+Vu9Qg==} 233 | dependencies: 234 | '@yr/monotone-cubic-spline': 1.0.3 235 | svg.draggable.js: 2.2.2 236 | svg.easing.js: 2.0.0 237 | svg.filter.js: 2.0.2 238 | svg.pathmorphing.js: 0.1.3 239 | svg.resize.js: 1.4.3 240 | svg.select.js: 3.0.1 241 | dev: false 242 | 243 | /async@2.6.4: 244 | resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} 245 | dependencies: 246 | lodash: 4.17.21 247 | dev: true 248 | 249 | /basic-auth@2.0.1: 250 | resolution: {integrity: sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==} 251 | engines: {node: '>= 0.8'} 252 | dependencies: 253 | safe-buffer: 5.1.2 254 | dev: true 255 | 256 | /call-bind@1.0.5: 257 | resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} 258 | dependencies: 259 | function-bind: 1.1.2 260 | get-intrinsic: 1.2.2 261 | set-function-length: 1.1.1 262 | dev: true 263 | 264 | /chalk@4.1.2: 265 | resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} 266 | engines: {node: '>=10'} 267 | dependencies: 268 | ansi-styles: 4.3.0 269 | supports-color: 7.2.0 270 | dev: true 271 | 272 | /color-convert@2.0.1: 273 | resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} 274 | engines: {node: '>=7.0.0'} 275 | dependencies: 276 | color-name: 1.1.4 277 | dev: true 278 | 279 | /color-name@1.1.4: 280 | resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} 281 | dev: true 282 | 283 | /corser@2.0.1: 284 | resolution: {integrity: sha512-utCYNzRSQIZNPIcGZdQc92UVJYAhtGAteCFg0yRaFm8f0P+CPtyGyHXJcGXnffjCybUCEx3FQ2G7U3/o9eIkVQ==} 285 | engines: {node: '>= 0.4.0'} 286 | dev: true 287 | 288 | /debug@3.2.7: 289 | resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} 290 | peerDependencies: 291 | supports-color: '*' 292 | peerDependenciesMeta: 293 | supports-color: 294 | optional: true 295 | dependencies: 296 | ms: 2.1.3 297 | dev: true 298 | 299 | /define-data-property@1.1.1: 300 | resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} 301 | engines: {node: '>= 0.4'} 302 | dependencies: 303 | get-intrinsic: 1.2.2 304 | gopd: 1.0.1 305 | has-property-descriptors: 1.0.1 306 | dev: true 307 | 308 | /esbuild@0.19.5: 309 | resolution: {integrity: sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==} 310 | engines: {node: '>=12'} 311 | hasBin: true 312 | requiresBuild: true 313 | optionalDependencies: 314 | '@esbuild/android-arm': 0.19.5 315 | '@esbuild/android-arm64': 0.19.5 316 | '@esbuild/android-x64': 0.19.5 317 | '@esbuild/darwin-arm64': 0.19.5 318 | '@esbuild/darwin-x64': 0.19.5 319 | '@esbuild/freebsd-arm64': 0.19.5 320 | '@esbuild/freebsd-x64': 0.19.5 321 | '@esbuild/linux-arm': 0.19.5 322 | '@esbuild/linux-arm64': 0.19.5 323 | '@esbuild/linux-ia32': 0.19.5 324 | '@esbuild/linux-loong64': 0.19.5 325 | '@esbuild/linux-mips64el': 0.19.5 326 | '@esbuild/linux-ppc64': 0.19.5 327 | '@esbuild/linux-riscv64': 0.19.5 328 | '@esbuild/linux-s390x': 0.19.5 329 | '@esbuild/linux-x64': 0.19.5 330 | '@esbuild/netbsd-x64': 0.19.5 331 | '@esbuild/openbsd-x64': 0.19.5 332 | '@esbuild/sunos-x64': 0.19.5 333 | '@esbuild/win32-arm64': 0.19.5 334 | '@esbuild/win32-ia32': 0.19.5 335 | '@esbuild/win32-x64': 0.19.5 336 | dev: false 337 | 338 | /eventemitter3@4.0.7: 339 | resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} 340 | dev: true 341 | 342 | /follow-redirects@1.15.3: 343 | resolution: {integrity: sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==} 344 | engines: {node: '>=4.0'} 345 | peerDependencies: 346 | debug: '*' 347 | peerDependenciesMeta: 348 | debug: 349 | optional: true 350 | dev: true 351 | 352 | /function-bind@1.1.2: 353 | resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} 354 | dev: true 355 | 356 | /get-intrinsic@1.2.2: 357 | resolution: {integrity: sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==} 358 | dependencies: 359 | function-bind: 1.1.2 360 | has-proto: 1.0.1 361 | has-symbols: 1.0.3 362 | hasown: 2.0.0 363 | dev: true 364 | 365 | /gopd@1.0.1: 366 | resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} 367 | dependencies: 368 | get-intrinsic: 1.2.2 369 | dev: true 370 | 371 | /has-flag@4.0.0: 372 | resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} 373 | engines: {node: '>=8'} 374 | dev: true 375 | 376 | /has-property-descriptors@1.0.1: 377 | resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==} 378 | dependencies: 379 | get-intrinsic: 1.2.2 380 | dev: true 381 | 382 | /has-proto@1.0.1: 383 | resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} 384 | engines: {node: '>= 0.4'} 385 | dev: true 386 | 387 | /has-symbols@1.0.3: 388 | resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} 389 | engines: {node: '>= 0.4'} 390 | dev: true 391 | 392 | /hasown@2.0.0: 393 | resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} 394 | engines: {node: '>= 0.4'} 395 | dependencies: 396 | function-bind: 1.1.2 397 | dev: true 398 | 399 | /he@1.2.0: 400 | resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} 401 | hasBin: true 402 | dev: true 403 | 404 | /html-encoding-sniffer@3.0.0: 405 | resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} 406 | engines: {node: '>=12'} 407 | dependencies: 408 | whatwg-encoding: 2.0.0 409 | dev: true 410 | 411 | /http-proxy@1.18.1: 412 | resolution: {integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==} 413 | engines: {node: '>=8.0.0'} 414 | dependencies: 415 | eventemitter3: 4.0.7 416 | follow-redirects: 1.15.3 417 | requires-port: 1.0.0 418 | transitivePeerDependencies: 419 | - debug 420 | dev: true 421 | 422 | /http-server@14.1.1: 423 | resolution: {integrity: sha512-+cbxadF40UXd9T01zUHgA+rlo2Bg1Srer4+B4NwIHdaGxAGGv59nYRnGGDJ9LBk7alpS0US+J+bLLdQOOkJq4A==} 424 | engines: {node: '>=12'} 425 | hasBin: true 426 | dependencies: 427 | basic-auth: 2.0.1 428 | chalk: 4.1.2 429 | corser: 2.0.1 430 | he: 1.2.0 431 | html-encoding-sniffer: 3.0.0 432 | http-proxy: 1.18.1 433 | mime: 1.6.0 434 | minimist: 1.2.8 435 | opener: 1.5.2 436 | portfinder: 1.0.32 437 | secure-compare: 3.0.1 438 | union: 0.5.0 439 | url-join: 4.0.1 440 | transitivePeerDependencies: 441 | - debug 442 | - supports-color 443 | dev: true 444 | 445 | /iconv-lite@0.6.3: 446 | resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} 447 | engines: {node: '>=0.10.0'} 448 | dependencies: 449 | safer-buffer: 2.1.2 450 | dev: true 451 | 452 | /lodash@4.17.21: 453 | resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} 454 | dev: true 455 | 456 | /mime@1.6.0: 457 | resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} 458 | engines: {node: '>=4'} 459 | hasBin: true 460 | dev: true 461 | 462 | /minimist@1.2.8: 463 | resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} 464 | dev: true 465 | 466 | /mkdirp@0.5.6: 467 | resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} 468 | hasBin: true 469 | dependencies: 470 | minimist: 1.2.8 471 | dev: true 472 | 473 | /ms@2.1.3: 474 | resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} 475 | dev: true 476 | 477 | /object-inspect@1.13.1: 478 | resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} 479 | dev: true 480 | 481 | /opener@1.5.2: 482 | resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==} 483 | hasBin: true 484 | dev: true 485 | 486 | /portfinder@1.0.32: 487 | resolution: {integrity: sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==} 488 | engines: {node: '>= 0.12.0'} 489 | dependencies: 490 | async: 2.6.4 491 | debug: 3.2.7 492 | mkdirp: 0.5.6 493 | transitivePeerDependencies: 494 | - supports-color 495 | dev: true 496 | 497 | /qs@6.11.2: 498 | resolution: {integrity: sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==} 499 | engines: {node: '>=0.6'} 500 | dependencies: 501 | side-channel: 1.0.4 502 | dev: true 503 | 504 | /requires-port@1.0.0: 505 | resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} 506 | dev: true 507 | 508 | /safe-buffer@5.1.2: 509 | resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} 510 | dev: true 511 | 512 | /safer-buffer@2.1.2: 513 | resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} 514 | dev: true 515 | 516 | /secure-compare@3.0.1: 517 | resolution: {integrity: sha512-AckIIV90rPDcBcglUwXPF3kg0P0qmPsPXAj6BBEENQE1p5yA1xfmDJzfi1Tappj37Pv2mVbKpL3Z1T+Nn7k1Qw==} 518 | dev: true 519 | 520 | /set-function-length@1.1.1: 521 | resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} 522 | engines: {node: '>= 0.4'} 523 | dependencies: 524 | define-data-property: 1.1.1 525 | get-intrinsic: 1.2.2 526 | gopd: 1.0.1 527 | has-property-descriptors: 1.0.1 528 | dev: true 529 | 530 | /side-channel@1.0.4: 531 | resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} 532 | dependencies: 533 | call-bind: 1.0.5 534 | get-intrinsic: 1.2.2 535 | object-inspect: 1.13.1 536 | dev: true 537 | 538 | /supports-color@7.2.0: 539 | resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} 540 | engines: {node: '>=8'} 541 | dependencies: 542 | has-flag: 4.0.0 543 | dev: true 544 | 545 | /svg.draggable.js@2.2.2: 546 | resolution: {integrity: sha512-JzNHBc2fLQMzYCZ90KZHN2ohXL0BQJGQimK1kGk6AvSeibuKcIdDX9Kr0dT9+UJ5O8nYA0RB839Lhvk4CY4MZw==} 547 | engines: {node: '>= 0.8.0'} 548 | dependencies: 549 | svg.js: 2.7.1 550 | dev: false 551 | 552 | /svg.easing.js@2.0.0: 553 | resolution: {integrity: sha512-//ctPdJMGy22YoYGV+3HEfHbm6/69LJUTAqI2/5qBvaNHZ9uUFVC82B0Pl299HzgH13rKrBgi4+XyXXyVWWthA==} 554 | engines: {node: '>= 0.8.0'} 555 | dependencies: 556 | svg.js: 2.7.1 557 | dev: false 558 | 559 | /svg.filter.js@2.0.2: 560 | resolution: {integrity: sha512-xkGBwU+dKBzqg5PtilaTb0EYPqPfJ9Q6saVldX+5vCRy31P6TlRCP3U9NxH3HEufkKkpNgdTLBJnmhDHeTqAkw==} 561 | engines: {node: '>= 0.8.0'} 562 | dependencies: 563 | svg.js: 2.7.1 564 | dev: false 565 | 566 | /svg.js@2.7.1: 567 | resolution: {integrity: sha512-ycbxpizEQktk3FYvn/8BH+6/EuWXg7ZpQREJvgacqn46gIddG24tNNe4Son6omdXCnSOaApnpZw6MPCBA1dODA==} 568 | dev: false 569 | 570 | /svg.pathmorphing.js@0.1.3: 571 | resolution: {integrity: sha512-49HWI9X4XQR/JG1qXkSDV8xViuTLIWm/B/7YuQELV5KMOPtXjiwH4XPJvr/ghEDibmLQ9Oc22dpWpG0vUDDNww==} 572 | engines: {node: '>= 0.8.0'} 573 | dependencies: 574 | svg.js: 2.7.1 575 | dev: false 576 | 577 | /svg.resize.js@1.4.3: 578 | resolution: {integrity: sha512-9k5sXJuPKp+mVzXNvxz7U0uC9oVMQrrf7cFsETznzUDDm0x8+77dtZkWdMfRlmbkEEYvUn9btKuZ3n41oNA+uw==} 579 | engines: {node: '>= 0.8.0'} 580 | dependencies: 581 | svg.js: 2.7.1 582 | svg.select.js: 2.1.2 583 | dev: false 584 | 585 | /svg.select.js@2.1.2: 586 | resolution: {integrity: sha512-tH6ABEyJsAOVAhwcCjF8mw4crjXSI1aa7j2VQR8ZuJ37H2MBUbyeqYr5nEO7sSN3cy9AR9DUwNg0t/962HlDbQ==} 587 | engines: {node: '>= 0.8.0'} 588 | dependencies: 589 | svg.js: 2.7.1 590 | dev: false 591 | 592 | /svg.select.js@3.0.1: 593 | resolution: {integrity: sha512-h5IS/hKkuVCbKSieR9uQCj9w+zLHoPh+ce19bBYyqF53g6mnPB8sAtIbe1s9dh2S2fCmYX2xel1Ln3PJBbK4kw==} 594 | engines: {node: '>= 0.8.0'} 595 | dependencies: 596 | svg.js: 2.7.1 597 | dev: false 598 | 599 | /union@0.5.0: 600 | resolution: {integrity: sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==} 601 | engines: {node: '>= 0.8.0'} 602 | dependencies: 603 | qs: 6.11.2 604 | dev: true 605 | 606 | /url-join@4.0.1: 607 | resolution: {integrity: sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==} 608 | dev: true 609 | 610 | /whatwg-encoding@2.0.0: 611 | resolution: {integrity: sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==} 612 | engines: {node: '>=12'} 613 | dependencies: 614 | iconv-lite: 0.6.3 615 | dev: true 616 | -------------------------------------------------------------------------------- /docs/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betterstack-community/go-logging-benchmarks/4da78d7e2de62608432c606e571ec7e7e380d7b4/docs/screenshot.png -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/betterstack-community/go-logging-benchmarks 2 | 3 | go 1.21 4 | 5 | require ( 6 | github.com/apex/log v1.9.0 7 | github.com/inconshreveable/log15 v2.16.0+incompatible 8 | github.com/phuslu/log v1.0.99 9 | github.com/rs/zerolog v1.30.0 10 | github.com/sirupsen/logrus v1.9.3 11 | github.com/zerodha/logf v0.5.5 12 | go.uber.org/multierr v1.10.0 13 | go.uber.org/zap v1.25.0 14 | go.uber.org/zap/exp v0.2.0 15 | ) 16 | 17 | require ( 18 | github.com/go-stack/stack v1.8.1 // indirect 19 | github.com/mattn/go-colorable v0.1.13 // indirect 20 | github.com/mattn/go-isatty v0.0.19 // indirect 21 | github.com/pkg/errors v0.9.1 // indirect 22 | golang.org/x/sys v0.12.0 // indirect 23 | golang.org/x/term v0.12.0 // indirect 24 | ) 25 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/apex/log v1.9.0 h1:FHtw/xuaM8AgmvDDTI9fiwoAL25Sq2cxojnZICUU8l0= 2 | github.com/apex/log v1.9.0/go.mod h1:m82fZlWIuiWzWP04XCTXmnX0xRkYYbCdYn8jbJeLBEA= 3 | github.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo= 4 | github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE= 5 | github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys= 6 | github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= 7 | github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= 8 | github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= 9 | github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= 10 | github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= 11 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 12 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 13 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 14 | github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= 15 | github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= 16 | github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= 17 | github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= 18 | github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= 19 | github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= 20 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 21 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 22 | github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 23 | github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= 24 | github.com/inconshreveable/log15 v2.16.0+incompatible h1:6nvMKxtGcpgm7q0KiGs+Vc+xDvUXaBqsPKHWKsinccw= 25 | github.com/inconshreveable/log15 v2.16.0+incompatible/go.mod h1:cOaXtrgN4ScfRrD9Bre7U1thNq5RtJ8ZoP4iXVGRj6o= 26 | github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= 27 | github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= 28 | github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= 29 | github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= 30 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 31 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 32 | github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= 33 | github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= 34 | github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= 35 | github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= 36 | github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= 37 | github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 38 | github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 39 | github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= 40 | github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= 41 | github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= 42 | github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= 43 | github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= 44 | github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 45 | github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= 46 | github.com/phuslu/log v1.0.99 h1:DcsYN7ONwGjJ+kjx0QacDq4p90xYFhcY6kRaMvjo9Fg= 47 | github.com/phuslu/log v1.0.99/go.mod h1:F8osGJADo5qLK/0F88djWwdyoZZ9xDJQL1HYRHFEkS0= 48 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 49 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= 50 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 51 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 52 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 53 | github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= 54 | github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= 55 | github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= 56 | github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= 57 | github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= 58 | github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= 59 | github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= 60 | github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= 61 | github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= 62 | github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs= 63 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 64 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 65 | github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 66 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 67 | github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= 68 | github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= 69 | github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0= 70 | github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= 71 | github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= 72 | github.com/tj/go-buffer v1.1.0/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj52Uc= 73 | github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0= 74 | github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao= 75 | github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= 76 | github.com/zerodha/logf v0.5.5 h1:AhxHlixHNYwhFjvlgTv6uO4VBKYKxx2I6SbHoHtWLBk= 77 | github.com/zerodha/logf v0.5.5/go.mod h1:HWpfKsie+WFFpnUnUxelT6Z0FC6xu9+qt+oXNMPg6y8= 78 | go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= 79 | go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= 80 | go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= 81 | go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= 82 | go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= 83 | go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= 84 | go.uber.org/zap/exp v0.2.0 h1:FtGenNNeCATRB3CmB/yEUnjEFeJWpB/pMcy7e2bKPYs= 85 | go.uber.org/zap/exp v0.2.0/go.mod h1:t0gqAIdh1MfKv9EwN/dLwfZnJxe9ITAZN78HEWPFWDQ= 86 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 87 | golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 88 | golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 89 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 90 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 91 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 92 | golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 93 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 94 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 95 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 96 | golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 97 | golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 98 | golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 99 | golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 100 | golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 101 | golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= 102 | golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 103 | golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= 104 | golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= 105 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 106 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 107 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 108 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 109 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 110 | gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= 111 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= 112 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 113 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 114 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 115 | gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 116 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 117 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 118 | -------------------------------------------------------------------------------- /log15_test.go: -------------------------------------------------------------------------------- 1 | package bench 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | 7 | "github.com/inconshreveable/log15" 8 | ) 9 | 10 | type log15Bench struct { 11 | l log15.Logger 12 | } 13 | 14 | func newLog15(w io.Writer) log15.Logger { 15 | l := log15.New() 16 | h := log15.StreamHandler(w, log15.JsonFormat()) 17 | l.SetHandler(log15.LvlFilterHandler(log15.LvlInfo, h)) 18 | 19 | return l 20 | } 21 | 22 | func (b *log15Bench) new(w io.Writer) logBenchmark { 23 | return &log15Bench{ 24 | l: newLog15(w), 25 | } 26 | } 27 | 28 | func (b *log15Bench) newWithCtx(w io.Writer) logBenchmark { 29 | return &log15Bench{ 30 | l: newLog15(w).New(alternatingKeyValuePairs()...), 31 | } 32 | } 33 | 34 | func (b *log15Bench) name() string { 35 | return "Log15" 36 | } 37 | 38 | func (b *log15Bench) logEvent(msg string) { 39 | b.l.Info(msg) 40 | } 41 | 42 | func (b *log15Bench) logEventFmt(msg string, args ...any) { 43 | b.l.Info(fmt.Sprintf(msg, args...)) 44 | } 45 | 46 | func (b *log15Bench) logEventCtx(msg string) { 47 | b.l.Info(msg, alternatingKeyValuePairs()...) 48 | } 49 | 50 | func (b *log15Bench) logEventCtxWeak(msg string) { 51 | b.logEventCtx(msg) 52 | } 53 | 54 | func (b *log15Bench) logDisabled(msg string) { 55 | b.l.Debug(msg) 56 | } 57 | 58 | func (b *log15Bench) logDisabledFmt(msg string, args ...any) { 59 | b.l.Debug(fmt.Sprintf(msg, args...)) 60 | } 61 | 62 | func (b *log15Bench) logDisabledCtx(msg string) { 63 | b.l.Debug(msg, alternatingKeyValuePairs()...) 64 | } 65 | 66 | func (b *log15Bench) logDisabledCtxWeak(msg string) { 67 | b.logDisabledCtx(msg) 68 | } 69 | -------------------------------------------------------------------------------- /logf_test.go: -------------------------------------------------------------------------------- 1 | package bench 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "time" 7 | 8 | "github.com/zerodha/logf" 9 | ) 10 | 11 | type logfBench struct { 12 | l logf.Logger 13 | } 14 | 15 | func newLogf(w io.Writer) logf.Logger { 16 | l := logf.New(logf.Opts{ 17 | Writer: w, 18 | Level: logf.InfoLevel, 19 | TimestampFormat: time.RFC3339Nano, 20 | }) 21 | 22 | return l 23 | } 24 | 25 | func (b *logfBench) new(w io.Writer) logBenchmark { 26 | return &logfBench{ 27 | l: newLogf(w), 28 | } 29 | } 30 | 31 | func (b *logfBench) newWithCtx(w io.Writer) logBenchmark { 32 | l := newLogf(w) 33 | l.DefaultFields = alternatingKeyValuePairs() 34 | 35 | return &logfBench{ 36 | l, 37 | } 38 | } 39 | 40 | func (b *logfBench) name() string { 41 | return "Logf" 42 | } 43 | 44 | func (b *logfBench) logEvent(msg string) { 45 | b.l.Info(msg) 46 | } 47 | 48 | func (b *logfBench) logEventFmt(msg string, args ...any) { 49 | b.l.Info(fmt.Sprintf(msg, args...)) 50 | } 51 | 52 | func (b *logfBench) logEventCtx(msg string) { 53 | b.l.Info(msg, alternatingKeyValuePairs()...) 54 | } 55 | 56 | func (b *logfBench) logEventCtxWeak(msg string) { 57 | b.logEventCtx(msg) 58 | } 59 | 60 | func (b *logfBench) logDisabled(msg string) { 61 | b.l.Debug(msg) 62 | } 63 | 64 | func (b *logfBench) logDisabledFmt(msg string, args ...any) { 65 | b.l.Debug(fmt.Sprintf(msg, args...)) 66 | } 67 | 68 | func (b *logfBench) logDisabledCtx(msg string) { 69 | b.l.Debug(msg, alternatingKeyValuePairs()...) 70 | } 71 | 72 | func (b *logfBench) logDisabledCtxWeak(msg string) { 73 | b.logDisabledCtx(msg) 74 | } 75 | -------------------------------------------------------------------------------- /logrus_test.go: -------------------------------------------------------------------------------- 1 | package bench 2 | 3 | import ( 4 | "io" 5 | 6 | "github.com/sirupsen/logrus" 7 | ) 8 | 9 | func newLogrus(w io.Writer) *logrus.Logger { 10 | l := logrus.New() 11 | l.Out = w 12 | l.Level = logrus.InfoLevel 13 | l.SetFormatter(&logrus.JSONFormatter{}) 14 | 15 | return l 16 | } 17 | 18 | type logrusBench struct { 19 | l *logrus.Logger 20 | } 21 | 22 | func (b *logrusBench) new(w io.Writer) logBenchmark { 23 | return &logrusBench{ 24 | l: newLogrus(w), 25 | } 26 | } 27 | 28 | func (b *logrusBench) newWithCtx(w io.Writer) logBenchmark { 29 | return &logrusBench{ 30 | l: newLogrus(w).WithFields(mapFields()).Logger, 31 | } 32 | } 33 | 34 | func (b *logrusBench) name() string { 35 | return "Logrus" 36 | } 37 | 38 | func (b *logrusBench) logEvent(msg string) { 39 | b.l.Info(msg) 40 | } 41 | 42 | func (b *logrusBench) logEventFmt(msg string, args ...any) { 43 | b.l.Infof(msg, args...) 44 | } 45 | 46 | func (b *logrusBench) logEventCtx(msg string) { 47 | b.l.WithFields(mapFields()).Info(msg) 48 | } 49 | 50 | func (b *logrusBench) logEventCtxWeak(msg string) { 51 | b.logEventCtx(msg) 52 | } 53 | 54 | func (b *logrusBench) logDisabled(msg string) { 55 | b.l.Debug(msg) 56 | } 57 | 58 | func (b *logrusBench) logDisabledFmt(msg string, args ...any) { 59 | b.l.Debugf(msg, args...) 60 | } 61 | 62 | func (b *logrusBench) logDisabledCtx(msg string) { 63 | b.l.WithFields(mapFields()).Debug(msg) 64 | } 65 | 66 | func (b *logrusBench) logDisabledCtxWeak(msg string) { 67 | b.logDisabledCtx(msg) 68 | } 69 | -------------------------------------------------------------------------------- /phuslog_test.go: -------------------------------------------------------------------------------- 1 | package bench 2 | 3 | import ( 4 | "io" 5 | "time" 6 | 7 | "github.com/phuslu/log" 8 | ) 9 | 10 | func (u user) MarshalObject(e *log.Entry) { 11 | e.Str("name", u.Name). 12 | Int("age", u.Age). 13 | Time("dob", u.DOB) 14 | } 15 | 16 | func phusFields(e *log.Entry) *log.Entry { 17 | e. 18 | Int("bytes", ctxBodyBytes). 19 | Str("request", ctxRequest). 20 | Float64("elapsed_time_ms", ctxTimeElapsedMs). 21 | Object("user", ctxUser). 22 | Time("now", ctxTime). 23 | Strs("months", ctxMonths). 24 | Ints("primes", ctxFirst10Primes). 25 | Objects("users", ctxUsers). 26 | Err(ctxErr) 27 | 28 | return e 29 | } 30 | 31 | func newPhusLog(w io.Writer) log.Logger { 32 | l := log.Logger{ 33 | Level: log.InfoLevel, 34 | Caller: 0, 35 | TimeField: "time", 36 | TimeFormat: time.RFC3339Nano, 37 | Writer: &log.IOWriter{ 38 | Writer: w, 39 | }, 40 | } 41 | 42 | return l 43 | } 44 | 45 | type phusLogBench struct { 46 | l log.Logger 47 | } 48 | 49 | func (b *phusLogBench) new(w io.Writer) logBenchmark { 50 | return &phusLogBench{ 51 | l: newPhusLog(w), 52 | } 53 | } 54 | 55 | func (b *phusLogBench) newWithCtx(w io.Writer) logBenchmark { 56 | l := newPhusLog(w) 57 | l.Context = phusFields(log.NewContext(nil)).Value() 58 | 59 | return &phusLogBench{ 60 | l, 61 | } 62 | } 63 | 64 | func (b *phusLogBench) name() string { 65 | return "Phuslog" 66 | } 67 | 68 | func (b *phusLogBench) logEvent(msg string) { 69 | b.l.Info().Msg(msg) 70 | } 71 | 72 | func (b *phusLogBench) logEventFmt(msg string, args ...any) { 73 | b.l.Info().Msgf(msg, args...) 74 | } 75 | 76 | func (b *phusLogBench) logEventCtx(msg string) { 77 | phusFields(b.l.Info()).Msg(msg) 78 | } 79 | 80 | func (b *phusLogBench) logEventCtxWeak(msg string) { 81 | b.l.Info().Fields(mapFields()).Msg(msg) 82 | } 83 | 84 | func (b *phusLogBench) logDisabled(msg string) { 85 | b.l.Debug().Msg(msg) 86 | } 87 | 88 | func (b *phusLogBench) logDisabledFmt(msg string, args ...any) { 89 | b.l.Debug().Msgf(msg, args...) 90 | } 91 | 92 | func (b *phusLogBench) logDisabledCtx(msg string) { 93 | phusFields(b.l.Debug()).Msg(msg) 94 | } 95 | 96 | func (b *phusLogBench) logDisabledCtxWeak(msg string) { 97 | b.l.Debug().Fields(mapFields()).Msg(msg) 98 | } 99 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betterstack-community/go-logging-benchmarks/4da78d7e2de62608432c606e571ec7e7e380d7b4/screenshot.png -------------------------------------------------------------------------------- /setup_test.go: -------------------------------------------------------------------------------- 1 | package bench 2 | 3 | import ( 4 | "errors" 5 | "io" 6 | "sync/atomic" 7 | "time" 8 | ) 9 | 10 | type user struct { 11 | DOB time.Time 12 | Name string 13 | Age int 14 | } 15 | 16 | type users []user 17 | 18 | var ( 19 | ctxBodyBytes = 123456789 20 | ctxRequest = "GET /icons/ubuntu-logo.png HTTP/1.1" 21 | ctxTimeElapsedMs = 11.398466 22 | ctxUser = user{ 23 | Name: "John Doe", 24 | Age: 23, 25 | DOB: time.Date(2000, 9, 9, 0, 0, 0, 0, time.UTC), 26 | } 27 | ctxUsers = users{ 28 | ctxUser, 29 | ctxUser, 30 | ctxUser, 31 | ctxUser, 32 | ctxUser, 33 | ctxUser, 34 | ctxUser, 35 | ctxUser, 36 | ctxUser, 37 | ctxUser, 38 | } 39 | ctxTime = time.Now() 40 | ctxMonths = []string{ 41 | "January", 42 | "February", 43 | "March", 44 | "April", 45 | "May", 46 | "June", 47 | "July", 48 | "August", 49 | "September", 50 | "October", 51 | "November", 52 | "December", 53 | } 54 | ctxFirst10Primes = []int{2, 3, 5, 7, 11, 13, 17, 23, 29, 31} 55 | ctxErr = errors.New("failed to open file: /home/dev/new.txt") 56 | ) 57 | 58 | func mapFields() map[string]any { 59 | return map[string]any{ 60 | "bytes": ctxBodyBytes, 61 | "request": ctxRequest, 62 | "elapsed_time_ms": ctxTimeElapsedMs, 63 | "user": ctxUser, 64 | "now": ctxTime, 65 | "months": ctxMonths, 66 | "primes": ctxFirst10Primes, 67 | "users": ctxUsers, 68 | "error": ctxErr, 69 | } 70 | } 71 | 72 | func alternatingKeyValuePairs() []any { 73 | return []any{ 74 | "bytes", ctxBodyBytes, 75 | "request", ctxRequest, 76 | "elapsed_time_ms", ctxTimeElapsedMs, 77 | "user", ctxUser, 78 | "now", ctxTime, 79 | "months", ctxMonths, 80 | "primes", ctxFirst10Primes, 81 | "users", ctxUsers, 82 | "error", ctxErr, 83 | } 84 | } 85 | 86 | var ( 87 | logMsg = "The quick brown fox jumps over the lazy dog" 88 | logMsgFmt = "User: %s, Age: %d, Height: %.2f cm, Married: %t, Birthdate: %02d-%s-%d" 89 | logMsgArgs = []any{ 90 | "Alice", 91 | 30, 92 | 175.5, 93 | true, 94 | time.Date(1992, time.January, 15, 0, 0, 0, 0, time.UTC), 95 | } 96 | ) 97 | 98 | var loggers = []logBenchmark{ 99 | &zerologBench{}, 100 | &phusLogBench{}, 101 | &zapBench{}, 102 | &zapSugarBench{}, 103 | &slogBench{}, 104 | &slogZapBench{}, 105 | &apexBench{}, 106 | &logrusBench{}, 107 | &log15Bench{}, 108 | &logfBench{}, 109 | } 110 | 111 | type blackhole struct { 112 | count uint64 113 | } 114 | 115 | func (s *blackhole) WriteCount() uint64 { 116 | return atomic.LoadUint64(&s.count) 117 | } 118 | 119 | func (s *blackhole) Write(p []byte) (int, error) { 120 | atomic.AddUint64(&s.count, 1) 121 | return len(p), nil 122 | } 123 | 124 | type logBenchmark interface { 125 | new(w io.Writer) logBenchmark 126 | newWithCtx(w io.Writer) logBenchmark 127 | name() string 128 | logEvent(msg string) 129 | logEventFmt(msg string, args ...any) 130 | logEventCtx(msg string) 131 | logEventCtxWeak(msg string) 132 | logDisabled(msg string) 133 | logDisabledFmt(msg string, args ...any) 134 | logDisabledCtx(msg string) 135 | logDisabledCtxWeak(msg string) 136 | } 137 | -------------------------------------------------------------------------------- /slog_test.go: -------------------------------------------------------------------------------- 1 | package bench 2 | 3 | import ( 4 | "context" 5 | "fmt" 6 | "io" 7 | "log/slog" 8 | ) 9 | 10 | func slogAttrs() []slog.Attr { 11 | return []slog.Attr{ 12 | slog.Int("bytes", ctxBodyBytes), 13 | slog.String("request", ctxRequest), 14 | slog.Float64("elapsed_time_ms", ctxTimeElapsedMs), 15 | slog.Any("user", ctxUser), 16 | slog.Time("now", ctxTime), 17 | slog.Any("months", ctxMonths), 18 | slog.Any("primes", ctxFirst10Primes), 19 | slog.Any("users", ctxUsers), 20 | slog.Any("error", ctxErr), 21 | } 22 | } 23 | 24 | func newSlog(w io.Writer) *slog.Logger { 25 | return slog.New(slog.NewJSONHandler(w, &slog.HandlerOptions{ 26 | Level: slog.LevelInfo, 27 | })) 28 | } 29 | 30 | func newSlogWithCtx(w io.Writer, attr []slog.Attr) *slog.Logger { 31 | return slog.New(slog.NewJSONHandler(w, &slog.HandlerOptions{ 32 | Level: slog.LevelInfo, 33 | }).WithAttrs(attr)) 34 | } 35 | 36 | type slogBench struct { 37 | l *slog.Logger 38 | } 39 | 40 | func (b *slogBench) new(w io.Writer) logBenchmark { 41 | return &slogBench{ 42 | l: newSlog(w), 43 | } 44 | } 45 | 46 | func (b *slogBench) newWithCtx(w io.Writer) logBenchmark { 47 | return &slogBench{ 48 | l: newSlogWithCtx(w, slogAttrs()), 49 | } 50 | } 51 | 52 | func (b *slogBench) name() string { 53 | return "Slog" 54 | } 55 | 56 | func (b *slogBench) logEvent(msg string) { 57 | b.l.Info(msg) 58 | } 59 | 60 | func (b *slogBench) logEventFmt(msg string, args ...any) { 61 | b.l.Info(fmt.Sprintf(msg, args...)) 62 | } 63 | 64 | func (b *slogBench) logEventCtx(msg string) { 65 | b.l.LogAttrs( 66 | context.Background(), 67 | slog.LevelInfo, 68 | msg, 69 | slogAttrs()..., 70 | ) 71 | } 72 | 73 | func (b *slogBench) logEventCtxWeak(msg string) { 74 | b.l.Info(msg, alternatingKeyValuePairs()...) 75 | } 76 | 77 | func (b *slogBench) logDisabled(msg string) { 78 | b.l.Debug(msg) 79 | } 80 | 81 | func (b *slogBench) logDisabledFmt(msg string, args ...any) { 82 | b.l.Debug(fmt.Sprintf(msg, args...)) 83 | } 84 | 85 | func (b *slogBench) logDisabledCtx(msg string) { 86 | b.l.LogAttrs( 87 | context.Background(), 88 | slog.LevelDebug, 89 | msg, 90 | slogAttrs()..., 91 | ) 92 | } 93 | 94 | func (b *slogBench) logDisabledCtxWeak(msg string) { 95 | b.l.Debug(msg, alternatingKeyValuePairs()...) 96 | } 97 | -------------------------------------------------------------------------------- /slog_zap_test.go: -------------------------------------------------------------------------------- 1 | package bench 2 | 3 | import ( 4 | "io" 5 | "log/slog" 6 | 7 | "go.uber.org/zap/exp/zapslog" 8 | ) 9 | 10 | type slogZapBench struct { 11 | slogBench 12 | } 13 | 14 | // slog frontend with Zap backend. 15 | func newSlogZap(w io.Writer) *slog.Logger { 16 | l := newZap(w) 17 | 18 | return slog.New(zapslog.NewHandler(l.Core(), nil)) 19 | } 20 | 21 | func newSlogZapWithCtx(w io.Writer, attr []slog.Attr) *slog.Logger { 22 | l := newZap(w) 23 | 24 | h := zapslog.NewHandler(l.Core(), nil).WithAttrs(attr) 25 | 26 | return slog.New(h) 27 | } 28 | 29 | func (b *slogZapBench) new(w io.Writer) logBenchmark { 30 | return &slogBench{ 31 | l: newSlogZap(w), 32 | } 33 | } 34 | 35 | func (b *slogZapBench) newWithCtx(w io.Writer) logBenchmark { 36 | return &slogBench{ 37 | l: newSlogZapWithCtx(w, slogAttrs()), 38 | } 39 | } 40 | 41 | func (b *slogZapBench) name() string { 42 | return "SlogZap" 43 | } 44 | -------------------------------------------------------------------------------- /zap_test.go: -------------------------------------------------------------------------------- 1 | package bench 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | 7 | "go.uber.org/multierr" 8 | "go.uber.org/zap" 9 | "go.uber.org/zap/zapcore" 10 | ) 11 | 12 | func (u user) MarshalLogObject(enc zapcore.ObjectEncoder) error { 13 | enc.AddString("name", u.Name) 14 | enc.AddInt("age", u.Age) 15 | enc.AddTime("dob", u.DOB) 16 | 17 | return nil 18 | } 19 | 20 | func (uu users) MarshalLogArray(arr zapcore.ArrayEncoder) error { 21 | var err error 22 | for i := range uu { 23 | err = multierr.Append(err, arr.AppendObject(uu[i])) 24 | } 25 | 26 | return err 27 | } 28 | 29 | func zapFields() []zap.Field { 30 | return []zap.Field{ 31 | zap.Int("bytes", ctxBodyBytes), 32 | zap.String("request", ctxRequest), 33 | zap.Float64("elapsed_time_ms", ctxTimeElapsedMs), 34 | zap.Object("user", ctxUser), 35 | zap.Time("now", ctxTime), 36 | zap.Strings("months", ctxMonths), 37 | zap.Ints("primes", ctxFirst10Primes), 38 | zap.Array("users", ctxUsers), 39 | zap.Error(ctxErr), 40 | } 41 | } 42 | 43 | func newZap(w io.Writer) *zap.Logger { 44 | stdout := zapcore.AddSync(w) 45 | 46 | level := zap.NewAtomicLevelAt(zap.InfoLevel) 47 | 48 | productionCfg := zap.NewProductionEncoderConfig() 49 | productionCfg.TimeKey = "time" 50 | productionCfg.EncodeTime = zapcore.RFC3339NanoTimeEncoder 51 | 52 | jsonEncoder := zapcore.NewJSONEncoder(productionCfg) 53 | 54 | core := zapcore.NewTee( 55 | zapcore.NewCore(jsonEncoder, stdout, level), 56 | ) 57 | 58 | return zap.New(core) 59 | } 60 | 61 | type zapBench struct { 62 | l *zap.Logger 63 | } 64 | 65 | func (b *zapBench) new(w io.Writer) logBenchmark { 66 | return &zapBench{ 67 | l: newZap(w), 68 | } 69 | } 70 | 71 | func (b *zapBench) newWithCtx(w io.Writer) logBenchmark { 72 | return &zapBench{ 73 | l: newZap(w).With(zapFields()...), 74 | } 75 | } 76 | 77 | func (b *zapBench) name() string { 78 | return "Zap" 79 | } 80 | 81 | func (b *zapBench) logEvent(msg string) { 82 | b.l.Info(msg) 83 | } 84 | 85 | func (b *zapBench) logEventFmt(msg string, args ...any) { 86 | b.l.Info(fmt.Sprintf(msg, args...)) 87 | } 88 | 89 | func (b *zapBench) logEventCtx(msg string) { 90 | b.l.Info(msg, zapFields()...) 91 | } 92 | 93 | func (b *zapBench) logEventCtxWeak(msg string) { 94 | b.l.Sugar().Infow(msg, alternatingKeyValuePairs()...) 95 | } 96 | 97 | func (b *zapBench) logDisabled(msg string) { 98 | b.l.Debug(msg) 99 | } 100 | 101 | func (b *zapBench) logDisabledFmt(msg string, args ...any) { 102 | b.l.Debug(fmt.Sprintf(msg, args...)) 103 | } 104 | 105 | func (b *zapBench) logDisabledCtx(msg string) { 106 | b.l.Debug(msg, zapFields()...) 107 | } 108 | 109 | func (b *zapBench) logDisabledCtxWeak(msg string) { 110 | b.l.Sugar().Debugw(msg, alternatingKeyValuePairs()...) 111 | } 112 | 113 | type zapSugarBench struct { 114 | l *zap.SugaredLogger 115 | } 116 | 117 | func (b *zapSugarBench) new(w io.Writer) logBenchmark { 118 | return &zapSugarBench{ 119 | l: newZap(w).Sugar(), 120 | } 121 | } 122 | 123 | func (b *zapSugarBench) newWithCtx(w io.Writer) logBenchmark { 124 | return &zapSugarBench{ 125 | l: newZap(w).Sugar().With(alternatingKeyValuePairs()...), 126 | } 127 | } 128 | 129 | func (b *zapSugarBench) name() string { 130 | return "ZapSugar" 131 | } 132 | 133 | func (b *zapSugarBench) logEvent(msg string) { 134 | b.l.Info(msg) 135 | } 136 | 137 | func (b *zapSugarBench) logEventFmt(msg string, args ...any) { 138 | b.l.Infof(msg, args...) 139 | } 140 | 141 | func (b *zapSugarBench) logEventCtx(msg string) { 142 | b.l.Infow(msg, alternatingKeyValuePairs()...) 143 | } 144 | 145 | func (b *zapSugarBench) logEventCtxWeak(msg string) { 146 | b.logEventCtx(msg) 147 | } 148 | 149 | func (b *zapSugarBench) logDisabled(msg string) { 150 | b.l.Debug(msg) 151 | } 152 | 153 | func (b *zapSugarBench) logDisabledFmt(msg string, args ...any) { 154 | b.l.Debugf(msg, args...) 155 | } 156 | 157 | func (b *zapSugarBench) logDisabledCtx(msg string) { 158 | b.l.Debugw(msg, alternatingKeyValuePairs()...) 159 | } 160 | 161 | func (b *zapSugarBench) logDisabledCtxWeak(msg string) { 162 | b.logDisabledCtx(msg) 163 | } 164 | -------------------------------------------------------------------------------- /zerolog_test.go: -------------------------------------------------------------------------------- 1 | package bench 2 | 3 | import ( 4 | "io" 5 | "time" 6 | 7 | "github.com/rs/zerolog" 8 | ) 9 | 10 | func (u user) MarshalZerologObject(e *zerolog.Event) { 11 | e.Str("name", u.Name). 12 | Int("age", u.Age). 13 | Time("dob", u.DOB) 14 | } 15 | 16 | func (uu users) MarshalZerologArray(a *zerolog.Array) { 17 | for _, u := range uu { 18 | a.Object(u) 19 | } 20 | } 21 | 22 | func zerologFields(e *zerolog.Event) *zerolog.Event { 23 | e. 24 | Int("bytes", ctxBodyBytes). 25 | Str("request", ctxRequest). 26 | Float64("elapsed_time_ms", ctxTimeElapsedMs). 27 | Object("user", ctxUser). 28 | Time("now", ctxTime). 29 | Strs("months", ctxMonths). 30 | Ints("primes", ctxFirst10Primes). 31 | Array("users", ctxUsers). 32 | Err(ctxErr) 33 | 34 | return e 35 | } 36 | 37 | func zerologCtx(c zerolog.Context) zerolog.Context { 38 | c. 39 | Int("bytes", ctxBodyBytes). 40 | Str("request", ctxRequest). 41 | Float64("elapsed_time_ms", ctxTimeElapsedMs). 42 | Object("user", ctxUser). 43 | Time("now", ctxTime). 44 | Strs("months", ctxMonths). 45 | Ints("primes", ctxFirst10Primes). 46 | Array("users", ctxUsers). 47 | Err(ctxErr) 48 | 49 | return c 50 | } 51 | 52 | func newZerolog(w io.Writer) zerolog.Logger { 53 | zerolog.TimeFieldFormat = time.RFC3339Nano 54 | return zerolog.New(w).Level(zerolog.InfoLevel).With().Timestamp().Logger() 55 | } 56 | 57 | type zerologBench struct { 58 | l zerolog.Logger 59 | } 60 | 61 | func (b *zerologBench) new(w io.Writer) logBenchmark { 62 | return &zerologBench{ 63 | l: newZerolog(w), 64 | } 65 | } 66 | 67 | func (b *zerologBench) newWithCtx(w io.Writer) logBenchmark { 68 | return &zerologBench{ 69 | l: zerologCtx(newZerolog(w).With()).Logger(), 70 | } 71 | } 72 | 73 | func (b *zerologBench) name() string { 74 | return "Zerolog" 75 | } 76 | 77 | func (b *zerologBench) logEvent(msg string) { 78 | b.l.Info().Msg(msg) 79 | } 80 | 81 | func (b *zerologBench) logEventFmt(msg string, args ...any) { 82 | b.l.Info().Msgf(msg, args...) 83 | } 84 | 85 | func (b *zerologBench) logEventCtx(msg string) { 86 | zerologFields(b.l.Info()).Msg(msg) 87 | } 88 | 89 | func (b *zerologBench) logEventCtxWeak(msg string) { 90 | b.l.Info().Fields(alternatingKeyValuePairs()).Msg(msg) 91 | } 92 | 93 | func (b *zerologBench) logDisabled(msg string) { 94 | b.l.Debug().Msg(msg) 95 | } 96 | 97 | func (b *zerologBench) logDisabledFmt(msg string, args ...any) { 98 | b.l.Debug().Msgf(msg, args...) 99 | } 100 | 101 | func (b *zerologBench) logDisabledCtx(msg string) { 102 | zerologFields(b.l.Debug()).Msg(msg) 103 | } 104 | 105 | func (b *zerologBench) logDisabledCtxWeak(msg string) { 106 | b.l.Debug().Fields(alternatingKeyValuePairs()).Msg(msg) 107 | } 108 | --------------------------------------------------------------------------------