-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
171 lines (145 loc) · 5.37 KB
/
index.html
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<style>
.ulinebox {}
.ulinebox .lead {
display : inline-block;
width : 1px;
height : 100%;
background-color: white;
}
.ulinebox .unit {
display : inline-block;
width : 2px;
height : 2px;
margin-bottom: 3px;
background-color: black;
}
body {
color : white;
background-color: #545454;
}
.let {
border : 1px solid gray;
padding : 5px;
margin : 2px;
}
</style>
<script src="vc.js"></script>
<script>
function debug() {
var result = '';
for(var i=0,l=arguments.length;i<l;i++) {
result += (String(arguments[i]) + ' ');
}
var debugbox = document.getElementById("debug");
debugbox.appendChild(document.createTextNode( result ));
debugbox.appendChild(document.createElement("br"));
}
if (typeof console == "undefined") {
console = { debug : function(){} };
} else if (typeof console.debug == "undefined") {
console.debug = function(){}
}
function init() {
debug("Please do nothing while calibration takes place");
var doc = document;
view.nodes.timer = doc.getElementById("timer_button");
view.nodes.timer_sec = doc.getElementById("timer_sec");
view.nodes.code = doc.getElementById("code");
view.nodes.monitor = doc.getElementById("monitor_button");
view.nodes.nothing = doc.getElementById("do_nothing_button");
view.nodes.flashback = doc.getElementById("flashback_button");
progress.build( 'progressbox' );
timer.callibrate(function(){
var debugbox = document.getElementById("debug");
debugbox.style.display = "none";
var node = document.getElementById("controls");
node.style.display = "block";
});
uline.setbin( document.getElementById("dumpbin") );
}
</script>
</head>
<body onload="init()">
<div id="controls" style="display:none">
<div class="let" style="float:left;">
<!-- Monitor should be always above antything,
because firefox has bug height=2%
-->
<div id="progressbox"></div>
<div style="margin:2px">Monitor: <button id="monitor_button" onclick="controller.swit4('monitor')">Start</button></div>
</div>
<div style="float:left;">
<div class="let">
Timer :
<button onclick="controller.swit4('timer')" id="timer_button">Start</button>
<button onclick="timer.callibrate()">Re-Calibrate</button>
<input type="text" id="timer_sec" maxlength="2" style="width:30px"/>
</div>
<div class="let">
Usage dump :
<button onclick="uline.dump(stack)">Dump stack</button>
<button onclick="uline.clear(stack)">Clear</button>
</div>
<div class="let">
Flashback tool :
<button id="flashback_button" onclick="controller.swit4( 'flashback' )">Start</button>
<button onclick="flashback.dump()">Analyse</button>
</div>
</div>
<div style="clear:both"></div>
<div class="let">
Dump-bin : <br/>
<div id="dumpbin"></div>
</div>
<div class="let">
Interception code : <br/>
<textarea id="code" style="width:100%" cols="35" rows="7"> var arr = [];
for (var i=0;i<6099;i++) {
var div = document.createElement("div");
arr.push( div );
}</textarea>
<br/>
<button onclick="controller.intercept()">Execute</button>
<br/>
<button id="do_nothing_button" onclick="controller.nothing()">Empty</button>
<input type="text" value="dummy input"/>
<input type="checkbox" name="some_name"/> One
</div>
<div class="let">
Help : <br/>
Hi there, this is monitoring tool for the browser activity.
<br/>
If you are here for the first time, I assume you just would
like to click Start inside the Monitor box and enjoy the
view. <br/>
Start typing in the box, click buttons or resize window and
see how monitor behaves. <br/>
If you are done with that you also can look at the raw
data. <br/>
Stop the monitor and start the Timer <br/>
Now the monitor just collects the data but do not displays
it. Again do some stuff and click "Stop" button in the
Timer box. <br/>
Data is collected, so you can start watching it and
analyzing. Click "Dump stack" button and here you go. Data
is in a raw format together with a graph representing it.
<br/>
Input box inside the timer gives you possibility to start
the timer for some amount of seconds. After the amount of
seconds have passed it will turn of the timer. ( I use it
to have better time measurement ) <br/>
PS: Sometimes calibration is not working so activiy monitor
is doing wild. Click Re-Calibrate button to fix this stuff.
</div>
</div>
<div id="debug"></div>
<script src="progress.js"></script>
<script src="timer.js"></script>
<script src="uline.js"></script>
<script src="flashback.js"></script>
<script src="popup.js"></script>
</body>
</html>