cobench 0.0.26 → 0.0.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/index.xsl +21 -10
- data/bin/cobench +2 -2
- data/lib/cobench/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b2c010bd8e8e968d0c9d07a48d40db4a8105317a64dd292072d0c4f2f62e6ac
|
4
|
+
data.tar.gz: 14de85d5a5cd8318626af5f42d63bdb0da929c16a417c297bab9d233fa4d24e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f626ac99bff69327d805f91d6bfda1c6f0ac531567efc2f156c1364245f5eaf1be1cf7d5a5da50ca2548c7b0159ddf7f232a9dffe3d81c2c32b6bbf282359836
|
7
|
+
data.tar.gz: 8f7a7a0cc4a663823c266f0459242fca75ae31d8ec27cdd146c64c0cc4a3b3f9abe57a6395ff3be9a3bd0e3ef1adf49efbb951b752dace54a535cb7d713d2fb4
|
data/assets/index.xsl
CHANGED
@@ -23,9 +23,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
23
|
SOFTWARE.
|
24
24
|
-->
|
25
25
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
|
26
|
-
<xsl:output encoding="UTF-8" method="
|
26
|
+
<xsl:output encoding="UTF-8" method="xml"/>
|
27
27
|
<xsl:param name="version"/>
|
28
|
-
<xsl:key name="titles" match="/cobench/titles/title" use="."/>
|
29
28
|
<xsl:template match="/">
|
30
29
|
<html>
|
31
30
|
<head>
|
@@ -36,8 +35,12 @@ SOFTWARE.
|
|
36
35
|
<link rel="icon" href="https://raw.githubusercontent.com/yegor256/cobench/master/logo.svg" type="image/svg"/>
|
37
36
|
<link href="https://cdn.jsdelivr.net/gh/yegor256/tacit@gh-pages/tacit-css.min.css" rel="stylesheet"/>
|
38
37
|
<link href="https://cdn.jsdelivr.net/gh/yegor256/drops@gh-pages/drops.min.css" rel="stylesheet"/>
|
39
|
-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"
|
40
|
-
|
38
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js">
|
39
|
+
<xsl:text> </xsl:text>
|
40
|
+
</script>
|
41
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/js/jquery.tablesorter.min.js">
|
42
|
+
<xsl:text> </xsl:text>
|
43
|
+
</script>
|
41
44
|
<script type="text/javascript">
|
42
45
|
$(function() {
|
43
46
|
$("#metrics").tablesorter();
|
@@ -47,9 +50,10 @@ SOFTWARE.
|
|
47
50
|
td, th { font-family: monospace; font-size: 18px; }
|
48
51
|
.num { text-align: right; }
|
49
52
|
.left { border-bottom: 0; }
|
53
|
+
section { width: 100%; }
|
50
54
|
header { text-align: center; }
|
51
55
|
footer { text-align: center; font-size: 0.8em; line-height: 1.2em; color: gray; }
|
52
|
-
article {
|
56
|
+
article { border: 0; }
|
53
57
|
td.avatar { vertical-align: middle; text-align: center; }
|
54
58
|
td.avatar img { width: 1.5em; height: 1.5em; vertical-align: middle; }
|
55
59
|
.subtitle { font-size: 0.8em; line-height: 1em; color: gray; }
|
@@ -67,6 +71,14 @@ SOFTWARE.
|
|
67
71
|
</header>
|
68
72
|
<article>
|
69
73
|
<table id="metrics">
|
74
|
+
<colgroup>
|
75
|
+
<col/>
|
76
|
+
<col/>
|
77
|
+
<xsl:for-each select="cobench/titles/title">
|
78
|
+
<xsl:sort select="."/>
|
79
|
+
<col/>
|
80
|
+
</xsl:for-each>
|
81
|
+
</colgroup>
|
70
82
|
<thead>
|
71
83
|
<xsl:apply-templates select="cobench/titles"/>
|
72
84
|
</thead>
|
@@ -173,9 +185,8 @@ SOFTWARE.
|
|
173
185
|
</xsl:template>
|
174
186
|
<xsl:template match="cobench/titles">
|
175
187
|
<tr>
|
176
|
-
<th/>
|
177
|
-
<
|
178
|
-
<xsl:for-each select="title[generate-id() = generate-id(key('titles', .)[1])]">
|
188
|
+
<th colspan="2"/>
|
189
|
+
<xsl:for-each select="title">
|
179
190
|
<xsl:sort select="."/>
|
180
191
|
<th class="sorter num">
|
181
192
|
<xsl:value-of select="."/>
|
@@ -187,7 +198,7 @@ SOFTWARE.
|
|
187
198
|
<xsl:variable name="totals" select="."/>
|
188
199
|
<tr>
|
189
200
|
<td colspan="2" style="text-align:right">Total:</td>
|
190
|
-
<xsl:for-each select="/cobench/titles/title
|
201
|
+
<xsl:for-each select="/cobench/titles/title">
|
191
202
|
<xsl:sort select="."/>
|
192
203
|
<xsl:variable name="t" select="."/>
|
193
204
|
<td class="num">
|
@@ -200,7 +211,7 @@ SOFTWARE.
|
|
200
211
|
<xsl:variable name="averages" select="."/>
|
201
212
|
<tr>
|
202
213
|
<td colspan="2" style="text-align:right">Average:</td>
|
203
|
-
<xsl:for-each select="/cobench/titles/title
|
214
|
+
<xsl:for-each select="/cobench/titles/title">
|
204
215
|
<xsl:sort select="."/>
|
205
216
|
<xsl:variable name="t" select="."/>
|
206
217
|
<td class="num">
|
data/bin/cobench
CHANGED
@@ -195,7 +195,7 @@ def build_xml(opts, loog)
|
|
195
195
|
next if t == 'Score'
|
196
196
|
next if averages.key?(t)
|
197
197
|
xml.w(id: t) do
|
198
|
-
xml.text(data.values.map { |ms| ms[t]
|
198
|
+
xml.text(data.values.map { |ms| actual(ms[t]) }.inject(&:+))
|
199
199
|
end
|
200
200
|
end
|
201
201
|
end
|
@@ -203,7 +203,7 @@ def build_xml(opts, loog)
|
|
203
203
|
data.map { |_, ms| ms.keys }.flatten.uniq.each do |t|
|
204
204
|
next if t == 'Score'
|
205
205
|
xml.w(id: t) do
|
206
|
-
vals = data.values.map { |ms| ms[t]
|
206
|
+
vals = data.values.map { |ms| actual(ms[t]) }.select { |v| v > 0 }
|
207
207
|
xml.text(div(vals.inject(&:+), vals.count))
|
208
208
|
end
|
209
209
|
end
|
data/lib/cobench/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cobench
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backtrace
|