lib/spoom/coverage/d3/timeline.rb in spoom-1.1.12 vs lib/spoom/coverage/d3/timeline.rb in spoom-1.1.13
- old
+ new
@@ -266,11 +266,11 @@
#{y_scale(
min: "d3.min([d3.min(data_#{id}, (d) => parseVersion(d.static)),
d3.min(data_#{id}, (d) => parseVersion(d.runtime))]) - 0.01",
max: "d3.max([d3.max(data_#{id}, (d) => parseVersion(d.static)),
d3.max(data_#{id}, (d) => parseVersion(d.runtime))]) + 0.01",
- ticks: "ticks(8)"
+ ticks: "ticks(8)",
)}
#{line(y: "parseVersion(d.runtime)", color: "#e83e8c", curve: "curveStepAfter")}
#{line(y: "parseVersion(d.static)", color: "#007bff", curve: "curveStepAfter")}
#{points(y: "parseVersion(d.static)")}
#{x_ticks}
@@ -312,11 +312,11 @@
<<~JS
#{x_scale}
#{y_scale(
min: "0",
max: "d3.max(data_#{id}, (d) => d.runtime)",
- ticks: "ticks(10)"
+ ticks: "ticks(10)",
)}
#{area(y: "d.runtime")}
#{line(y: "d.runtime")}
#{points(y: "d.runtime")}
#{x_ticks}
@@ -426,22 +426,22 @@
keys = Snapshot::STRICTNESSES
data = snapshots.map do |snapshot|
{
timestamp: snapshot.commit_timestamp,
commit: snapshot.commit_sha,
- total: snapshot.files,
- values: snapshot.sigils,
+ total: snapshot.files - snapshot.rbi_files,
+ values: snapshot.sigils_excluding_rbis,
}
end
super(id, data, keys)
end
sig { override.returns(String) }
def tooltip
<<~JS
function tooltip_#{id}(d) {
- tooltipTimeline(d, "files");
+ tooltipTimeline(d, "files excluding RBIs");
}
JS
end
end
@@ -480,21 +480,24 @@
keys = ["false", "true"]
data = snapshots.map do |snapshot|
{
timestamp: snapshot.commit_timestamp,
commit: snapshot.commit_sha,
- total: snapshot.methods_with_sig + snapshot.methods_without_sig,
- values: { true: snapshot.methods_with_sig, false: snapshot.methods_without_sig },
+ total: snapshot.methods_with_sig_excluding_rbis + snapshot.methods_without_sig_excluding_rbis,
+ values: {
+ true: snapshot.methods_with_sig_excluding_rbis,
+ false: snapshot.methods_without_sig_excluding_rbis,
+ },
}
end
super(id, data, keys)
end
sig { override.returns(String) }
def tooltip
<<~JS
function tooltip_#{id}(d) {
- tooltipTimeline(d, "methods");
+ tooltipTimeline(d, "methods excluding RBIs");
}
JS
end
end