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

add NextPart benchmark #17

Merged
merged 2 commits into from
Mar 30, 2024
Merged

add NextPart benchmark #17

merged 2 commits into from
Mar 30, 2024

Conversation

mazrean
Copy link
Owner

@mazrean mazrean commented Mar 30, 2024

Added benchmark when using NextPart of standard library.

@codecov-commenter
Copy link

codecov-commenter commented Mar 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.16%. Comparing base (0b5ca3b) to head (ac143d5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #17      +/-   ##
==========================================
+ Coverage   70.55%   72.16%   +1.61%     
==========================================
  Files           8        8              
  Lines         309      309              
==========================================
+ Hits          218      223       +5     
+ Misses         69       65       -4     
+ Partials       22       21       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Mar 30, 2024

Benchmark Result

goos: linux
goarch: amd64
pkg: github.com/mazrean/formstream
cpu: AMD EPYC 7763 64-Core Processor                
BenchmarkFormStreamFastPath/1MB-4 	    2788	    412625 ns/op	   10013 B/op	      64 allocs/op
BenchmarkFormStreamFastPath/10MB-4         	     304	   3908311 ns/op	   10029 B/op	      64 allocs/op
BenchmarkFormStreamFastPath/100MB-4        	      27	  41888536 ns/op	   10619 B/op	      64 allocs/op
BenchmarkFormStreamFastPath/1GB-4          	       3	 428021469 ns/op	   12906 B/op	      65 allocs/op
BenchmarkFormStreamSlowPath/1MB-4          	    2680	    444808 ns/op	   11695 B/op	      69 allocs/op
BenchmarkFormStreamSlowPath/10MB-4         	     277	   4256763 ns/op	  131280 B/op	      69 allocs/op
BenchmarkFormStreamSlowPath/100MB-4        	       5	 225715105 ns/op	26893300 B/op	      80 allocs/op
BenchmarkFormStreamSlowPath/1GB-4          	       1	2374844392 ns/op	134269624 B/op	     100 allocs/op
BenchmarkStdMultipartNextPart/1MB-4        	    2335	    430608 ns/op	   39338 B/op	      32 allocs/op
BenchmarkStdMultipartNextPart/10MB-4       	     306	   3925433 ns/op	   39316 B/op	      32 allocs/op
BenchmarkStdMultipartNextPart/100MB-4      	      27	  41961289 ns/op	   39617 B/op	      32 allocs/op
BenchmarkStdMultipartNextPart/1GB-4        	       3	 439020506 ns/op	   42202 B/op	      33 allocs/op
BenchmarkStdMultipartReadForm/1MB-4        	    1279	    825178 ns/op	 4203413 B/op	      61 allocs/op
BenchmarkStdMultipartReadForm/10MB-4       	     132	   8970577 ns/op	33566620 B/op	      64 allocs/op
BenchmarkStdMultipartReadForm/100MB-4      	       5	 242932590 ns/op	134268708 B/op	      76 allocs/op
BenchmarkStdMultipartReadForm/1GB-4        	       1	2563442948 ns/op	134275368 B/op	      77 allocs/op
PASS
ok  	github.com/mazrean/formstream	32.345s
pprof command
gh api /repos/mazrean/formstream/actions/artifacts/1371249526/zip > /tmp/profile.zip
unzip /tmp/profile.zip -d profile
rm -rf /tmp/profile.zip
go tool pprof -http :6060 profile/cpu.out

@mazrean mazrean merged commit 5335f06 into main Mar 30, 2024
3 checks passed
@mazrean mazrean deleted the doc/add-next-part-benchmark branch March 30, 2024 06:29
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