botobag / artemis

GraphQL implementation for Go
Other
10 stars 0 forks source link

[executor] Provide API to output result in JSON encoding using jsoniter. #143

Closed zonr closed 5 years ago

zonr commented 5 years ago
$ go test -benchmem -bench=BenchmarkMarshalStarWarsFriendsQueryResultToJSON -run=none .
goos: darwin
goarch: amd64
pkg: github.com/botobag/artemis/graphql/executor
BenchmarkMarshalStarWarsFriendsQueryResultToJSONWithGo-8              100000         11887 ns/op        1986 B/op         16 allocs/op
BenchmarkMarshalStarWarsFriendsQueryResultToJSONWithJsoniter-8        200000          7484 ns/op        1976 B/op         31 allocs/op

Benchmark runs on a MacBook Pro 2016 with 2.7 GHz Intel Core i7 and 16GB DDR3.

Closes #142.

codecov[bot] commented 5 years ago

Codecov Report

Merging #143 into master will increase coverage by 0.02%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #143      +/-   ##
==========================================
+ Coverage   73.69%   73.71%   +0.02%     
==========================================
  Files          67       67              
  Lines        7120     7126       +6     
==========================================
+ Hits         5247     5253       +6     
  Misses       1577     1577              
  Partials      296      296
Impacted Files Coverage Δ
graphql/executor/execute.go 83.66% <100%> (+0.24%) :arrow_up:
graphql/executor/result_marshaler.go 80.26% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d1b2b02...caa8dde. Read the comment docs.

zonr commented 5 years ago

Merged in c55024f2b.