Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5 benchmark sampled logs #130

Merged
merged 9 commits into from
Nov 30, 2024

Conversation

KevRiver
Copy link
Contributor

No description provided.

benchmark_test.go Outdated Show resolved Hide resolved
benchmark_test.go Outdated Show resolved Hide resolved
…opSink that just discards log events and return nil
Copy link
Collaborator

@aybabtme aybabtme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost ready, looking good!

benchmark_test.go Outdated Show resolved Hide resolved
benchmark_test.go Outdated Show resolved Hide resolved
benchmark_test.go Outdated Show resolved Hide resolved
@KevRiver
Copy link
Contributor Author

benchmark results are as follows

Running tool: /usr/local/go/bin/go test -benchmem -run=^$ -bench ^BenchmarkHarness$ github.com/humanlogio/humanlog -v -count=1

goos: darwin
goarch: arm64
pkg: github.com/humanlogio/humanlog
cpu: Apple M1
BenchmarkHarness
BenchmarkHarness/test/benchmark/c-cpp-glog
BenchmarkHarness/test/benchmark/c-cpp-glog-8         	     459	   2584769 ns/op	  37.83 MB/s	 7127158 B/op	   37382 allocs/op
BenchmarkHarness/test/benchmark/c-cpp-spdlog
BenchmarkHarness/test/benchmark/c-cpp-spdlog-8       	    1520	    788540 ns/op	 111.44 MB/s	 1756341 B/op	   12301 allocs/op
BenchmarkHarness/test/benchmark/csharp-nlog
BenchmarkHarness/test/benchmark/csharp-nlog-8        	     804	   1489361 ns/op	  84.29 MB/s	 1916528 B/op	   15514 allocs/op
BenchmarkHarness/test/benchmark/csharp-nlog-csv
BenchmarkHarness/test/benchmark/csharp-nlog-csv-8    	    1120	   1113686 ns/op	  95.45 MB/s	 1688077 B/op	   10972 allocs/op
BenchmarkHarness/test/benchmark/csharp-nlog-json
BenchmarkHarness/test/benchmark/csharp-nlog-json-8   	       3	 473370111 ns/op	  49.39 MB/s	355104298 B/op	 7287606 allocs/op
BenchmarkHarness/test/benchmark/csharp-serilog
BenchmarkHarness/test/benchmark/csharp-serilog-8     	     933	   1224334 ns/op	  96.26 MB/s	 1762382 B/op	   17522 allocs/op
BenchmarkHarness/test/benchmark/csharp-serilog-json
BenchmarkHarness/test/benchmark/csharp-serilog-json-8         	     160	   7536600 ns/op	  40.15 MB/s	 4941686 B/op	   87556 allocs/op
BenchmarkHarness/test/benchmark/golang-gin
BenchmarkHarness/test/benchmark/golang-gin-8                  	    1675	    649054 ns/op	 313.98 MB/s	 1500216 B/op	   11010 allocs/op
BenchmarkHarness/test/benchmark/golang-logrus
BenchmarkHarness/test/benchmark/golang-logrus-8               	     465	   2871996 ns/op	  85.42 MB/s	 7208972 B/op	   47830 allocs/op
BenchmarkHarness/test/benchmark/golang-logrus-json
BenchmarkHarness/test/benchmark/golang-logrus-json-8          	       2	 706462333 ns/op	  38.64 MB/s	413347736 B/op	 9453455 allocs/op
BenchmarkHarness/test/benchmark/golang-slog-json
BenchmarkHarness/test/benchmark/golang-slog-json-8            	       1	1384281459 ns/op	  43.92 MB/s	1059153496 B/op	21780749 allocs/op
BenchmarkHarness/test/benchmark/golang-zap
BenchmarkHarness/test/benchmark/golang-zap-8                  	     249	   4755485 ns/op	  42.90 MB/s	 3574186 B/op	   60635 allocs/op
BenchmarkHarness/test/benchmark/golang-zerolog
BenchmarkHarness/test/benchmark/golang-zerolog-8              	     433	   2762835 ns/op	  55.60 MB/s	 7838375 B/op	   45006 allocs/op
BenchmarkHarness/test/benchmark/golang-zerolog-json
BenchmarkHarness/test/benchmark/golang-zerolog-json-8         	     222	   5367552 ns/op	  47.13 MB/s	 3881025 B/op	   73030 allocs/op
BenchmarkHarness/test/benchmark/java-log4j2
BenchmarkHarness/test/benchmark/java-log4j2-8                 	     757	   1551891 ns/op	  93.71 MB/s	 1990777 B/op	   16397 allocs/op
BenchmarkHarness/test/benchmark/java-log4j2-json
BenchmarkHarness/test/benchmark/java-log4j2-json-8            	     109	  10690282 ns/op	  48.98 MB/s	 7864399 B/op	  148896 allocs/op
BenchmarkHarness/test/benchmark/java-logback
BenchmarkHarness/test/benchmark/java-logback-8                	     674	   1634179 ns/op	  93.74 MB/s	 3278767 B/op	   23425 allocs/op
BenchmarkHarness/test/benchmark/java-logback-ext
BenchmarkHarness/test/benchmark/java-logback-ext-8            	     564	   2034681 ns/op	  94.93 MB/s	 3601258 B/op	   24763 allocs/op
BenchmarkHarness/test/benchmark/java-logback-ext-json
BenchmarkHarness/test/benchmark/java-logback-ext-json-8       	      84	  14068438 ns/op	  39.80 MB/s	10518371 B/op	  183988 allocs/op
BenchmarkHarness/test/benchmark/java-logback-json
BenchmarkHarness/test/benchmark/java-logback-json-8           	      84	  14023799 ns/op	  39.66 MB/s	10478973 B/op	  183176 allocs/op
BenchmarkHarness/test/benchmark/java-logback-mdc
BenchmarkHarness/test/benchmark/java-logback-mdc-8            	     612	   1869029 ns/op	 108.45 MB/s	 3657896 B/op	   25277 allocs/op
BenchmarkHarness/test/benchmark/java-logback-mdc-json
BenchmarkHarness/test/benchmark/java-logback-mdc-json-8       	      84	  14007591 ns/op	  39.66 MB/s	10463910 B/op	  182810 allocs/op
BenchmarkHarness/test/benchmark/js-ts-bunyan
BenchmarkHarness/test/benchmark/js-ts-bunyan-8                	      85	  14102857 ns/op	  35.59 MB/s	10858449 B/op	  195023 allocs/op
BenchmarkHarness/test/benchmark/js-ts-pino
BenchmarkHarness/test/benchmark/js-ts-pino-8                  	     172	   6750349 ns/op	  40.10 MB/s	 5234243 B/op	  103462 allocs/op
BenchmarkHarness/test/benchmark/js-ts-winston
BenchmarkHarness/test/benchmark/js-ts-winston-8               	      91	  13066558 ns/op	  38.99 MB/s	10321322 B/op	  199535 allocs/op
BenchmarkHarness/test/benchmark/opentelemetry
BenchmarkHarness/test/benchmark/opentelemetry-8               	    1072	   1072372 ns/op	  88.49 MB/s	 1468105 B/op	   10010 allocs/op
BenchmarkHarness/test/benchmark/opentelemetry-json
BenchmarkHarness/test/benchmark/opentelemetry-json-8          	      81	  14023535 ns/op	  39.27 MB/s	11917622 B/op	  192876 allocs/op
BenchmarkHarness/test/benchmark/python-loguru
BenchmarkHarness/test/benchmark/python-loguru-8               	     364	   3225884 ns/op	  64.88 MB/s	 7486091 B/op	   32354 allocs/op
BenchmarkHarness/test/benchmark/python-loguru-json
BenchmarkHarness/test/benchmark/python-loguru-json-8          	      84	  12060160 ns/op	  30.18 MB/s	 9208628 B/op	  158421 allocs/op
BenchmarkHarness/test/benchmark/python-structlog
BenchmarkHarness/test/benchmark/python-structlog-8            	     978	   1172524 ns/op	 112.06 MB/s	 1469041 B/op	   10010 allocs/op
BenchmarkHarness/test/benchmark/ruby-semantic-logger
BenchmarkHarness/test/benchmark/ruby-semantic-logger-8        	     680	   1730042 ns/op	 128.98 MB/s	 3455192 B/op	   23227 allocs/op
BenchmarkHarness/test/benchmark/ruby-semantic-logger-json
BenchmarkHarness/test/benchmark/ruby-semantic-logger-json-8   	     140	   8528025 ns/op	  39.32 MB/s	 6821616 B/op	  133821 allocs/op
BenchmarkHarness/test/benchmark/ruby-std-logger
BenchmarkHarness/test/benchmark/ruby-std-logger-8             	     920	   1404854 ns/op	  93.71 MB/s	 2361975 B/op	   19147 allocs/op
BenchmarkHarness/test/benchmark/rust-log4rs
BenchmarkHarness/test/benchmark/rust-log4rs-8                 	     740	   1421585 ns/op	  70.26 MB/s	 2749869 B/op	   16340 allocs/op
PASS
ok  	github.com/humanlogio/humanlog	59.714s

@aybabtme aybabtme merged commit e1a29c7 into humanlogio:master Nov 30, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants