@itwin/perf-tools 3.1.0-dev.8 → 3.2.0-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/Reporter.d.ts +2 -1
- package/lib/cjs/Reporter.js +3 -3
- package/package.json +3 -3
package/lib/cjs/Reporter.d.ts
CHANGED
|
@@ -8,8 +8,9 @@ export declare class Reporter {
|
|
|
8
8
|
* @param valueDescription The description of the value being recorded
|
|
9
9
|
* @param value The actual value of the test
|
|
10
10
|
* @param info A JSON object for additional details
|
|
11
|
+
* @param date Optional: The date time to associate with the given entry. If not defined, `new Date().toISOString()` is used to provide the current date.
|
|
11
12
|
*/
|
|
12
|
-
addEntry(testSuite: string, testName: string, valueDescription: string, value: number, info?: any): void;
|
|
13
|
+
addEntry(testSuite: string, testName: string, valueDescription: string, value: number, info?: any, date?: string): void;
|
|
13
14
|
/**
|
|
14
15
|
* Clear entries to get a fresh start
|
|
15
16
|
*/
|
package/lib/cjs/Reporter.js
CHANGED
|
@@ -18,10 +18,10 @@ class Reporter {
|
|
|
18
18
|
* @param valueDescription The description of the value being recorded
|
|
19
19
|
* @param value The actual value of the test
|
|
20
20
|
* @param info A JSON object for additional details
|
|
21
|
+
* @param date Optional: The date time to associate with the given entry. If not defined, `new Date().toISOString()` is used to provide the current date.
|
|
21
22
|
*/
|
|
22
|
-
addEntry(testSuite, testName, valueDescription, value, info) {
|
|
23
|
-
const
|
|
24
|
-
const entry = { testSuite, testName, valueDescription, value, date, info };
|
|
23
|
+
addEntry(testSuite, testName, valueDescription, value, info, date) {
|
|
24
|
+
const entry = { testSuite, testName, valueDescription, value, date: date !== null && date !== void 0 ? date : new Date().toISOString(), info };
|
|
25
25
|
this._entries.push(entry);
|
|
26
26
|
}
|
|
27
27
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/perf-tools",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0-dev.3",
|
|
4
4
|
"description": "Tools for collecting and reporting performance data",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"typings": "lib/cjs/index",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"fs-extra": "^8.1.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@itwin/build-tools": "3.
|
|
27
|
-
"@itwin/eslint-plugin": "3.
|
|
26
|
+
"@itwin/build-tools": "3.2.0-dev.3",
|
|
27
|
+
"@itwin/eslint-plugin": "3.2.0-dev.3",
|
|
28
28
|
"@types/fs-extra": "^4.0.7",
|
|
29
29
|
"eslint": "^7.11.0",
|
|
30
30
|
"rimraf": "^3.0.2",
|