-
Notifications
You must be signed in to change notification settings - Fork 1
/
flashback.js
45 lines (33 loc) · 892 Bytes
/
flashback.js
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
flashback = (typeof flashback == "undefined") ? (function() {
var flashback = {};
var stacks = [];
flashback.dump = function() {
console.debug('Number of dumps',stacks.length);
var s = [];
// showing in progress
for (var i=0;i<stacks.length;i++) {
var current = stacks[i];
progress.push( current );
s = s.concat( current );
}
// showing in uline
uline.dump( s );
return s;
}
flashback.get = function() {
return stacks;
}
flashback.push = function( arr ) {
stacks.push( arr );
}
flashback.collect = function() {
stacks = [];
timer.collect();
collector.start( this );
}
flashback.stop = function() {
timer.stop();
collector.stop();
}
return flashback;
})() : flashback;