duel 0.1.0 → 0.1.2
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 +4 -4
- data/AGENT_PROMPT.md +20 -16
- data/CHANGELOG.md +148 -1
- data/README.md +59 -26
- data/docs/ci.md +612 -54
- data/docs/configuration.md +146 -4
- data/docs/how-it-works.md +8 -3
- data/docs/json.md +5 -2
- data/docs/troubleshooting.md +6 -5
- data/lib/duel/baseline.rb +61 -7
- data/lib/duel/cli.rb +259 -48
- data/lib/duel/config.rb +108 -3
- data/lib/duel/init.rb +49 -7
- data/lib/duel/json_report.rb +11 -9
- data/lib/duel/runner.rb +1 -1
- data/lib/duel/summary.rb +148 -74
- data/lib/duel/templates/duel.gitlab-ci.yml.erb +148 -0
- data/lib/duel/templates/duel.rb.erb +20 -2
- data/lib/duel/templates/perf-comment.yml.erb +59 -0
- data/lib/duel/templates/perf.yml.erb +174 -37
- data/lib/duel/version.rb +1 -1
- data/sig/duel/baseline.rbs +30 -2
- data/sig/duel/cli.rbs +88 -5
- data/sig/duel/config.rbs +52 -1
- data/sig/duel/init.rbs +19 -0
- data/sig/duel/json_report.rbs +7 -5
- data/sig/duel/runner.rbs +18 -3
- data/sig/duel/summary.rbs +50 -18
- metadata +3 -1
data/sig/duel/summary.rbs
CHANGED
|
@@ -14,17 +14,34 @@ module Duel
|
|
|
14
14
|
# The verdicts that fail a run.
|
|
15
15
|
FAILED: Array[String]
|
|
16
16
|
|
|
17
|
+
# What the heading starts with.
|
|
18
|
+
PASSED_MARK: String
|
|
19
|
+
FAILED_MARK: String
|
|
20
|
+
NEUTRAL_MARK: String
|
|
21
|
+
|
|
22
|
+
# What an unsettled timing means.
|
|
23
|
+
UNSETTLED: String
|
|
24
|
+
|
|
25
|
+
# How Duel decides that a timing is slower, in its docs.
|
|
26
|
+
DECIDES: String
|
|
27
|
+
|
|
28
|
+
@note: String?
|
|
17
29
|
@runner: Runner
|
|
18
30
|
@results: Array[Result]
|
|
19
31
|
@settings: Settings
|
|
20
|
-
@
|
|
32
|
+
@baseline: String
|
|
33
|
+
@candidate: String
|
|
21
34
|
@regressed: Array[Result]
|
|
35
|
+
@failed: Array[Result]
|
|
22
36
|
|
|
23
37
|
# +text+ as code, in Markdown.
|
|
24
38
|
def self.code: (String text) -> String
|
|
25
39
|
|
|
26
|
-
#
|
|
27
|
-
def self.
|
|
40
|
+
# +text+ as it is, in Markdown.
|
|
41
|
+
def self.escape: (String text) -> String
|
|
42
|
+
|
|
43
|
+
# A run that didn't compare, and why.
|
|
44
|
+
def self.note: (String mark, String title, String reason) -> String
|
|
28
45
|
|
|
29
46
|
# +text+ in a fenced block of its own.
|
|
30
47
|
def self.block: (String text) -> String
|
|
@@ -35,7 +52,8 @@ module Duel
|
|
|
35
52
|
# The counted measures that differ, an iteration.
|
|
36
53
|
def self.changed_counts: (Result result) -> Hash[String, [Float, Float]]
|
|
37
54
|
|
|
38
|
-
def initialize: (Runner runner, Array[Result] results, settings: Settings, baseline: String, candidate: String
|
|
55
|
+
def initialize: (Runner runner, Array[Result] results, settings: Settings, baseline: String, candidate: String,
|
|
56
|
+
?note: String?) -> void
|
|
39
57
|
|
|
40
58
|
# The Markdown.
|
|
41
59
|
def markdown: () -> String
|
|
@@ -45,26 +63,35 @@ module Duel
|
|
|
45
63
|
# The Markdown, with the first +explained+ regressions explained.
|
|
46
64
|
def render: (Integer explained) -> String
|
|
47
65
|
|
|
66
|
+
# The verdict.
|
|
48
67
|
def heading: () -> String
|
|
49
68
|
|
|
50
|
-
#
|
|
51
|
-
def
|
|
69
|
+
# The two versions, and why any benchmark was skipped.
|
|
70
|
+
def compared: () -> String
|
|
71
|
+
|
|
72
|
+
# The benchmarks that failed.
|
|
73
|
+
def failures: () -> String?
|
|
52
74
|
|
|
53
|
-
|
|
75
|
+
# What got worse, or the error's first line.
|
|
76
|
+
def failure: (Result result) -> String
|
|
77
|
+
|
|
78
|
+
# The frame whose own share of the CPU grew the most.
|
|
79
|
+
def top: (Result result) -> String
|
|
80
|
+
|
|
81
|
+
# The rest, collapsed.
|
|
82
|
+
def details: (Integer explained) -> String
|
|
54
83
|
|
|
55
84
|
# The results, by verdict.
|
|
56
85
|
def sorted: () -> Array[Result]
|
|
57
86
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
# Those that didn't change, collapsed.
|
|
61
|
-
def unchanged: (Array[Result] same) -> String?
|
|
87
|
+
# Every benchmark.
|
|
88
|
+
def table: () -> String?
|
|
62
89
|
|
|
63
90
|
# A table's row of +cells+.
|
|
64
|
-
def row: (
|
|
91
|
+
def row: (Array[String] cells) -> String
|
|
65
92
|
|
|
66
|
-
#
|
|
67
|
-
def
|
|
93
|
+
# +text+ for a table's cell, on one line.
|
|
94
|
+
def cell: (String text) -> String
|
|
68
95
|
|
|
69
96
|
# Each timed measure's ratio and its interval.
|
|
70
97
|
def timings: (Result result) -> String
|
|
@@ -75,13 +102,18 @@ module Duel
|
|
|
75
102
|
def mb: (Integer bytes) -> String
|
|
76
103
|
|
|
77
104
|
# The first +explained+ regressions, explained.
|
|
78
|
-
def regressions: (Integer explained) -> String
|
|
105
|
+
def regressions: (Integer explained) -> Array[String]
|
|
79
106
|
|
|
80
107
|
# The verdicts across the board.
|
|
81
|
-
def across: () -> String?
|
|
108
|
+
def across: (confirmed: bool) -> String?
|
|
109
|
+
|
|
110
|
+
# The errors of more than a line.
|
|
111
|
+
def errors: () -> Array[String]
|
|
82
112
|
|
|
83
|
-
|
|
113
|
+
# Each version's Ruby, where they differ.
|
|
114
|
+
def rubies: () -> String?
|
|
84
115
|
|
|
85
|
-
|
|
116
|
+
# How Duel decides that a timing is slower.
|
|
117
|
+
def decides: () -> String
|
|
86
118
|
end
|
|
87
119
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: duel
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Erik Berlin
|
|
@@ -68,7 +68,9 @@ files:
|
|
|
68
68
|
- lib/duel/stats.rb
|
|
69
69
|
- lib/duel/summary.rb
|
|
70
70
|
- lib/duel/templates/benchmark_duel.rb.erb
|
|
71
|
+
- lib/duel/templates/duel.gitlab-ci.yml.erb
|
|
71
72
|
- lib/duel/templates/duel.rb.erb
|
|
73
|
+
- lib/duel/templates/perf-comment.yml.erb
|
|
72
74
|
- lib/duel/templates/perf.yml.erb
|
|
73
75
|
- lib/duel/testing.rb
|
|
74
76
|
- lib/duel/version.rb
|