fastlane-plugin-stream_actions 0.4.13 → 0.4.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 637f0d12b17b61c738e37e6530202c347d45776ec6281591c1b6ea94e162d501
4
- data.tar.gz: fc3494f5e33aa0e6cde00c3bb741880e709338f670742a4a1697774f8fcd36af
3
+ metadata.gz: ea8c0b10a707aea52e96abb115d761a08518379e8030df3f2f6ea8def3cf089f
4
+ data.tar.gz: 2cb6310cc1474349e591a1967efa8e5ba980fb095fe280eb13db43f5d78ca3ef
5
5
  SHA512:
6
- metadata.gz: 9fe31f2ee1e876d9bab6e7e434d06b74f9de6f9bf70124afda534638d8c6eb96e88c49f06c05669f432bdcfdbcf6024e4317cf4646202d53c78e82c2d58093a1
7
- data.tar.gz: df42ca37cabdb7c533379f407aa3dfd21898214eb1206ca61cfad635f082562e91cc9bd35153ba06c7f736181151369c06e8b7aafd80df7a3a1bd2e118742ece
6
+ metadata.gz: 19f9d221bdb58b9ba68276cb9aea3049003bd0d25b7c62ee8fb02917c18cc7e6099cf34017520f0e26d2df0dcba7f731d15ce7751cc5842ba22757599d66b63f
7
+ data.tar.gz: 28562ca0b51a398fa1c8117c847f2f3c1dab3b481b127a6f16b7718753d6fad4673fe37894393a04901e31d37ef295998c3849a25f0272a97e0809913535eddc
@@ -6,6 +6,7 @@ module Fastlane
6
6
  fail_status = '🔴' # Failure if a branch is more than #{max_tolerance} less performant than the benchmark
7
7
  success_status = '🟢' # Success if a branch is more performant or equals to the benchmark
8
8
  outstanding_status = '🚀' # Outstanding performance
9
+ new_status = '🆕' # No benchmark yet, e.g. a newly tracked size
9
10
 
10
11
  metrics_dir = 'metrics'
11
12
  FileUtils.remove_dir(metrics_dir, force: true)
@@ -23,7 +24,13 @@ module Fastlane
23
24
  params[:branch_sizes].each do |sdk_name, branch_value_kb|
24
25
  branch_value_mb = (branch_value_kb / 1024.0).round(2)
25
26
  branch_value = is_kb ? branch_value_kb.round(0) : branch_value_mb
26
- benchmark_value_kb = benchmark_sizes[sdk_name.to_s] || 0
27
+ benchmark_value_kb = benchmark_sizes[sdk_name.to_s]
28
+ # A size the benchmark doesn't track yet has nothing to compare against. Only a push to the base
29
+ # branch or a release branch run rewrites the benchmark (see below), so PRs show it as new until then.
30
+ if benchmark_value_kb.nil?
31
+ markdown_table << "|#{sdk_name}|n/a|#{branch_value} #{params[:size_ext]}|n/a|#{new_status}|\n"
32
+ next
33
+ end
27
34
  benchmark_value_mb = (benchmark_value_kb / 1024.0).round(2)
28
35
  benchmark_value = is_kb ? benchmark_value_kb.round(0) : benchmark_value_mb
29
36
 
@@ -32,8 +39,8 @@ module Fastlane
32
39
  diff = is_kb ? diff_b : diff_kb
33
40
  diff_ext = is_kb ? 'B' : 'KB'
34
41
 
35
- max_tolerance = params[:max_tolerance] || diff_ext == 'B' ? 5000 : 500 # By default, Max Tolerance is 5000 Bytes or 500 Kilobytes
36
- fine_tolerance = params[:fine_tolerance] || diff_ext == 'B' ? 2500 : 250 # By default, Fine Tolerance is 2500 Bytes or 250 Kilobytes
42
+ max_tolerance = params[:max_tolerance] || (diff_ext == 'B' ? 5000 : 500) # By default, Max Tolerance is 5000 Bytes or 500 Kilobytes
43
+ fine_tolerance = params[:fine_tolerance] || (diff_ext == 'B' ? 2500 : 250) # By default, Fine Tolerance is 2500 Bytes or 250 Kilobytes
37
44
 
38
45
  diff_sign = if diff.zero?
39
46
  ''
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module StreamActions
3
- VERSION = '0.4.13'
3
+ VERSION = '0.4.14'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-stream_actions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.13
4
+ version: 0.4.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - GetStream
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.9.0
47
+ version: 0.11.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 0.9.0
54
+ version: 0.11.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: fastlane
57
57
  requirement: !ruby/object:Gem::Requirement