Comparing version 0.6.2 to 0.7.0
@@ -375,2 +375,17 @@ "use strict"; | ||
} | ||
}, { | ||
key: "window", | ||
get: function get() { | ||
var _this3 = this; | ||
var type = this._type; | ||
var win = this._arr.map(function (slot) { | ||
var ops = {}; | ||
_this3._ops.forEach(function (op) { | ||
ops[op] = OPS[type][op].fn(undefined, [slot], [], [slot], ops, {}); | ||
}); | ||
return ops; | ||
}); | ||
return win; | ||
} | ||
}]); | ||
@@ -421,3 +436,3 @@ | ||
value: function _pushNum(vals) { | ||
var _this3 = this; | ||
var _this4 = this; | ||
@@ -433,3 +448,3 @@ var arr = this._arr, | ||
vals.forEach(function (v) { | ||
return _this3._arr.push(v); | ||
return _this4._arr.push(v); | ||
}); | ||
@@ -442,3 +457,3 @@ | ||
this._ops.forEach(function (op) { | ||
_this3.stats[op] = OPS[type][op].fn(_this3.stats[op], vals, old, arr, _this3.stats, oldstats); | ||
_this4.stats[op] = OPS[type][op].fn(_this4.stats[op], vals, old, arr, _this4.stats, oldstats); | ||
}); | ||
@@ -451,3 +466,3 @@ | ||
value: function _pushCat(vals) { | ||
var _this4 = this; | ||
var _this5 = this; | ||
@@ -471,3 +486,3 @@ var arr = this._arr, | ||
this._ops.forEach(function (op) { | ||
_this4.stats[op] = OPS[type][op].fn(_this4.stats[op], [map], old, arr, _this4.stats, oldstats); | ||
_this5.stats[op] = OPS[type][op].fn(_this5.stats[op], [map], old, arr, _this5.stats, oldstats); | ||
}); | ||
@@ -487,2 +502,17 @@ | ||
} | ||
}, { | ||
key: "window", | ||
get: function get() { | ||
var _this6 = this; | ||
var type = this._type; | ||
var win = this._arr.map(function (slot) { | ||
var ops = {}; | ||
_this6._ops.forEach(function (op) { | ||
ops[op] = OPS[type][op].fn(undefined, [slot], [], [slot], ops, {}); | ||
}); | ||
return ops; | ||
}); | ||
return win; | ||
} | ||
}]); | ||
@@ -489,0 +519,0 @@ |
/*! swstats 2018-01-09 */ | ||
"use strict";function _classCallCheck(t,s){if(!(t instanceof s))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function t(t,s){for(var n=0;n<s.length;n++){var r=s[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(s,n,r){return n&&t(s.prototype,n),r&&t(s,r),s}}(),_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function t(s,n,r){function e(a,o){if(!n[a]){if(!s[a]){var u="function"==typeof require&&require;if(!o&&u)return u(a,!0);if(i)return i(a,!0);var h=new Error("Cannot find module '"+a+"'");throw h.code="MODULE_NOT_FOUND",h}var f=n[a]={exports:{}};s[a][0].call(f.exports,function(t){var n=s[a][1][t];return e(n||t)},f,f.exports,t,s,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)e(r[a]);return e}({1:[function(t,s,n){!function(s){var n=t("./main.js");s.SWindow=n}(window)},{"./main.js":3}],2:[function(t,s,n){s.exports={sum:function(t,s,n,r,e,i){t=void 0===t?{}:t;for(var a=s.length,o=n.length,u=0;u<a;u++)for(var h in s[u].v)t[h]=t[h]||0,t[h]+=s[u].v[h];for(var f=0;f<o;f++)for(var c in n[f].v)t[c]=t[c]||0,t[c]-=n[f].v[c];return t},freq:function(t,s,n,r,e,i){var a=e.sum,o=0,u={};for(var h in a)o+=a[h];for(var f in a)u[f]=a[f]/o;return u},mode:function(t,s,n,r,e,i){var a=e.sum,o=[];for(var u in a)o.push({k:u,t:a[u]});return o.sort(function(t,s){return t.t-s.t}),(o.pop()||{}).k}}},{}],3:[function(t,s,n){function r(t){if("object"!=(void 0===t?"undefined":_typeof(t)))return t;var s={};for(var n in t)s[n]=r(t[n]);return s}function e(t,s,n,r,e){p[t][s]={fn:r,deps:n},e&&c[t].push(s)}function i(t,s,n){var r=p[n][t].deps;return!!r.length&&(r.indexOf(s)>=0||r.reduce(function(t,r){return t||i(r,s,n)},!1))}function a(t,s){var n={},r=!1;t.forEach(function(t){return n[t]=!0});do{r=!1,t.forEach(function(e){p[s][e].deps.forEach(function(s){n[s]||(n[s]=!0,t.push(s),r=!0)})})}while(r);if(t.length>1){var e=null,a=!1;do{a=!1;for(var o=0;o<t.length;o++)for(var u=o;u<t.length;u++)i(t[o],t[u],s)&&(e=t[o],t[o]=t[u],t[u]=e,a=!0)}while(a)}}var o=t("./nops.js"),u=t("./cops.js"),h=[],f={numeric:"numeric",category:"category"},c={numeric:["count","sum","max","min","avg","stdev"],category:["sum","freq","mode"]},v={type:f.numeric,ops:c.numeric,step:1e3},p={numeric:{count:{fn:o.count,deps:[]},sum:{fn:o.sum,deps:[]},max:{fn:o.max,deps:[]},min:{fn:o.min,deps:[]},avg:{fn:o.avg,deps:[]},stdev:{fn:o.stdev,deps:["avg"]}},category:{sum:{fn:u.sum,deps:[]},freq:{fn:u.freq,deps:["sum"]},mode:{fn:u.mode,deps:["sum"]}}};setInterval(function(){var t=Date.now();h.filter(function(t){return!t._pause}).forEach(function(s){for(var n=s._arr,e=s._time,i=s._type,a=[],o=r(s.stats);n.length&&t-n[0].t>e;)a.push(n.shift());s._ops.forEach(function(t){s.stats[t]=p[i][t].fn(s.stats[t],[],a,s._arr,s.stats,o)})})},1e3);var l=function(){function t(s,n){_classCallCheck(this,t),n=n||v,this._options=n,this._arr=[],this._time=s||1e4,this._type=n.type||v.type,this._ops=n.ops||c[this._type],this._step=n.step||v.step,this._pause=!1,this._active=!0,this._oldstats={},this.stats=r(n.stats||{}),a(this._ops,this._type),h.push(this)}return _createClass(t,[{key:"clean",value:function(){this._arr=[],this._oldstats={},this.stats=r(this._options.stats||{})}},{key:"push",value:function(t){if(this._active&&!this._pause)return t=t instanceof Array?t:[t],this._type==f.numeric?this._pushNum(t):this._pushCat(t)}},{key:"pause",value:function(){this._pause=!0}},{key:"resume",value:function(t){var s=this._arr;if(t&&s.length){var n=Date.now()-s[s.length].t;s.length.forEach(function(t){return t.t+=n})}this._pause=!1}},{key:"destroy",value:function(){var t=h.indexOf(this);h.splice(t,1),this._active=!1}},{key:"_pushNum",value:function(t){var s=this,n=Date.now(),e=this._arr,i=this._type,a=r(this.stats);t=t.map(function(t){return{t:n,v:t,l:1,max:t,min:t}}),e.length||e.push({t:n,v:0,l:0,max:-1/0,min:1/0});var o=r(e[e.length-1]);if(n-o.t<this._step){t.forEach(function(t){o.v+=t.v,o.l+=1,o.max=Math.max(o.max,t.v),o.min=Math.min(o.min,t.v)});var u=[e.pop()],h=[o];e.push(o),this._ops.forEach(function(t){s.stats[t]=p[i][t].fn(s.stats[t],h,u,e,s.stats,a)})}else t.forEach(function(t){e.push(t)}),this._ops.forEach(function(n){s.stats[n]=p[i][n].fn(s.stats[n],t,[],e,s.stats,a)});return this}},{key:"_pushCat",value:function(t){var s=this,n=Date.now(),e=this._arr,i=this._type,a=r(this.stats),o={};t.forEach(function(t){o[t]=o[t]||0,o[t]++}),e.length||e.push({t:n,v:{}});var u=r(e[e.length-1]);if(n-u.t<this._step){for(var h in o)u.v[h]=u.v[h]||0,u.v[h]+=o[h];var f=[e.pop()],c=[u];e.push(u),this._ops.forEach(function(t){s.stats[t]=p[i][t].fn(s.stats[t],c,f,e,s.stats,a)})}else{var v={t:n,v:o};e.push(v),this._ops.forEach(function(t){s.stats[t]=p[i][t].fn(s.stats[t],[v],[],e,s.stats,a)})}return this}},{key:"toJSON",value:function(){return this.stats}},{key:"length",get:function(){return this._arr.length}}]),t}(),_=function(){function t(s,n){_classCallCheck(this,t),n=n||v,this._options=n,this._arr=[],this._size=s||1e3,this._type=n.type||v.type,this._ops=n.ops||c[this._type],this.stats=r(n.stats||{}),a(this._ops,this._type)}return _createClass(t,[{key:"clean",value:function(){this._arr=[],this._oldstats={},this.stats=r(this._options.stats||{})}},{key:"push",value:function(t){return t=t instanceof Array?t:[t],this._type==f.numeric?this._pushNum(t):this._pushCat(t)}},{key:"_pushNum",value:function(t){var s=this,n=this._arr,e=[],i=this._type,a=r(this.stats);for((t=t.map(function(t){return{v:t,l:1,max:t,min:t}})).forEach(function(t){return s._arr.push(t)});this._arr.length>this._size;)e.push(this._arr.shift());return this._ops.forEach(function(r){s.stats[r]=p[i][r].fn(s.stats[r],t,e,n,s.stats,a)}),this}},{key:"_pushCat",value:function(t){var s=this,n=this._arr,e=[],i=this._type,a=r(this.stats),o={v:{}};for(t.forEach(function(t){o.v[t]=o.v[t]||0,o.v[t]++}),this._arr.push(o);this._arr.length>this._size;)e.push(this._arr.shift());return this._ops.forEach(function(t){s.stats[t]=p[i][t].fn(s.stats[t],[o],e,n,s.stats,a)}),this}},{key:"toJSON",value:function(){return this.stats}},{key:"length",get:function(){return this._arr.length}}]),t}();s.exports={TimeStats:l,SizeStats:_,register:e}},{"./cops.js":2,"./nops.js":4}],4:[function(t,s,n){var r={count:function(t,s,n,r,e,i){for(var a=0,o=r.length,u=0;u<o;u++)a+=r[u].l||1;return a},sum:function(t,s,n,r,e,i){t=void 0===t?0:t;for(var a=s.length,o=n.length,u=0;u<a;u++)t+=s[u].v;for(var h=0;h<o;h++)t-=n[h].v;return t},max:function(t,s,n,r,e,i){for(var a=-1/0,o=r.length,u=0;u<o;u++)a=Math.max(a,r[u].max);return a},min:function(t,s,n,r,e,i){for(var a=1/0,o=r.length,u=0;u<o;u++)a=Math.min(a,r[u].min);return a},avg:function(t,s,n,e,i,a){var o=r.count(0,0,0,s),u=r.count(0,0,0,n),h=r.count(0,0,0,e),f=h-o+u;t=void 0===t?0:t,t*=f;for(var c=0;c<s.length;c++)t+=s[c].v;for(var v=0;v<n.length;v++)t-=n[v].v;return t/=h,isNaN(t)?0:t},stdev:function(t,s,n,e,i,a){a.stdev=a.stdev||{avg:1,sqsum:0,sum:0,stdev:0};for(var o=r.count(0,0,0,s),u=r.count(0,0,0,n),h=(r.count(0,0,0,e),e.length),f=(a.avg,a.stdev.avg,a.stdev.sqsum),c=a.stdev.sum,v=i.avg||0,p=f,l=c,_=0;_<n.length;_++){var m=n[_].v/(n[_].l||1);p-=m*m,l-=m}for(var y=0;y<s.length;y++){var g=s[y].v/(s[y].l||1);p+=g*g,l+=g}var d=Math.sqrt((p-2*v*l+h*v*v)/h);return{avg:v,sqsum:p,sum:l,stdev:d}}};s.exports=r},{}]},{},[1]); | ||
"use strict";function _classCallCheck(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function t(t,n){for(var s=0;s<n.length;s++){var r=n[s];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(n,s,r){return s&&t(n.prototype,s),r&&t(n,r),n}}(),_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function t(n,s,r){function e(a,o){if(!s[a]){if(!n[a]){var u="function"==typeof require&&require;if(!o&&u)return u(a,!0);if(i)return i(a,!0);var h=new Error("Cannot find module '"+a+"'");throw h.code="MODULE_NOT_FOUND",h}var f=s[a]={exports:{}};n[a][0].call(f.exports,function(t){var s=n[a][1][t];return e(s||t)},f,f.exports,t,n,s,r)}return s[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)e(r[a]);return e}({1:[function(t,n,s){!function(n){var s=t("./main.js");n.SWindow=s}(window)},{"./main.js":3}],2:[function(t,n,s){n.exports={sum:function(t,n,s,r,e,i){t=void 0===t?{}:t;for(var a=n.length,o=s.length,u=0;u<a;u++)for(var h in n[u].v)t[h]=t[h]||0,t[h]+=n[u].v[h];for(var f=0;f<o;f++)for(var c in s[f].v)t[c]=t[c]||0,t[c]-=s[f].v[c];return t},freq:function(t,n,s,r,e,i){var a=e.sum,o=0,u={};for(var h in a)o+=a[h];for(var f in a)u[f]=a[f]/o;return u},mode:function(t,n,s,r,e,i){var a=e.sum,o=[];for(var u in a)o.push({k:u,t:a[u]});return o.sort(function(t,n){return t.t-n.t}),(o.pop()||{}).k}}},{}],3:[function(t,n,s){function r(t){if("object"!=(void 0===t?"undefined":_typeof(t)))return t;var n={};for(var s in t)n[s]=r(t[s]);return n}function e(t,n,s,r,e){p[t][n]={fn:r,deps:s},e&&c[t].push(n)}function i(t,n,s){var r=p[s][t].deps;return!!r.length&&(r.indexOf(n)>=0||r.reduce(function(t,r){return t||i(r,n,s)},!1))}function a(t,n){var s={},r=!1;t.forEach(function(t){return s[t]=!0});do{r=!1,t.forEach(function(e){p[n][e].deps.forEach(function(n){s[n]||(s[n]=!0,t.push(n),r=!0)})})}while(r);if(t.length>1){var e=null,a=!1;do{a=!1;for(var o=0;o<t.length;o++)for(var u=o;u<t.length;u++)i(t[o],t[u],n)&&(e=t[o],t[o]=t[u],t[u]=e,a=!0)}while(a)}}var o=t("./nops.js"),u=t("./cops.js"),h=[],f={numeric:"numeric",category:"category"},c={numeric:["count","sum","max","min","avg","stdev"],category:["sum","freq","mode"]},v={type:f.numeric,ops:c.numeric,step:1e3},p={numeric:{count:{fn:o.count,deps:[]},sum:{fn:o.sum,deps:[]},max:{fn:o.max,deps:[]},min:{fn:o.min,deps:[]},avg:{fn:o.avg,deps:[]},stdev:{fn:o.stdev,deps:["avg"]}},category:{sum:{fn:u.sum,deps:[]},freq:{fn:u.freq,deps:["sum"]},mode:{fn:u.mode,deps:["sum"]}}};setInterval(function(){var t=Date.now();h.filter(function(t){return!t._pause}).forEach(function(n){for(var s=n._arr,e=n._time,i=n._type,a=[],o=r(n.stats);s.length&&t-s[0].t>e;)a.push(s.shift());n._ops.forEach(function(t){n.stats[t]=p[i][t].fn(n.stats[t],[],a,n._arr,n.stats,o)})})},1e3);var l=function(){function t(n,s){_classCallCheck(this,t),s=s||v,this._options=s,this._arr=[],this._time=n||1e4,this._type=s.type||v.type,this._ops=s.ops||c[this._type],this._step=s.step||v.step,this._pause=!1,this._active=!0,this._oldstats={},this.stats=r(s.stats||{}),a(this._ops,this._type),h.push(this)}return _createClass(t,[{key:"clean",value:function(){this._arr=[],this._oldstats={},this.stats=r(this._options.stats||{})}},{key:"push",value:function(t){if(this._active&&!this._pause)return t=t instanceof Array?t:[t],this._type==f.numeric?this._pushNum(t):this._pushCat(t)}},{key:"pause",value:function(){this._pause=!0}},{key:"resume",value:function(t){var n=this._arr;if(t&&n.length){var s=Date.now()-n[n.length].t;n.length.forEach(function(t){return t.t+=s})}this._pause=!1}},{key:"destroy",value:function(){var t=h.indexOf(this);h.splice(t,1),this._active=!1}},{key:"_pushNum",value:function(t){var n=this,s=Date.now(),e=this._arr,i=this._type,a=r(this.stats);t=t.map(function(t){return{t:s,v:t,l:1,max:t,min:t}}),e.length||e.push({t:s,v:0,l:0,max:-1/0,min:1/0});var o=r(e[e.length-1]);if(s-o.t<this._step){t.forEach(function(t){o.v+=t.v,o.l+=1,o.max=Math.max(o.max,t.v),o.min=Math.min(o.min,t.v)});var u=[e.pop()],h=[o];e.push(o),this._ops.forEach(function(t){n.stats[t]=p[i][t].fn(n.stats[t],h,u,e,n.stats,a)})}else t.forEach(function(t){e.push(t)}),this._ops.forEach(function(s){n.stats[s]=p[i][s].fn(n.stats[s],t,[],e,n.stats,a)});return this}},{key:"_pushCat",value:function(t){var n=this,s=Date.now(),e=this._arr,i=this._type,a=r(this.stats),o={};t.forEach(function(t){o[t]=o[t]||0,o[t]++}),e.length||e.push({t:s,v:{}});var u=r(e[e.length-1]);if(s-u.t<this._step){for(var h in o)u.v[h]=u.v[h]||0,u.v[h]+=o[h];var f=[e.pop()],c=[u];e.push(u),this._ops.forEach(function(t){n.stats[t]=p[i][t].fn(n.stats[t],c,f,e,n.stats,a)})}else{var v={t:s,v:o};e.push(v),this._ops.forEach(function(t){n.stats[t]=p[i][t].fn(n.stats[t],[v],[],e,n.stats,a)})}return this}},{key:"toJSON",value:function(){return this.stats}},{key:"length",get:function(){return this._arr.length}},{key:"window",get:function(){var t=this,n=this._type;return this._arr.map(function(s){var r={};return t._ops.forEach(function(t){r[t]=p[n][t].fn(void 0,[s],[],[s],r,{})}),r})}}]),t}(),_=function(){function t(n,s){_classCallCheck(this,t),s=s||v,this._options=s,this._arr=[],this._size=n||1e3,this._type=s.type||v.type,this._ops=s.ops||c[this._type],this.stats=r(s.stats||{}),a(this._ops,this._type)}return _createClass(t,[{key:"clean",value:function(){this._arr=[],this._oldstats={},this.stats=r(this._options.stats||{})}},{key:"push",value:function(t){return t=t instanceof Array?t:[t],this._type==f.numeric?this._pushNum(t):this._pushCat(t)}},{key:"_pushNum",value:function(t){var n=this,s=this._arr,e=[],i=this._type,a=r(this.stats);for((t=t.map(function(t){return{v:t,l:1,max:t,min:t}})).forEach(function(t){return n._arr.push(t)});this._arr.length>this._size;)e.push(this._arr.shift());return this._ops.forEach(function(r){n.stats[r]=p[i][r].fn(n.stats[r],t,e,s,n.stats,a)}),this}},{key:"_pushCat",value:function(t){var n=this,s=this._arr,e=[],i=this._type,a=r(this.stats),o={v:{}};for(t.forEach(function(t){o.v[t]=o.v[t]||0,o.v[t]++}),this._arr.push(o);this._arr.length>this._size;)e.push(this._arr.shift());return this._ops.forEach(function(t){n.stats[t]=p[i][t].fn(n.stats[t],[o],e,s,n.stats,a)}),this}},{key:"toJSON",value:function(){return this.stats}},{key:"length",get:function(){return this._arr.length}},{key:"window",get:function(){var t=this,n=this._type;return this._arr.map(function(s){var r={};return t._ops.forEach(function(t){r[t]=p[n][t].fn(void 0,[s],[],[s],r,{})}),r})}}]),t}();n.exports={TimeStats:l,SizeStats:_,register:e}},{"./cops.js":2,"./nops.js":4}],4:[function(t,n,s){var r={count:function(t,n,s,r,e,i){for(var a=0,o=r.length,u=0;u<o;u++)a+=r[u].l||1;return a},sum:function(t,n,s,r,e,i){t=void 0===t?0:t;for(var a=n.length,o=s.length,u=0;u<a;u++)t+=n[u].v;for(var h=0;h<o;h++)t-=s[h].v;return t},max:function(t,n,s,r,e,i){for(var a=-1/0,o=r.length,u=0;u<o;u++)a=Math.max(a,r[u].max);return a},min:function(t,n,s,r,e,i){for(var a=1/0,o=r.length,u=0;u<o;u++)a=Math.min(a,r[u].min);return a},avg:function(t,n,s,e,i,a){var o=r.count(0,0,0,n),u=r.count(0,0,0,s),h=r.count(0,0,0,e),f=h-o+u;t=void 0===t?0:t,t*=f;for(var c=0;c<n.length;c++)t+=n[c].v;for(var v=0;v<s.length;v++)t-=s[v].v;return t/=h,isNaN(t)?0:t},stdev:function(t,n,s,e,i,a){a.stdev=a.stdev||{avg:1,sqsum:0,sum:0,stdev:0};for(var o=r.count(0,0,0,n),u=r.count(0,0,0,s),h=(r.count(0,0,0,e),e.length),f=(a.avg,a.stdev.avg,a.stdev.sqsum),c=a.stdev.sum,v=i.avg||0,p=f,l=c,_=0;_<s.length;_++){var m=s[_].v/(s[_].l||1);p-=m*m,l-=m}for(var y=0;y<n.length;y++){var d=n[y].v/(n[y].l||1);p+=d*d,l+=d}var g=Math.sqrt((p-2*v*l+h*v*v)/h);return{avg:v,sqsum:p,sum:l,stdev:g}}};n.exports=r},{}]},{},[1]); |
26
main.js
@@ -277,2 +277,14 @@ const NOps = require("./nops.js"); | ||
get window() { | ||
let type = this._type; | ||
let win = this._arr.map(slot=>{ | ||
let ops = {}; | ||
this._ops.forEach(op=>{ | ||
ops[op] = OPS[type][op].fn(undefined,[slot],[],[slot],ops,{}); | ||
}); | ||
return ops; | ||
}); | ||
return win; | ||
} | ||
toJSON() { | ||
@@ -362,5 +374,17 @@ return this.stats; | ||
get window() { | ||
let type = this._type; | ||
let win = this._arr.map(slot=>{ | ||
let ops = {}; | ||
this._ops.forEach(op=>{ | ||
ops[op] = OPS[type][op].fn(undefined,[slot],[],[slot],ops,{}); | ||
}); | ||
return ops; | ||
}); | ||
return win; | ||
} | ||
toJSON() { | ||
return this.stats; | ||
} | ||
} | ||
} | ||
@@ -367,0 +391,0 @@ |
{ | ||
"name": "swstats", | ||
"version": "0.6.2", | ||
"version": "0.7.0", | ||
"description": "Sliding window statistics", | ||
@@ -5,0 +5,0 @@ "author": "David Gómez Matarrodona <solzimer@gmail.com>", |
@@ -147,2 +147,5 @@ # swstats | ||
### timeWindow.window | ||
Gets the current calculated stats per slot | ||
## Size Window API | ||
@@ -190,8 +193,11 @@ ### new SWindow.SizeStats(size,[options]) | ||
### timeWindow.length | ||
### sizeWindow.length | ||
Gets the current size of the window (number of slots) | ||
### timeWindow.stats | ||
### sizeWindow.stats | ||
Gets the current calculated stats | ||
### timeWindow.window | ||
Gets the current calculated stats per slot | ||
## Custom Statistics API | ||
@@ -198,0 +204,0 @@ ### SWindow.register(type,name,deps,fn,def) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
88172
18
1183
309