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 unmarshall benchmarks #160

Merged
merged 5 commits into from
Jun 10, 2024
Merged

Add unmarshall benchmarks #160

merged 5 commits into from
Jun 10, 2024

Conversation

pnwpedro
Copy link
Collaborator

Problem

We lack performance benchmarks to help identify performance baselines and degredation.

Solution

Add an initial benchmark for unmarshalling.

Result

What will change as a result of your pull request? Note that sometimes this section is unnecessary because it is self-explanatory based on the solution.

Testing

This PR.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@cynicaljoy cynicaljoy left a comment

Choose a reason for hiding this comment

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

probably NBD, but might as well use the latest

.github/workflows/pr-validate-driver.yml Outdated Show resolved Hide resolved
Base automatically changed from fix-v2-everywhere to main June 10, 2024 13:38
@pnwpedro pnwpedro changed the title WIP: Unmarshall benchmarks Add unmarshall benchmarks Jun 10, 2024
@pnwpedro pnwpedro requested a review from cynicaljoy June 10, 2024 14:46
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Go Benchmark

Benchmark suite Current: 87efb05 Previous: eca5303 Ratio
BenchmarkFQL 1391 ns/op 878 B/op 12 allocs/op 1256 ns/op 878 B/op 12 allocs/op 1.11
BenchmarkFQL - ns/op 1391 ns/op 1256 ns/op 1.11
BenchmarkFQL - B/op 878 B/op 878 B/op 1
BenchmarkFQL - allocs/op 12 allocs/op 12 allocs/op 1
BenchmarkUnmarshalInt 1741 ns/op 632 B/op 12 allocs/op 1563 ns/op 632 B/op 12 allocs/op 1.11
BenchmarkUnmarshalInt - ns/op 1741 ns/op 1563 ns/op 1.11
BenchmarkUnmarshalInt - B/op 632 B/op 632 B/op 1
BenchmarkUnmarshalInt - allocs/op 12 allocs/op 12 allocs/op 1
BenchmarkUnmarshalLong 1638 ns/op 648 B/op 12 allocs/op 1614 ns/op 648 B/op 12 allocs/op 1.01
BenchmarkUnmarshalLong - ns/op 1638 ns/op 1614 ns/op 1.01
BenchmarkUnmarshalLong - B/op 648 B/op 648 B/op 1
BenchmarkUnmarshalLong - allocs/op 12 allocs/op 12 allocs/op 1
BenchmarkUnmarshalDouble 1665 ns/op 640 B/op 12 allocs/op 1612 ns/op 640 B/op 12 allocs/op 1.03
BenchmarkUnmarshalDouble - ns/op 1665 ns/op 1612 ns/op 1.03
BenchmarkUnmarshalDouble - B/op 640 B/op 640 B/op 1
BenchmarkUnmarshalDouble - allocs/op 12 allocs/op 12 allocs/op 1
BenchmarkUnmarshalBool 1057 ns/op 249 B/op 5 allocs/op 957.5 ns/op 249 B/op 5 allocs/op 1.10
BenchmarkUnmarshalBool - ns/op 1057 ns/op 957.5 ns/op 1.10
BenchmarkUnmarshalBool - B/op 249 B/op 249 B/op 1
BenchmarkUnmarshalBool - allocs/op 5 allocs/op 5 allocs/op 1
BenchmarkUnmarshalTime 2067 ns/op 696 B/op 12 allocs/op 2037 ns/op 696 B/op 12 allocs/op 1.01
BenchmarkUnmarshalTime - ns/op 2067 ns/op 2037 ns/op 1.01
BenchmarkUnmarshalTime - B/op 696 B/op 696 B/op 1
BenchmarkUnmarshalTime - allocs/op 12 allocs/op 12 allocs/op 1
BenchmarkUnmarshalModulePointer 2274 ns/op 664 B/op 13 allocs/op 2240 ns/op 664 B/op 13 allocs/op 1.02
BenchmarkUnmarshalModulePointer - ns/op 2274 ns/op 2240 ns/op 1.02
BenchmarkUnmarshalModulePointer - B/op 664 B/op 664 B/op 1
BenchmarkUnmarshalModulePointer - allocs/op 13 allocs/op 13 allocs/op 1
BenchmarkUnmarshalModule 1572 ns/op 656 B/op 12 allocs/op 1554 ns/op 656 B/op 12 allocs/op 1.01
BenchmarkUnmarshalModule - ns/op 1572 ns/op 1554 ns/op 1.01
BenchmarkUnmarshalModule - B/op 656 B/op 656 B/op 1
BenchmarkUnmarshalModule - allocs/op 12 allocs/op 12 allocs/op 1
BenchmarkUnmarshalRefPointer 3235 ns/op 1448 B/op 25 allocs/op 3161 ns/op 1448 B/op 25 allocs/op 1.02
BenchmarkUnmarshalRefPointer - ns/op 3235 ns/op 3161 ns/op 1.02
BenchmarkUnmarshalRefPointer - B/op 1448 B/op 1448 B/op 1
BenchmarkUnmarshalRefPointer - allocs/op 25 allocs/op 25 allocs/op 1
BenchmarkUnmarshalRef 2494 ns/op 1432 B/op 24 allocs/op 2643 ns/op 1432 B/op 24 allocs/op 0.94
BenchmarkUnmarshalRef - ns/op 2494 ns/op 2643 ns/op 0.94
BenchmarkUnmarshalRef - B/op 1432 B/op 1432 B/op 1
BenchmarkUnmarshalRef - allocs/op 24 allocs/op 24 allocs/op 1
BenchmarkUnmarshalNamedRefPointer 3263 ns/op 1448 B/op 25 allocs/op 3695 ns/op 1448 B/op 25 allocs/op 0.88
BenchmarkUnmarshalNamedRefPointer - ns/op 3263 ns/op 3695 ns/op 0.88
BenchmarkUnmarshalNamedRefPointer - B/op 1448 B/op 1448 B/op 1
BenchmarkUnmarshalNamedRefPointer - allocs/op 25 allocs/op 25 allocs/op 1
BenchmarkUnmarshalNamedRef 2496 ns/op 1432 B/op 24 allocs/op 2439 ns/op 1432 B/op 24 allocs/op 1.02
BenchmarkUnmarshalNamedRef - ns/op 2496 ns/op 2439 ns/op 1.02
BenchmarkUnmarshalNamedRef - B/op 1432 B/op 1432 B/op 1
BenchmarkUnmarshalNamedRef - allocs/op 24 allocs/op 24 allocs/op 1
BenchmarkUnmarshalSet 2717 ns/op 1280 B/op 25 allocs/op 2670 ns/op 1280 B/op 25 allocs/op 1.02
BenchmarkUnmarshalSet - ns/op 2717 ns/op 2670 ns/op 1.02
BenchmarkUnmarshalSet - B/op 1280 B/op 1280 B/op 1
BenchmarkUnmarshalSet - allocs/op 25 allocs/op 25 allocs/op 1
BenchmarkUnmarshalDocument 13432 ns/op 5040 B/op 78 allocs/op 13029 ns/op 5040 B/op 78 allocs/op 1.03
BenchmarkUnmarshalDocument - ns/op 13432 ns/op 13029 ns/op 1.03
BenchmarkUnmarshalDocument - B/op 5040 B/op 5040 B/op 1
BenchmarkUnmarshalDocument - allocs/op 78 allocs/op 78 allocs/op 1
BenchmarkUnmarshalNamedDocument 13863 ns/op 5040 B/op 78 allocs/op 13181 ns/op 5040 B/op 78 allocs/op 1.05
BenchmarkUnmarshalNamedDocument - ns/op 13863 ns/op 13181 ns/op 1.05
BenchmarkUnmarshalNamedDocument - B/op 5040 B/op 5040 B/op 1
BenchmarkUnmarshalNamedDocument - allocs/op 78 allocs/op 78 allocs/op 1
BenchmarkUnmarshalNullDocument 2864 ns/op 1504 B/op 29 allocs/op 2774 ns/op 1504 B/op 29 allocs/op 1.03
BenchmarkUnmarshalNullDocument - ns/op 2864 ns/op 2774 ns/op 1.03
BenchmarkUnmarshalNullDocument - B/op 1504 B/op 1504 B/op 1
BenchmarkUnmarshalNullDocument - allocs/op 29 allocs/op 29 allocs/op 1
BenchmarkUnmarshalNamedNullDocument 2926 ns/op 1504 B/op 29 allocs/op 2806 ns/op 1504 B/op 29 allocs/op 1.04
BenchmarkUnmarshalNamedNullDocument - ns/op 2926 ns/op 2806 ns/op 1.04
BenchmarkUnmarshalNamedNullDocument - B/op 1504 B/op 1504 B/op 1
BenchmarkUnmarshalNamedNullDocument - allocs/op 29 allocs/op 29 allocs/op 1
BenchmarkUnmarshalObject 31760 ns/op 9800 B/op 156 allocs/op 30716 ns/op 9800 B/op 156 allocs/op 1.03
BenchmarkUnmarshalObject - ns/op 31760 ns/op 30716 ns/op 1.03
BenchmarkUnmarshalObject - B/op 9800 B/op 9800 B/op 1
BenchmarkUnmarshalObject - allocs/op 156 allocs/op 156 allocs/op 1
BenchmarkUnmarshalSlice 4669 ns/op 544 B/op 21 allocs/op 4638 ns/op 544 B/op 21 allocs/op 1.01
BenchmarkUnmarshalSlice - ns/op 4669 ns/op 4638 ns/op 1.01
BenchmarkUnmarshalSlice - B/op 544 B/op 544 B/op 1
BenchmarkUnmarshalSlice - allocs/op 21 allocs/op 21 allocs/op 1
BenchmarkUnmarshalBytes 14416 ns/op 864 B/op 51 allocs/op 14209 ns/op 864 B/op 51 allocs/op 1.01
BenchmarkUnmarshalBytes - ns/op 14416 ns/op 14209 ns/op 1.01
BenchmarkUnmarshalBytes - B/op 864 B/op 864 B/op 1
BenchmarkUnmarshalBytes - allocs/op 51 allocs/op 51 allocs/op 1
BenchmarkTxnTime 18.45 ns/op 0 B/op 0 allocs/op 18.91 ns/op 0 B/op 0 allocs/op 0.98
BenchmarkTxnTime - ns/op 18.45 ns/op 18.91 ns/op 0.98
BenchmarkTxnTime - B/op 0 B/op 0 B/op 1
BenchmarkTxnTime - allocs/op 0 allocs/op 0 allocs/op 1

This comment was automatically generated by workflow using github-action-benchmark.

@pnwpedro pnwpedro merged commit 4be68d5 into main Jun 10, 2024
4 checks passed
@pnwpedro pnwpedro deleted the unmarshal-benchmarks branch June 10, 2024 16:47
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