-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathindex.html
More file actions
124 lines (116 loc) · 4.85 KB
/
index.html
File metadata and controls
124 lines (116 loc) · 4.85 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
<html>
<head>
<title>RTBkit Quickboard</title>
<script src="//code.jquery.com/jquery-1.9.0.min.js" type="text/javascript"></script>
</head>
<body align="center">
<script language="javascript">
function getParams()
{
var vars = {}, hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for(var i = 0; i < hashes.length; i++)
{
hash = decodeURIComponent(hashes[i]).split('=');
vars[hash[0]] = hash[1];
}
return vars;
}
var defaults = {
host: "http://graphite.host", prefix: "",
from: "-12hours", width: 1800, height: 250,
};
var config = $.extend(defaults, getParams());
var graphs = [
{
title: "Bid Request Volume", vtitle: "QPS", yMin: 0, areaMode: "stacked",
target: [
"aliasByNode(drawAsInfinite(sum(PREFIX.*.routerUp)),-1)",
"groupByNode(PREFIX.*.exchange.*.requests,1,'sumSeries')"
]
},
{
title: "Monitor", vtitle: "QPS", yMin: 0, areaMode: "all",
target: [
"aliasByNode(sum(PREFIX.*.monitor.ignoredAuctions),-1)",
"aliasByNode(sum(PREFIX.*.*.auctionStart),-1)",
"aliasByNode(drawAsInfinite(sum(PREFIX.*.monitor.systemInSlowMode)),-1)",
"aliasByNode(drawAsInfinite(sum(PREFIX.*.routerUp)),-1)",
]
},
{
title: "Core Duty Cycles", vtitle: "Percent", yMin: 0, yMax: 1, hideLegend: "false",
target: [
"aliasByNode(maxSeries(PREFIX.*.loopMonitor.exchanges.*.mean),-2,-1)",
"aliasByNode(maxSeries(PREFIX.*.loopMonitor.routerLoop.mean),-2,-1)",
"aliasByNode(maxSeries(PREFIX.*.loopMonitor.augmentationLoop.mean),-2,-1)",
"aliasByNode(maxSeries(PREFIX.*.loopMonitor.postAuctionLoop.mean),-2,-1)",
"aliasByNode(maxSeries(PREFIX.*.loopMonitor.logger.mean),-2,-1)",
"scale(PREFIX.*.auctionKeepPercentage.mean,0.01)",
]
},
{
title: "Timing", vtitle: "Ms", hideLegend: "false",
target: [
"aliasByNode(averageSeries(PREFIX.*.*.auctionNetworkLatencyMs.mean),-2,-1)",
"aliasByNode(averageSeries(PREFIX.*.*.auctionNetworkLatencyMs.upper_98),-2,-1)",
"aliasByNode(averageSeries(PREFIX.*.*.auctionTotalTimeMs.mean),-2,-1)",
"aliasByNode(averageSeries(PREFIX.*.*.auctionTotalTimeMs.upper_98),-2,-1)",
]
},
{
title: "Augmentors", vtitle: "QPS", areaMode: "first",
target: [
"aliasByNode(sum(PREFIX.*.augmentationLoop.augmentor.*.request),-2,-1)",
"aliasByNode(sum(PREFIX.*.augmentationLoop.augmentor.*.validResponse),-2,-1)",
"aliasByNode(sum(PREFIX.*.augmentationLoop.augmentor.*.expiredTooLate),-2,-1)",
"aliasByNode(sum(PREFIX.*.augmentationLoop.augmentor.*.skippedTooManyInFlight),-2,-1)",
"aliasByNode(sum(drawAsInfinite(*.*.*.router.augmentationLoop.augmentor.*.configured)),-1)",
]
},
{
title: "Pipeline: Filters", vtitle: "events",
target: [
"aliasByNode(scale(sum(PREFIX.*.accounts.*.*.filter.intoDynamicFilters),10),-1)",
"aliasByNode(scale(sum(PREFIX.*.accounts.*.*.filter.passedDynamicFilters),10),-1)",
]
},
{
title: "Pipeline: Bids", vtitle: "events",
target: [
"aliasByNode(sum(PREFIX.*.bid),-1)",
"aliasByNode(sum(PREFIX.*.bidResult.WIN.messagesReceived),-2,-1)",
"aliasByNode(sum(PREFIX.*.bidResult.WIN.delivered),-2,-1)",
]
},
];
$(function() {
var form = $("<form>");
$.each(config, function(key,val){
form.append(
$("<label>").text(key+": ").css("margin", "10px").append(
$("<input>").attr({name: key, size: (""+val).length+2}).val(val)
)
);
});
form.append($("<input type='submit'>"))
$("body").append(form, $.map(graphs, function (g) {
var src = config.host + "/render/?";
src += $.param($.extend(g, config), true);
src = src.replace(/PREFIX/g, config.prefix);
return $("<img>")
.attr({src: src, width: config.width, height: config.height})
.bind("dblclick", function (e) {
window.open(src.replace("render", "composer"));
});
}));
setInterval(function refreshImgs() {
$("img").each(function(){
$(this).attr("src", $(this).attr("src"));
});
}, 60*1000);
});
</script>
</div>
</body>
</html>