-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtimeline.html
More file actions
230 lines (201 loc) · 14.8 KB
/
timeline.html
File metadata and controls
230 lines (201 loc) · 14.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<!doctype html>
<!--
~ Copyright 2013-2018, Centre for Genomic Regulation (CRG)
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<script type="text/javascript">
var prot = (("https:" == document.location.protocol) ? "https://" : "http://");
document.write(unescape("%3Cscript src='" + prot + "code.jquery.com/jquery-latest.min.js' type='text/javascript' %3E%3C/script%3E"));
document.write(unescape("%3Cscript src='" + prot + "d3js.org/d3.v3.min.js' charset='utf-8' type='text/javascript' %3E%3C/script%3E"));
document.write(unescape("%3Cscript src='" + prot + "cdn.rawgit.com/nextflow-io/d3-timeline/82622c4cc35bac7283b3a317826b0709ac1ae476/src/d3-timeline.js' type='text/javascript' %3E%3C/script%3E"));
</script>
<style type="text/css">
* {
font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
}
.axis path,
.axis line {
fill: none;
stroke: black;
shape-rendering: crispEdges;
}
.axis text {
font-size: 10px;
}
div#timeline g text {
font-size: 13px;
}
text.timeline-label {
font-size: 13px;
}
#timeline2 .axis {
transform: translate(0px,30px);
-ms-transform: translate(0px,30px); /* IE 9 */
-webkit-transform: translate(0px,30px); /* Safari and Chrome */
-o-transform: translate(0px,30px); /* Opera */
-moz-transform: translate(0px,30px); /* Firefox */
}
.coloredDiv {
height:20px; width:20px; float:left;
}
#footer {
padding-top: 3em; color: #bfbfbf; font-size: 13px;
}
#footer a:visited {
color: #bfbfbf;
text-decoration: underline;
}
</style>
<script type="text/javascript">
var handler=null;
// see https://github.com/mbostock/d3/wiki/Ordinal-Scales#category20c
var colors = d3.scale.category20c().domain(d3.range(0,20)).range()
function c0(index) { return "#9c9c9c"; }
function c1(index) { return "#bdbdbd"; }
function c2(index) { return colors[index % 16]; } // <-- note: uses only the first 16 colors
var elapsed="1m 32s"
var beginningMillis=1650483045177;
var endingMillis=1650483136769;
var data=[
{"label": "buildBlangDemoCode", "times": [{"starting_time": 1650483046144, "ending_time": 1650483046218, "color":c1(0)}, {"starting_time": 1650483046218, "ending_time": 1650483057957, "color":c2(0), "label": "22.2s \/ 3.4 GB"}, {"starting_time": 1650483057957, "ending_time": 1650483068367, "color":c1(0)}]},
{"label": "runBlang (12)", "times": [{"starting_time": 1650483068772, "ending_time": 1650483070943, "color":c1(1)}, {"starting_time": 1650483070943, "ending_time": 1650483083816, "color":c2(1), "label": "27.2s \/ 7.4 GB"}, {"starting_time": 1650483083816, "ending_time": 1650483095942, "color":c1(1)}]},
{"label": "runBlang (11)", "times": [{"starting_time": 1650483068931, "ending_time": 1650483075940, "color":c1(1)}, {"starting_time": 1650483075940, "ending_time": 1650483091247, "color":c2(1), "label": "27s \/ 7.4 GB"}, {"starting_time": 1650483091247, "ending_time": 1650483095951, "color":c1(1)}]},
{"label": "runBlang (15)", "times": [{"starting_time": 1650483069018, "ending_time": 1650483075942, "color":c1(1)}, {"starting_time": 1650483075942, "ending_time": 1650483085062, "color":c2(1), "label": "21.9s \/ 7.4 GB"}, {"starting_time": 1650483085062, "ending_time": 1650483090943, "color":c1(1)}]},
{"label": "runBlang (7)", "times": [{"starting_time": 1650483069098, "ending_time": 1650483075944, "color":c1(1)}, {"starting_time": 1650483075944, "ending_time": 1650483082324, "color":c2(1), "label": "16.8s \/ 7.4 GB"}, {"starting_time": 1650483082324, "ending_time": 1650483085943, "color":c1(1)}]},
{"label": "runBlang (5)", "times": [{"starting_time": 1650483069196, "ending_time": 1650483075946, "color":c1(1)}, {"starting_time": 1650483075946, "ending_time": 1650483089598, "color":c2(1), "label": "26.8s \/ 7.4 GB"}, {"starting_time": 1650483089598, "ending_time": 1650483095957, "color":c1(1)}]},
{"label": "runBlang (1)", "times": [{"starting_time": 1650483069280, "ending_time": 1650483075948, "color":c1(1)}, {"starting_time": 1650483075948, "ending_time": 1650483081912, "color":c2(1), "label": "21.7s \/ 7.4 GB"}, {"starting_time": 1650483081912, "ending_time": 1650483090949, "color":c1(1)}]},
{"label": "runBlang (14)", "times": [{"starting_time": 1650483069377, "ending_time": 1650483075950, "color":c1(1)}, {"starting_time": 1650483075950, "ending_time": 1650483082076, "color":c2(1), "label": "21.6s \/ 7.4 GB"}, {"starting_time": 1650483082076, "ending_time": 1650483090954, "color":c1(1)}]},
{"label": "runBlang (3)", "times": [{"starting_time": 1650483069458, "ending_time": 1650483075952, "color":c1(1)}, {"starting_time": 1650483075952, "ending_time": 1650483084962, "color":c2(1), "label": "21.5s \/ 7.4 GB"}, {"starting_time": 1650483084962, "ending_time": 1650483090960, "color":c1(1)}]},
{"label": "runBlang (13)", "times": [{"starting_time": 1650483069548, "ending_time": 1650483080943, "color":c1(1)}, {"starting_time": 1650483080943, "ending_time": 1650483086479, "color":c2(1), "label": "26.4s \/ 7.4 GB"}, {"starting_time": 1650483086479, "ending_time": 1650483095962, "color":c1(1)}]},
{"label": "runBlang (16)", "times": [{"starting_time": 1650483069631, "ending_time": 1650483080945, "color":c1(1)}, {"starting_time": 1650483080945, "ending_time": 1650483089128, "color":c2(1), "label": "31.3s \/ 7.4 GB"}, {"starting_time": 1650483089128, "ending_time": 1650483100942, "color":c1(1)}]},
{"label": "runBlang (6)", "times": [{"starting_time": 1650483069712, "ending_time": 1650483080947, "color":c1(1)}, {"starting_time": 1650483080947, "ending_time": 1650483093343, "color":c2(1), "label": "31.2s \/ 7.4 GB"}, {"starting_time": 1650483093343, "ending_time": 1650483100949, "color":c1(1)}]},
{"label": "runBlang (8)", "times": [{"starting_time": 1650483069800, "ending_time": 1650483080949, "color":c1(1)}, {"starting_time": 1650483080949, "ending_time": 1650483086582, "color":c2(1), "label": "26.2s \/ 7.4 GB"}, {"starting_time": 1650483086582, "ending_time": 1650483095967, "color":c1(1)}]},
{"label": "runBlang (10)", "times": [{"starting_time": 1650483069884, "ending_time": 1650483080950, "color":c1(1)}, {"starting_time": 1650483080950, "ending_time": 1650483089051, "color":c2(1), "label": "31.1s \/ 7.4 GB"}, {"starting_time": 1650483089051, "ending_time": 1650483100954, "color":c1(1)}]},
{"label": "runBlang (4)", "times": [{"starting_time": 1650483069970, "ending_time": 1650483080952, "color":c1(1)}, {"starting_time": 1650483080952, "ending_time": 1650483090059, "color":c2(1), "label": "31s \/ 7.4 GB"}, {"starting_time": 1650483090059, "ending_time": 1650483100960, "color":c1(1)}]},
{"label": "runBlang (9)", "times": [{"starting_time": 1650483070070, "ending_time": 1650483080954, "color":c1(1)}, {"starting_time": 1650483080954, "ending_time": 1650483088954, "color":c2(1), "label": "30.9s \/ 7.4 GB"}, {"starting_time": 1650483088954, "ending_time": 1650483100965, "color":c1(1)}]},
{"label": "runBlang (2)", "times": [{"starting_time": 1650483070160, "ending_time": 1650483080956, "color":c1(1)}, {"starting_time": 1650483080956, "ending_time": 1650483086524, "color":c2(1), "label": "25.8s \/ 7.4 GB"}, {"starting_time": 1650483086524, "ending_time": 1650483095973, "color":c1(1)}]},
{"label": "runBlang (22)", "times": [{"starting_time": 1650483070249, "ending_time": 1650483080957, "color":c1(1)}, {"starting_time": 1650483080957, "ending_time": 1650483088848, "color":c2(1), "label": "30.7s \/ 7.4 GB"}, {"starting_time": 1650483088848, "ending_time": 1650483100970, "color":c1(1)}]},
{"label": "runBlang (17)", "times": [{"starting_time": 1650483070334, "ending_time": 1650483080959, "color":c1(1)}, {"starting_time": 1650483080959, "ending_time": 1650483093889, "color":c2(1), "label": "35.6s \/ 7.4 GB"}, {"starting_time": 1650483093889, "ending_time": 1650483105943, "color":c1(1)}]},
{"label": "runBlang (26)", "times": [{"starting_time": 1650483070414, "ending_time": 1650483080961, "color":c1(1)}, {"starting_time": 1650483080961, "ending_time": 1650483086425, "color":c2(1), "label": "25.6s \/ 7.4 GB"}, {"starting_time": 1650483086425, "ending_time": 1650483095978, "color":c1(1)}]},
{"label": "runBlang (20)", "times": [{"starting_time": 1650483070544, "ending_time": 1650483080962, "color":c1(1)}, {"starting_time": 1650483080962, "ending_time": 1650483086507, "color":c2(1), "label": "25.4s \/ 7.4 GB"}, {"starting_time": 1650483086507, "ending_time": 1650483095983, "color":c1(1)}]},
{"label": "runBlang (23)", "times": [{"starting_time": 1650483070683, "ending_time": 1650483080964, "color":c1(1)}, {"starting_time": 1650483080964, "ending_time": 1650483093162, "color":c2(1), "label": "30.3s \/ 7.4 GB"}, {"starting_time": 1650483093162, "ending_time": 1650483100974, "color":c1(1)}]},
{"label": "runBlang (24)", "times": [{"starting_time": 1650483070768, "ending_time": 1650483080966, "color":c1(1)}, {"starting_time": 1650483080966, "ending_time": 1650483094287, "color":c2(1), "label": "35.2s \/ 7.4 GB"}, {"starting_time": 1650483094287, "ending_time": 1650483105950, "color":c1(1)}]},
{"label": "runBlang (19)", "times": [{"starting_time": 1650483070849, "ending_time": 1650483080967, "color":c1(1)}, {"starting_time": 1650483080967, "ending_time": 1650483086173, "color":c2(1), "label": "25.1s \/ 7.4 GB"}, {"starting_time": 1650483086173, "ending_time": 1650483095989, "color":c1(1)}]},
{"label": "runBlang (28)", "times": [{"starting_time": 1650483070923, "ending_time": 1650483080968, "color":c1(1)}, {"starting_time": 1650483080968, "ending_time": 1650483093774, "color":c2(1), "label": "30.1s \/ 7.4 GB"}, {"starting_time": 1650483093774, "ending_time": 1650483100979, "color":c1(1)}]},
{"label": "runBlang (18)", "times": [{"starting_time": 1650483071008, "ending_time": 1650483075959, "color":c1(1)}, {"starting_time": 1650483075959, "ending_time": 1650483087584, "color":c2(1), "label": "25s \/ 7.4 GB"}, {"starting_time": 1650483087584, "ending_time": 1650483095997, "color":c1(1)}]},
{"label": "runBlang (27)", "times": [{"starting_time": 1650483071099, "ending_time": 1650483075961, "color":c1(1)}, {"starting_time": 1650483075961, "ending_time": 1650483083536, "color":c2(1), "label": "24.9s \/ 7.4 GB"}, {"starting_time": 1650483083536, "ending_time": 1650483096002, "color":c1(1)}]},
{"label": "runBlang (25)", "times": [{"starting_time": 1650483071243, "ending_time": 1650483075963, "color":c1(1)}, {"starting_time": 1650483075963, "ending_time": 1650483083478, "color":c2(1), "label": "24.8s \/ 7.4 GB"}, {"starting_time": 1650483083478, "ending_time": 1650483096007, "color":c1(1)}]},
{"label": "runBlang (29)", "times": [{"starting_time": 1650483071329, "ending_time": 1650483075964, "color":c1(1)}, {"starting_time": 1650483075964, "ending_time": 1650483087693, "color":c2(1), "label": "24.7s \/ 7.4 GB"}, {"starting_time": 1650483087693, "ending_time": 1650483096012, "color":c1(1)}]},
{"label": "runBlang (21)", "times": [{"starting_time": 1650483071419, "ending_time": 1650483075966, "color":c1(1)}, {"starting_time": 1650483075966, "ending_time": 1650483083357, "color":c2(1), "label": "24.6s \/ 7.4 GB"}, {"starting_time": 1650483083357, "ending_time": 1650483096017, "color":c1(1)}]},
{"label": "runBlang (30)", "times": [{"starting_time": 1650483071501, "ending_time": 1650483075968, "color":c1(1)}, {"starting_time": 1650483075968, "ending_time": 1650483081029, "color":c2(1), "label": "14.5s \/ 7.4 GB"}, {"starting_time": 1650483081029, "ending_time": 1650483085962, "color":c1(1)}]},
{"label": "aggregate", "times": [{"starting_time": 1650483106078, "ending_time": 1650483110941, "color":c1(2)}, {"starting_time": 1650483110941, "ending_time": 1650483112926, "color":c2(2), "label": "14.9s \/ 4.4 GB"}, {"starting_time": 1650483112926, "ending_time": 1650483120943, "color":c1(2)}]},
{"label": "plot", "times": [{"starting_time": 1650483121073, "ending_time": 1650483125941, "color":c1(3)}, {"starting_time": 1650483125941, "ending_time": 1650483127788, "color":c2(3), "label": "14.9s \/ 249.1 MB"}, {"starting_time": 1650483127788, "ending_time": 1650483135943, "color":c1(3)}]}
]
function getTickFormat() {
var MIN = 1000 * 60
var HOUR = MIN * 60
var DAY = HOUR * 24
var delta = (endingMillis - beginningMillis)
if( delta < 2 * MIN ) {
return {
format: d3.time.format("%S"),
tickTime: d3.time.seconds,
tickInterval: 5,
tickSize: 6
}
}
if( delta < 2 * HOUR ) {
return {
format: d3.time.format("%M"),
tickTime: d3.time.minutes,
tickInterval: 5,
tickSize: 6
}
}
if( delta < 2 * DAY ) {
return {
format: d3.time.format("%H:%M"),
tickTime: d3.time.hours,
tickInterval: 1,
tickSize: 6
}
}
if( delta <= 7 * DAY ) {
return {
format: d3.time.format("%b %e %H:%M"),
tickTime: d3.time.hours,
tickInterval: 6,
tickSize: 6
}
}
return {
format: d3.time.format("%b %e"),
tickTime: d3.time.days,
tickInterval: 1,
tickSize: 6
}
}
function getLabelMargin(scale) {
$('<span class="labelSpan" style="display: none"></span>').appendTo('body');
var labelMargin = 0
$.each(data, function (key, value) {
labelMargin = Math.max(labelMargin, $('.labelSpan').html(value.label).width());
});
$('.labelSpan').remove();
return (labelMargin * scale);
}
function render() {
handler=null;
$("#timeline").empty()
$('#label_elapsed').text(elapsed)
$('#label_launch').text( d3.time.format('%d %b %Y %H:%M')(new Date(beginningMillis)) )
var width = $(window).width();
var chart = d3.timeline()
.stack() // toggles graph stacking
.margin({left:getLabelMargin(0.85), right:100, top:0, bottom:0})
.tickFormat( getTickFormat() )
.rowSeperators('#f5f5f5')
.showTimeAxisTick()
;
var svg = d3.select("#timeline").append("svg").attr("width", width).datum(data).call(chart);
}
function hrz() {
if( handler != null ) clearTimeout(handler)
handler = setTimeout(render, 150);
}
$(document).ready(render)
$(window).resize(hrz); // resize the applet on window resize
</script>
</head>
<body>
<div>
<h3>Processes execution timeline</h3>
<p>
Launch time: <span id='label_launch'> </span><br>
Elapsed time: <span id='label_elapsed'> </span>
</p>
<div id="timeline"></div>
</div>
<div id='footer'>
Created with Nextflow -- <a href='http://www.nextflow.io' target='_blank'>http://nextflow.io</a>
</div>
<script type="text/javascript">
var prot = (("https:" == document.location.protocol) ? "https://" : "http://");
document.write(unescape("%3Clink href='" + prot + "fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css' %3E%3C/link%3E"));
</script>
</body>
</html>