Skip to content

Commit b71e911

Browse files
committed
docs: Remove typedef documentation for metrics
1 parent cd4c986 commit b71e911

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

lib/decorateWithMetrics.js

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import _ from 'underscore';
22

33
/**
44
* 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>>}
66
*/
77
let stats = {};
88

@@ -63,8 +63,8 @@ function sum(list, prop) {
6363

6464
/**
6565
* 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}}
6868
*/
6969
function getMetrics() {
7070
const summaries = _.chain(stats)
@@ -150,25 +150,6 @@ function resetMetrics() {
150150
stats = {};
151151
}
152152

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-
172153
export {
173154
decorateWithMetrics,
174155
getMetrics,

0 commit comments

Comments
 (0)