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 benchmarks #268

Merged
merged 2 commits into from
Jan 7, 2018
Merged

Add benchmarks #268

merged 2 commits into from
Jan 7, 2018

Conversation

romainmenke
Copy link
Contributor

@romainmenke romainmenke commented Jan 6, 2018

  • benchmark lists of variable sizes
BenchmarkListQuery_1-4        	    3000	     349864 ns/op
BenchmarkListQuery_100-4      	     500	    3534198 ns/op
BenchmarkListQuery_1K-4       	      50	   32966933 ns/op
BenchmarkListQuery_10K-4      	       5	  308862819 ns/op
BenchmarkListQuery_100K-4     	       1	 2255458560 ns/op
  • benchmark objects with a variable number of fields
BenchmarkWideQuery_1_1-4      	   10000	     159626 ns/op
BenchmarkWideQuery_10_1-4     	    2000	     960218 ns/op
BenchmarkWideQuery_100_1-4    	      20	   62290987 ns/op
BenchmarkWideQuery_1K_1-4     	       1	 6342374529 ns/op
BenchmarkWideQuery_1_10-4     	   10000	     196672 ns/op
BenchmarkWideQuery_10_10-4    	    1000	    2356517 ns/op
BenchmarkWideQuery_100_10-4   	      10	  190874887 ns/op
BenchmarkWideQuery_1K_10-4    	       1	20784765533 ns/op

- benchmark lists of variable sizes
- benchmark objects with a variable number of fields
@coveralls
Copy link

coveralls commented Jan 6, 2018

Coverage Status

Coverage decreased (-1.2%) to 80.999% when pulling b0a378b on mrhenry:benchmarks into 9b5a661 on graphql-go:master.

@coveralls
Copy link

coveralls commented Jan 7, 2018

Coverage Status

Coverage decreased (-1.2%) to 81.034% when pulling 4c66ed6 on mrhenry:benchmarks into 363d9c3 on graphql-go:master.

@chris-ramon
Copy link
Member

After merging memoizing fields support, now benchmarks results shows faster results, thanks a lot @romainmenke 🚀

(graphql)-> go test -test.bench BenchmarkListQuery
BenchmarkListQuery_1-4             10000            261764 ns/op
BenchmarkListQuery_100-4            1000           1020260 ns/op
BenchmarkListQuery_1K-4              200           6611959 ns/op
BenchmarkListQuery_10K-4              20          61487690 ns/op
BenchmarkListQuery_100K-4              3         400704058 ns/op
(graphql)-> go test -test.bench BenchmarkWideQuery
BenchmarkWideQuery_1_1-4           10000            157929 ns/op
BenchmarkWideQuery_10_1-4           3000            468788 ns/op
BenchmarkWideQuery_100_1-4           500           2769859 ns/op
BenchmarkWideQuery_1K_1-4             50          25347176 ns/op
BenchmarkWideQuery_1_10-4          10000            207748 ns/op
BenchmarkWideQuery_10_10-4          3000            584073 ns/op
BenchmarkWideQuery_100_10-4          300           4673692 ns/op
BenchmarkWideQuery_1K_10-4            30          42856935 ns/op

@chris-ramon chris-ramon merged commit 5e7dd4f into graphql-go:master Jan 7, 2018
@romainmenke romainmenke deleted the benchmarks branch January 7, 2018 21:31
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.

3 participants