@@ -2,7 +2,7 @@ import _ from 'underscore';
2
2
3
3
/**
4
4
* Each key is a method name and the value is an array of calls metadata
5
- * @type {Record<String, Array<CallMeta >> }
5
+ * @type {Record<String, Array<Object >> }
6
6
*/
7
7
let stats = { } ;
8
8
@@ -63,8 +63,8 @@ function sum(list, prop) {
63
63
64
64
/**
65
65
* Returns total, average time and all captured stats mapped under
66
- * summaries.methodName -> StatSummary
67
- * @returns {{averageTime: number, summaries: Record<string, StatSummary >, totalTime: number} }
66
+ * summaries.methodName -> method stats
67
+ * @returns {{averageTime: number, summaries: Record<string, Object >, totalTime: number} }
68
68
*/
69
69
function getMetrics ( ) {
70
70
const summaries = _ . chain ( stats )
@@ -150,25 +150,6 @@ function resetMetrics() {
150
150
stats = { } ;
151
151
}
152
152
153
- /**
154
- * @typedef {Object } CallMeta
155
- * @property {string } methodName
156
- * @property {number } startTime - start time in ms relative to app startup - 0.00 is exactly at start
157
- * @property {number } endTime - end time in ms relative to app startup - 0.00 is exactly at start
158
- * @property {number } [duration] - the it took to resolve this async call
159
- * @property {Array<any> } args - arguments passed to the call
160
- */
161
-
162
- /**
163
- * @typedef {Object } StatSummary
164
- * @property {string } methodName
165
- * @property {number } minTime - the quickest execution for this method
166
- * @property {number } maxTime - the longest execution for this method
167
- * @property {number } averageTime - average execution time for the method
168
- * @property {number } totalTime - sum of the duration for all the calls
169
- * @property {Array<CallMeta> } calls - a collection of all the calls for this method
170
- */
171
-
172
153
export {
173
154
decorateWithMetrics ,
174
155
getMetrics ,
0 commit comments