graphql-metrics 3.0.2 → 3.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 692719d6eddd28987c05a5cf767da34dc2a12a6a697e4525dadb4a4ac655cd3b
4
- data.tar.gz: 7b06a5ca5ceae870c2dccd75f4b621a12361da07bb7d7269d1171ee9ba177800
3
+ metadata.gz: b8eda0da73b10eb0afb49963c3192767df4a711eb4177b401086400167a803c3
4
+ data.tar.gz: 1eb7cd4c7a0af088a7686eba62c141dd2530d0efbefc2cc5e954e66d92842130
5
5
  SHA512:
6
- metadata.gz: 0751a811a26282763ccf624dc12fd55cdfdcda5998c4e955c359aabc4fcc6ad8ed63ff4c66d6ef271054e4541e7930791643f81f76e177ab749b592db07faef8
7
- data.tar.gz: 54dbdc3529bdb9ace551421653067cc893cab818e0cdc17dc6703046f534901b989e7082bc285d39adb31bf30c334b3c8d0e894b647920a457232b0739ca5be9
6
+ metadata.gz: 34ea411c44bec8dd2e0b6e2a613866f5bba29cb6be19984e45c11216b5a154fab7fe459632b483e7d45cc7d082b1fffeb4f744a4cdb91ef0cb0b30c9442c1293
7
+ data.tar.gz: 4b9616c41459bddec77ff660063358ee925c819e7c580f9aa068f906482445370900c787d47c3aafd4873322ca38ded57bbc3b8b17605aa695b9e335391e5433
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ 3.0.3
2
+ -----
3
+
4
+ - [#22](https://github.com/Shopify/graphql-metrics/pull/22) Optimization: use hash assignment over merge
5
+
1
6
  3.0.2
2
7
  -----
3
8
 
@@ -61,14 +61,12 @@ module GraphQL
61
61
 
62
62
  @static_field_metrics.each do |static_metrics|
63
63
  resolver_timings = ns[GraphQL::Metrics::INLINE_FIELD_TIMINGS][static_metrics[:path]]
64
- lazy_field_timings = ns[GraphQL::Metrics::LAZY_FIELD_TIMINGS][static_metrics[:path]]
64
+ lazy_resolver_timings = ns[GraphQL::Metrics::LAZY_FIELD_TIMINGS][static_metrics[:path]]
65
65
 
66
- metrics = static_metrics.merge(
67
- resolver_timings: resolver_timings || [],
68
- lazy_resolver_timings: lazy_field_timings || [],
69
- )
66
+ static_metrics[:resolver_timings] = resolver_timings || []
67
+ static_metrics[:lazy_resolver_timings] = lazy_resolver_timings || []
70
68
 
71
- field_extracted(metrics)
69
+ field_extracted(static_metrics)
72
70
  end
73
71
  end
74
72
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GraphQL
4
4
  module Metrics
5
- VERSION = "3.0.2"
5
+ VERSION = "3.0.3"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Butcher
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-27 00:00:00.000000000 Z
11
+ date: 2020-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby