diff --git a/index.html b/index.html index ad88fa7..af6323a 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,14 @@
-

Individual build durations (in minutes)

+

Build durations (in minutes)

+

duration = sum of job run times

+
+
+ +
+

Build wall times (in minutes)

+

wall time = finished_at - started_at

diff --git a/script.js b/script.js index 98992e6..7201054 100644 --- a/script.js +++ b/script.js @@ -75,7 +75,7 @@ function renderBuildCounts(container, data) { .style("stroke", "#000"); } -function renderBuildTimes(container, data, baseUrl) { +function renderBuildTimes(container, barValue, data, baseUrl) { var paddingLeft = 5; // space to the left of the bars var paddingRight = 10; // space to the right of the bars var barHeight = 5; // height of one bar @@ -84,9 +84,6 @@ function renderBuildTimes(container, data, baseUrl) { var gridChartOffset = 3; // space between start of grid and first bar var maxBarWidth = 450; // width of the bar with the max value - // accessor functions - var barValue = function(d) { return d.duration/60; }; - // scales var yScale = d3.scale.ordinal() .domain(d3.range(0, data.length)) @@ -192,7 +189,19 @@ function updateChart() { builds.push(build); }); - renderBuildTimes('#build-times', builds, baseUrl); + function getDuration(build) { + return build.duration/60; + } + + function getClockTime(build) { + var started_at = Date.parse(build.started_at); + var finished_at = Date.parse(build.finished_at); + + return (finished_at - started_at) / 60000; + } + + renderBuildTimes('#build-times-duration', getDuration, builds, baseUrl); + renderBuildTimes('#build-times', getClockTime, builds, baseUrl); renderBuildCounts('#build-counts', d3.entries(buildCounts), baseUrl); if (++i < n && curOldestBuild < oldestBuild) { diff --git a/style.css b/style.css index 4b11322..80d728d 100644 --- a/style.css +++ b/style.css @@ -1,3 +1,12 @@ +h2 { + margin-bottom: 5px; +} + +h3 { + margin-top: 0; + color: gray; +} + form { display: block; margin-bottom: 10px;