diff options
Diffstat (limited to 'src/js')
| -rw-r--r-- | src/js/task-report.js | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/src/js/task-report.js b/src/js/task-report.js new file mode 100644 index 0000000..82d67b1 --- /dev/null +++ b/src/js/task-report.js | |||
| @@ -0,0 +1,115 @@ | |||
| 1 | $.fn.graphite.defaults.url = "http://graphite.openstack.org/render/"; | ||
| 2 | tasks = [ | ||
| 3 | 'CreateServer', | ||
| 4 | 'DeleteServer', | ||
| 5 | 'ListServers' | ||
| 6 | ]; | ||
| 7 | |||
| 8 | float_tasks = [ | ||
| 9 | 'AddFloatingIP', | ||
| 10 | 'CreateFloatingIP', | ||
| 11 | 'DeleteFloatingIP', | ||
| 12 | 'GetFloatingIP', | ||
| 13 | 'ListFloatingIPs' | ||
| 14 | ] | ||
| 15 | |||
| 16 | providers = [ | ||
| 17 | 'bluebox', | ||
| 18 | 'hpcloud', | ||
| 19 | 'rax', | ||
| 20 | 'ovh' | ||
| 21 | ] | ||
| 22 | |||
| 23 | jobs = [ | ||
| 24 | 'gate-tempest-dsvm-full', | ||
| 25 | 'gate-tempest-dsvm-neutron-full' | ||
| 26 | ] | ||
| 27 | |||
| 28 | for(i=0; i<tasks.length; ++i) { | ||
| 29 | |||
| 30 | $("#graph-container").append($(new Image()).addClass('graph').graphite({ | ||
| 31 | from: "-72hours", | ||
| 32 | width: 885, | ||
| 33 | height: 495, | ||
| 34 | bgcolor: 'ffffff', | ||
| 35 | fgcolor: '000000', | ||
| 36 | lineMode: 'connected', | ||
| 37 | title: tasks[i], | ||
| 38 | target: [ | ||
| 39 | "alias(averageSeries(stats.timers.nodepool.task.hpcloud-b*." + tasks[i] + "Task.mean), 'HP')", | ||
| 40 | "alias(averageSeries(stats.timers.nodepool.task.ovh-gra1." + tasks[i] + "Task.mean), 'OVH')", | ||
| 41 | "alias(averageSeries(stats.timers.nodepool.task.bluebox-sjc1." + tasks[i] + "Task.mean), 'BB')", | ||
| 42 | "alias(averageSeries(stats.timers.nodepool.task.rax-*." + tasks[i] + "Task.mean), 'RAX')", | ||
| 43 | ] | ||
| 44 | })); | ||
| 45 | |||
| 46 | } | ||
| 47 | |||
| 48 | for(i=0; i<float_tasks.length; ++i) { | ||
| 49 | |||
| 50 | $("#graph-container").append($(new Image()).addClass('graph').graphite({ | ||
| 51 | from: "-72hours", | ||
| 52 | width: 885, | ||
| 53 | height: 495, | ||
| 54 | bgcolor: 'ffffff', | ||
| 55 | fgcolor: '000000', | ||
| 56 | lineMode: 'connected', | ||
| 57 | title: float_tasks[i], | ||
| 58 | target: [ | ||
| 59 | "alias(averageSeries(stats.timers.nodepool.task.hpcloud-b*." + float_tasks[i] + "Task.mean), 'HP')", | ||
| 60 | "alias(averageSeries(stats.timers.nodepool.task.bluebox-sjc1." + float_tasks[i] + "Task.mean), 'BB')", | ||
| 61 | ] | ||
| 62 | })); | ||
| 63 | |||
| 64 | } | ||
| 65 | |||
| 66 | $("#graph-container").append($(new Image()).addClass('graph').graphite({ | ||
| 67 | from: "-72hours", | ||
| 68 | width: 885, | ||
| 69 | height: 495, | ||
| 70 | bgcolor: 'ffffff', | ||
| 71 | fgcolor: '000000', | ||
| 72 | lineMode: 'connected', | ||
| 73 | title: 'Time to SSH Ready', | ||
| 74 | target: [ | ||
| 75 | "alias(averageSeries(stats.timers.nodepool.launch.provider.hpcloud-b*.ready.mean), 'HP')", | ||
| 76 | "alias(averageSeries(stats.timers.nodepool.launch.provider.ovh-gra1.ready.mean), 'OVH')", | ||
| 77 | "alias(averageSeries(stats.timers.nodepool.launch.provider.bluebox-sjc1.ready.mean), 'BB')", | ||
| 78 | "alias(averageSeries(stats.timers.nodepool.launch.provider.rax-*.ready.mean), 'RAX')", | ||
| 79 | ] | ||
| 80 | })); | ||
| 81 | |||
| 82 | |||
| 83 | for(i=0; i<providers.length; ++i) { | ||
| 84 | $("#graph-container").append($(new Image()).addClass('graph').graphite({ | ||
| 85 | from: "-72hours", | ||
| 86 | width: 885, | ||
| 87 | height: 495, | ||
| 88 | bgcolor: 'ffffff', | ||
| 89 | fgcolor: '000000', | ||
| 90 | areaMode: 'stacked', | ||
| 91 | title: providers[i] + " nodes launched", | ||
| 92 | target: [ | ||
| 93 | "color(alias(summarize(sumSeries(stats_counts.nodepool.launch.provider." + providers[i] + "*.ready), '1h'), 'Ready'), '00ff22')", | ||
| 94 | "color(alias(summarize(sumSeries(stats_counts.nodepool.launch.provider." + providers[i] + "*.error.*), '1h'), 'Error'), 'ff0000')" | ||
| 95 | ] | ||
| 96 | })); | ||
| 97 | |||
| 98 | } | ||
| 99 | |||
| 100 | for(i=0; i<jobs.length; ++i) { | ||
| 101 | $("#graph-container").append($(new Image()).addClass('graph').graphite({ | ||
| 102 | from: "-72hours", | ||
| 103 | width: 885, | ||
| 104 | height: 495, | ||
| 105 | bgcolor: 'ffffff', | ||
| 106 | fgcolor: '000000', | ||
| 107 | lineMode: 'connected', | ||
| 108 | title: jobs[i] + ' job runtime', | ||
| 109 | target: [ | ||
| 110 | "alias(averageSeries(stats.timers.nodepool.job." + jobs[i] + ".master.*.hpcloud-b*.runtime.mean), 'HP')", | ||
| 111 | "alias(averageSeries(stats.timers.nodepool.job." + jobs[i] + ".master.*.ovh-gra1.runtime.mean), 'OVH')", | ||
| 112 | "alias(averageSeries(stats.timers.nodepool.job." + jobs[i] + ".master.*.rax-*.runtime.mean), 'RAX')", | ||
| 113 | ] | ||
| 114 | })); | ||
| 115 | } | ||
