1// Name: Seadragon.Seadragon.Profiler.debug.js 2// Assembly: AjaxControlToolkit 3// Version: 4.1.7.1213 4// FileVersion: 4.1.7.1213 5// (c) 2010 CodePlex Foundation 6Type.registerNamespace('Sys.Extended.UI.Seadragon'); 7 8Sys.Extended.UI.Seadragon.Profiler = function() { 9 10 this._midUpdate = false; 11 this._numUpdates = 0; 12 13 this._lastBeginTime = null; 14 this._lastEndTime = null; 15 16 this._minUpdateTime = Infinity; 17 this._avgUpdateTime = 0; 18 this._maxUpdateTime = 0; 19 20 this._minIdleTime = Infinity; 21 this._avgIdleTime = 0; 22 this._maxIdleTime = 0; 23}; 24Sys.Extended.UI.Seadragon.Profiler.prototype = { 25 26 getAvgUpdateTime: function() { 27 return this._avgUpdateTime; 28 }, 29 30 getMinUpdateTime: function() { 31 return this._minUpdateTime; 32 }, 33 34 getMaxUpdateTime: function() { 35 return this._maxUpdateTime; 36 }, 37 38 39 getAvgIdleTime: function() { 40 return this._avgIdleTime; 41 }, 42 43 getMinIdleTime: function() { 44 return this._minIdleTime; 45 }, 46 47 getMaxIdleTime: function() { 48 return this._maxIdleTime; 49 }, 50 51 52 isMidUpdate: function() { 53 return this._midUpdate; 54 }, 55 56 getNumUpdates: function() { 57 return this._numUpdates; 58 }, 59 60 61 beginUpdate: function() { 62 if (this._midUpdate) { 63 this.endUpdate(); 64 } 65 66 this._midUpdate = true; 67 this._lastBeginTime = new Date().getTime(); 68 69 if (this._numUpdates < 1) { 70 return; // this is the first update 71 } 72 73 var time = this._lastBeginTime - this._lastEndTime; 74 75 this._avgIdleTime = (this._avgIdleTime * (this._numUpdates - 1) + time) / this._numUpdates; 76 77 if (time < this._minIdleTime) { 78 this._minIdleTime = time; 79 } 80 if (time > this._maxIdleTime) { 81 this._maxIdleTime = time; 82 } 83 }, 84 85 endUpdate: function() { 86 if (!this._midUpdate) { 87 return; 88 } 89 90 this._lastEndTime = new Date().getTime(); 91 this._midUpdate = false; 92 93 var time = this._lastEndTime - this._lastBeginTime; 94 95 this._numUpdates++; 96 this._avgUpdateTime = (this._avgUpdateTime * (this._numUpdates - 1) + time) / this._numUpdates; 97 98 if (time < this._minUpdateTime) { 99 this._minUpdateTime = time; 100 } 101 if (time > this._maxUpdateTime) { 102 this._maxUpdateTime = time; 103 } 104 }, 105 106 clearProfile: function() { 107 this._midUpdate = false; 108 this._numUpdates = 0; 109 110 this._lastBeginTime = null; 111 this._lastEndTime = null; 112 113 this._minUpdateTime = Infinity; 114 this._avgUpdateTime = 0; 115 this._maxUpdateTime = 0; 116 117 this._minIdleTime = Infinity; 118 this._avgIdleTime = 0; 119 this._maxIdleTime = 0; 120 } 121}; 122Sys.Extended.UI.Seadragon.Profiler.registerClass('Sys.Extended.UI.Seadragon.Profiler', null, Sys.IDisposable);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.