@nestia/e2e 0.6.0 → 0.7.0

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.
Files changed (39) hide show
  1. package/lib/DynamicExecutor.d.ts +42 -34
  2. package/lib/DynamicExecutor.js +51 -81
  3. package/lib/DynamicExecutor.js.map +1 -1
  4. package/lib/GaffComparator.js +2 -6
  5. package/lib/GaffComparator.js.map +1 -1
  6. package/lib/RandomGenerator.js +21 -18
  7. package/lib/RandomGenerator.js.map +1 -1
  8. package/lib/TestValidator.d.ts +1 -1
  9. package/lib/TestValidator.js +7 -2
  10. package/lib/TestValidator.js.map +1 -1
  11. package/lib/module.d.ts +0 -2
  12. package/lib/module.js +0 -2
  13. package/lib/module.js.map +1 -1
  14. package/package.json +53 -59
  15. package/src/DynamicExecutor.ts +71 -87
  16. package/src/GaffComparator.ts +5 -10
  17. package/src/RandomGenerator.ts +7 -6
  18. package/src/TestValidator.ts +7 -3
  19. package/src/module.ts +0 -2
  20. package/lib/DynamicBenchmarker.d.ts +0 -176
  21. package/lib/DynamicBenchmarker.js +0 -577
  22. package/lib/DynamicBenchmarker.js.map +0 -1
  23. package/lib/StopWatch.d.ts +0 -24
  24. package/lib/StopWatch.js +0 -89
  25. package/lib/StopWatch.js.map +0 -1
  26. package/lib/structures/IBenchmarkEvent.d.ts +0 -9
  27. package/lib/structures/IBenchmarkEvent.js +0 -3
  28. package/lib/structures/IBenchmarkEvent.js.map +0 -1
  29. package/lib/structures/IBenchmarkMaster.d.ts +0 -6
  30. package/lib/structures/IBenchmarkMaster.js +0 -3
  31. package/lib/structures/IBenchmarkMaster.js.map +0 -1
  32. package/lib/structures/IBenchmarkServant.d.ts +0 -7
  33. package/lib/structures/IBenchmarkServant.js +0 -3
  34. package/lib/structures/IBenchmarkServant.js.map +0 -1
  35. package/src/DynamicBenchmarker.ts +0 -486
  36. package/src/StopWatch.ts +0 -38
  37. package/src/structures/IBenchmarkEvent.ts +0 -10
  38. package/src/structures/IBenchmarkMaster.ts +0 -5
  39. package/src/structures/IBenchmarkServant.ts +0 -8
package/package.json CHANGED
@@ -1,59 +1,53 @@
1
- {
2
- "name": "@nestia/e2e",
3
- "version": "0.6.0",
4
- "description": "E2E test utilify functions",
5
- "main": "lib/index.js",
6
- "scripts": {
7
- "build": "rimraf lib && tsc",
8
- "dev": "npm run build -- --watch",
9
- "eslint": "eslint src",
10
- "prepare": "ts-patch install && typia patch",
11
- "test": "node lib/test"
12
- },
13
- "repository": {
14
- "type": "git",
15
- "url": "https://github.com/samchon/nestia"
16
- },
17
- "keywords": [
18
- "e2e",
19
- "nestia",
20
- "nestjs",
21
- "test",
22
- "tdd",
23
- "utility"
24
- ],
25
- "author": "Jeongho Nam",
26
- "license": "MIT",
27
- "bugs": {
28
- "url": "https://github.com/samchon/nestia/issues"
29
- },
30
- "homepage": "https://nestia.io",
31
- "devDependencies": {
32
- "@trivago/prettier-plugin-sort-imports": "^4.0.0",
33
- "@types/cli": "^0.11.21",
34
- "@types/node": "^18.11.18",
35
- "@typescript-eslint/eslint-plugin": "^5.57.0",
36
- "@typescript-eslint/parser": "^5.57.0",
37
- "rimraf": "^4.1.2",
38
- "ts-node": "^10.9.1",
39
- "ts-patch": "^3.1.0",
40
- "typescript": "^5.4.2",
41
- "typia": "^6.1.1"
42
- },
43
- "dependencies": {
44
- "@nestia/fetcher": "^3.2.2",
45
- "chalk": "^4.1.2",
46
- "cli": "^1.0.1",
47
- "tgrid": "^1.0.1",
48
- "tstl": "^3.0.0"
49
- },
50
- "files": [
51
- "lib",
52
- "src",
53
- "!lib/test",
54
- "!src/test",
55
- "README.md",
56
- "LICENSE",
57
- "package.json"
58
- ]
59
- }
1
+ {
2
+ "name": "@nestia/e2e",
3
+ "version": "0.7.0",
4
+ "description": "E2E test utilify functions",
5
+ "main": "lib/index.js",
6
+ "typings": "lib/index.d.ts",
7
+ "scripts": {
8
+ "build": "npm run build:main && npm run build:test",
9
+ "build:main": "rimraf lib && tsc",
10
+ "build:test": "rimraf bin && tsc -p test/tsconfig.json",
11
+ "dev": "npm run build:test -- --watch",
12
+ "eslint": "eslint src && eslint test",
13
+ "prepare": "ts-patch install && typia patch",
14
+ "test": "node bin/test"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/samchon/nestia"
19
+ },
20
+ "keywords": [
21
+ "e2e",
22
+ "nestia",
23
+ "nestjs",
24
+ "test",
25
+ "tdd",
26
+ "utility"
27
+ ],
28
+ "author": "Jeongho Nam",
29
+ "license": "MIT",
30
+ "bugs": {
31
+ "url": "https://github.com/samchon/nestia/issues"
32
+ },
33
+ "homepage": "https://nestia.io",
34
+ "devDependencies": {
35
+ "@trivago/prettier-plugin-sort-imports": "^4.0.0",
36
+ "@types/node": "^18.11.18",
37
+ "@typescript-eslint/eslint-plugin": "^5.57.0",
38
+ "@typescript-eslint/parser": "^5.57.0",
39
+ "rimraf": "^4.1.2",
40
+ "ts-node": "^10.9.1",
41
+ "ts-patch": "^3.2.1",
42
+ "typescript": "^5.5.3",
43
+ "typescript-transform-paths": "^3.4.7",
44
+ "typia": "^6.4.3"
45
+ },
46
+ "files": [
47
+ "lib",
48
+ "src",
49
+ "README.md",
50
+ "LICENSE",
51
+ "package.json"
52
+ ]
53
+ }
@@ -1,9 +1,6 @@
1
- import chalk from "chalk";
2
1
  import fs from "fs";
3
2
  import NodePath from "path";
4
3
 
5
- import { StopWatch } from "./StopWatch";
6
-
7
4
  /**
8
5
  * Dynamic Executor running prefixed functions.
9
6
  *
@@ -36,7 +33,7 @@ export namespace DynamicExecutor {
36
33
  /**
37
34
  * Options for dynamic executor.
38
35
  */
39
- export interface IOptions<Parameters extends any[], Ret = any> {
36
+ export interface IProps<Parameters extends any[], Ret = any> {
40
37
  /**
41
38
  * Prefix of function name.
42
39
  *
@@ -46,6 +43,11 @@ export namespace DynamicExecutor {
46
43
  */
47
44
  prefix: string;
48
45
 
46
+ /**
47
+ * Location of the test functions.
48
+ */
49
+ location: string;
50
+
49
51
  /**
50
52
  * Get parameters of a function.
51
53
  *
@@ -54,6 +56,15 @@ export namespace DynamicExecutor {
54
56
  */
55
57
  parameters: (name: string) => Parameters;
56
58
 
59
+ /**
60
+ * On complete function.
61
+ *
62
+ * Listener of completion of a test function.
63
+ *
64
+ * @param exec Execution result of a test function
65
+ */
66
+ onComplete?: (exec: IExecution) => void;
67
+
57
68
  /**
58
69
  * Filter function whether to run or not.
59
70
  *
@@ -80,13 +91,6 @@ export namespace DynamicExecutor {
80
91
  paramters: Parameters,
81
92
  ) => Promise<any>;
82
93
 
83
- /**
84
- * Whether to show elapsed time on `console` or not.
85
- *
86
- * @default true
87
- */
88
- showElapsedTime?: boolean;
89
-
90
94
  /**
91
95
  * Extension of dynamic functions.
92
96
  *
@@ -107,38 +111,42 @@ export namespace DynamicExecutor {
107
111
  /**
108
112
  * Execution results of dynamic functions.
109
113
  */
110
- executions: IReport.IExecution[];
114
+ executions: IExecution[];
111
115
 
112
116
  /**
113
117
  * Total elapsed time.
114
118
  */
115
119
  time: number;
116
120
  }
117
- export namespace IReport {
121
+
122
+ /**
123
+ * Execution of a test function.
124
+ */
125
+ export interface IExecution {
118
126
  /**
119
- * Execution result of a dynamic function.
127
+ * Name of function.
120
128
  */
121
- export interface IExecution {
122
- /**
123
- * Name of function.
124
- */
125
- name: string;
129
+ name: string;
126
130
 
127
- /**
128
- * Location path of the function.
129
- */
130
- location: string;
131
+ /**
132
+ * Location path of the function.
133
+ */
134
+ location: string;
131
135
 
132
- /**
133
- * Error when occured.
134
- */
135
- error: Error | null;
136
+ /**
137
+ * Error when occured.
138
+ */
139
+ error: Error | null;
136
140
 
137
- /**
138
- * Elapsed time.
139
- */
140
- time: number;
141
- }
141
+ /**
142
+ * Elapsed time.
143
+ */
144
+ started_at: string;
145
+
146
+ /**
147
+ * Completion time.
148
+ */
149
+ completed_at: string;
142
150
  }
143
151
 
144
152
  /**
@@ -148,18 +156,12 @@ export namespace DynamicExecutor {
148
156
  * Otherwise, {@link validate} mode does not terminate when error occurs, but
149
157
  * just archive the error log.
150
158
  *
151
- * @param options Options of dynamic executor
152
- * @returns Runner of dynamic functions with specific location
159
+ * @param props Properties of dynamic execution
160
+ * @returns Report of dynamic test functions execution
153
161
  */
154
- export const assert =
155
- <Arguments extends any[]>(options: IOptions<Arguments>) =>
156
- /**
157
- * Run dynamic executor.
158
- *
159
- * @param path Location of prefixed functions
160
- */
161
- (path: string): Promise<IReport> =>
162
- main(options)(true)(path);
162
+ export const assert = <Arguments extends any[]>(
163
+ props: IProps<Arguments>,
164
+ ): Promise<IReport> => main(true)(props);
163
165
 
164
166
  /**
165
167
  * Prepare dynamic executor in loose mode.
@@ -168,33 +170,27 @@ export namespace DynamicExecutor {
168
170
  * Instead, the error would be archived and returns as a list. Otherwise,
169
171
  * {@link assert} mode terminates the program directly when error occurs.
170
172
  *
171
- * @param options Options of dynamic executor
172
- * @returns Runner of dynamic functions with specific location
173
+ * @param props Properties of dynamic executor
174
+ * @returns Report of dynamic test functions execution
173
175
  */
174
- export const validate =
175
- <Arguments extends any[]>(options: IOptions<Arguments>) =>
176
- /**
177
- * Run dynamic executor.
178
- *
179
- * @param path Location of prefix functions
180
- * @returns List of errors
181
- */
182
- (path: string): Promise<IReport> =>
183
- main(options)(false)(path);
176
+ export const validate = <Arguments extends any[]>(
177
+ props: IProps<Arguments>,
178
+ ): Promise<IReport> => main(false)(props);
184
179
 
185
180
  const main =
186
- <Arguments extends any[]>(options: IOptions<Arguments>) =>
187
181
  (assert: boolean) =>
188
- async (path: string) => {
182
+ async <Arguments extends any[]>(
183
+ props: IProps<Arguments>,
184
+ ): Promise<IReport> => {
189
185
  const report: IReport = {
190
- location: path,
186
+ location: props.location,
191
187
  time: Date.now(),
192
188
  executions: [],
193
189
  };
194
190
 
195
- const executor = execute(options)(report)(assert);
196
- const iterator = iterate(options.extension ?? "js")(executor);
197
- await iterator(path);
191
+ const executor = execute(props)(report)(assert);
192
+ const iterator = iterate(props.extension ?? "js")(executor);
193
+ await iterator(props.location);
198
194
 
199
195
  report.time = Date.now() - report.time;
200
196
  return report;
@@ -224,54 +220,42 @@ export namespace DynamicExecutor {
224
220
  };
225
221
 
226
222
  const execute =
227
- <Arguments extends any[]>(options: IOptions<Arguments>) =>
223
+ <Arguments extends any[]>(props: IProps<Arguments>) =>
228
224
  (report: IReport) =>
229
225
  (assert: boolean) =>
230
226
  async (location: string, modulo: Module<Arguments>): Promise<void> => {
231
227
  for (const [key, closure] of Object.entries(modulo)) {
232
228
  if (
233
- key.substring(0, options.prefix.length) !== options.prefix ||
229
+ key.substring(0, props.prefix.length) !== props.prefix ||
234
230
  typeof closure !== "function" ||
235
- (options.filter && options.filter(key) === false)
231
+ (props.filter && props.filter(key) === false)
236
232
  )
237
233
  continue;
238
234
 
239
235
  const func = async () => {
240
- if (options.wrapper !== undefined)
241
- await options.wrapper(key, closure, options.parameters(key));
242
- else await closure(...options.parameters(key));
236
+ if (props.wrapper !== undefined)
237
+ await props.wrapper(key, closure, props.parameters(key));
238
+ else await closure(...props.parameters(key));
243
239
  };
244
- const label: string = chalk.greenBright(key);
245
240
 
246
- const result: IReport.IExecution = {
241
+ const result: IExecution = {
247
242
  name: key,
248
243
  location,
249
244
  error: null,
250
- time: Date.now(),
245
+ started_at: new Date().toISOString(),
246
+ completed_at: new Date().toISOString(),
251
247
  };
252
248
  report.executions.push(result);
253
249
 
254
250
  try {
255
- if (options.showElapsedTime === false) {
256
- await func();
257
- result.time = Date.now() - result.time;
258
- console.log(` - ${label}`);
259
- } else {
260
- result.time = (await StopWatch.measure(func))[1];
261
- console.log(
262
- ` - ${label}: ${chalk.yellowBright(
263
- result.time.toLocaleString(),
264
- )} ms`,
265
- );
266
- }
251
+ await func();
252
+ result.completed_at = new Date().toISOString();
267
253
  } catch (exp) {
268
- result.time = Date.now() - result.time;
269
254
  result.error = exp as Error;
270
-
271
- console.log(
272
- ` - ${label} -> ${chalk.redBright((exp as Error)?.name)}`,
273
- );
274
255
  if (assert === true) throw exp;
256
+ } finally {
257
+ result.completed_at = new Date().toISOString();
258
+ if (props.onComplete) props.onComplete(result);
275
259
  }
276
260
  }
277
261
  };
@@ -17,7 +17,7 @@ export namespace GaffComparator {
17
17
  */
18
18
  export const strings =
19
19
  <T>(getter: (input: T) => string | string[]) =>
20
- (x: T, y: T) => {
20
+ (x: T, y: T): number => {
21
21
  const a: string[] = wrap(getter(x));
22
22
  const b: string[] = wrap(getter(y));
23
23
 
@@ -33,7 +33,7 @@ export namespace GaffComparator {
33
33
  */
34
34
  export const dates =
35
35
  <T>(getter: (input: T) => string | string[]) =>
36
- (x: T, y: T) => {
36
+ (x: T, y: T): number => {
37
37
  const take = (v: T) =>
38
38
  wrap(getter(v)).map((str) => new Date(str).getTime());
39
39
  const a: number[] = take(x);
@@ -51,7 +51,7 @@ export namespace GaffComparator {
51
51
  */
52
52
  export const numbers =
53
53
  <T>(closure: (input: T) => number | number[]) =>
54
- (x: T, y: T) => {
54
+ (x: T, y: T): number => {
55
55
  const a: number[] = wrap(closure(x));
56
56
  const b: number[] = wrap(closure(y));
57
57
 
@@ -59,11 +59,6 @@ export namespace GaffComparator {
59
59
  return idx !== -1 ? a[idx] - b[idx] : 0;
60
60
  };
61
61
 
62
- function compare(x: string, y: string) {
63
- return x.localeCompare(y);
64
- }
65
-
66
- function wrap<T>(elem: T | T[]): T[] {
67
- return Array.isArray(elem) ? elem : [elem];
68
- }
62
+ const compare = (x: string, y: string) => x.localeCompare(y);
63
+ const wrap = <T>(elem: T | T[]): T[] => (Array.isArray(elem) ? elem : [elem]);
69
64
  }
@@ -1,6 +1,3 @@
1
- import { back_inserter, randint } from "tstl";
2
- import { ranges } from "tstl";
3
-
4
1
  /**
5
2
  * Random data generator.
6
3
  *
@@ -146,9 +143,10 @@ export namespace RandomGenerator {
146
143
  export const sample =
147
144
  <T>(array: T[]) =>
148
145
  (count: number): T[] => {
149
- const ret: T[] = [];
150
- ranges.sample(array, back_inserter(ret), count);
151
- return ret;
146
+ count = Math.min(count, array.length);
147
+ const indexes: Set<number> = new Set();
148
+ while (indexes.size < count) indexes.add(randint(0, array.length - 1));
149
+ return Array.from(indexes).map((index) => array[index]);
152
150
  };
153
151
 
154
152
  /**
@@ -159,3 +157,6 @@ export namespace RandomGenerator {
159
157
  */
160
158
  export const pick = <T>(array: T[]): T => array[randint(0, array.length - 1)];
161
159
  }
160
+
161
+ const randint = (min: number, max: number): number =>
162
+ Math.floor(Math.random() * (max - min + 1)) + min;
@@ -1,5 +1,3 @@
1
- import { ranges } from "tstl";
2
-
3
1
  import { RandomGenerator } from "./RandomGenerator";
4
2
  import { json_equal_to } from "./internal/json_equal_to";
5
3
 
@@ -304,7 +302,7 @@ export namespace TestValidator {
304
302
 
305
303
  const reversed: typeof comp =
306
304
  direction === "+" ? comp : (x, y) => comp(y, x);
307
- if (ranges.is_sorted(data, (x, y) => reversed(x, y) < 0) === false) {
305
+ if (is_sorted(data, reversed) === false) {
308
306
  if (
309
307
  fields.length === 1 &&
310
308
  data.length &&
@@ -341,3 +339,9 @@ function is_promise(input: any): input is Promise<any> {
341
339
  typeof (input as any).catch === "function"
342
340
  );
343
341
  }
342
+
343
+ function is_sorted<T>(data: T[], comp: (x: T, y: T) => number): boolean {
344
+ for (let i: number = 1; i < data.length; ++i)
345
+ if (comp(data[i - 1], data[i]) > 0) return false;
346
+ return true;
347
+ }
package/src/module.ts CHANGED
@@ -1,7 +1,5 @@
1
1
  export * from "./ArrayUtil";
2
- export * from "./DynamicBenchmarker";
3
2
  export * from "./DynamicExecutor";
4
3
  export * from "./GaffComparator";
5
4
  export * from "./RandomGenerator";
6
- export * from "./StopWatch";
7
5
  export * from "./TestValidator";
@@ -1,176 +0,0 @@
1
- import { IConnection } from "@nestia/fetcher";
2
- import { WorkerServer } from "tgrid";
3
- import { IBenchmarkMaster } from "./structures/IBenchmarkMaster";
4
- import { IBenchmarkServant } from "./structures/IBenchmarkServant";
5
- /**
6
- * Dynamic benchmark executor running prefixed functions.
7
- *
8
- * `DynamicBenchmarker` is composed with two programs,
9
- * {@link DynamicBenchmarker.master} and
10
- * {@link DynamicBenchmarker.servant servants}. The master program creates
11
- * multiple servant programs, and the servant programs execute the prefixed
12
- * functions in parallel. When the pre-congirued count of requests are all
13
- * completed, the master program collects the results and returns them.
14
- *
15
- * Therefore, when you want to benchmark the performance of a backend server,
16
- * you have to make two programs; one for calling the
17
- * {@link DynamicBenchmarker.master} function, and the other for calling the
18
- * {@link DynamicBenchmarker.servant} function. Also, never forget to write
19
- * the path of the servant program to the
20
- * {@link DynamicBenchmarker.IMasterProps.servant} property.
21
- *
22
- * Also, you when you complete the benchmark execution through the
23
- * {@link DynamicBenchmarker.master} and {@link DynamicBenchmarker.servant}
24
- * functions, you can convert the result to markdown content by using the
25
- * {@link DynamicBenchmarker.markdown} function.
26
- *
27
- * Additionally, if you hope to see some utilization cases,
28
- * see the below example tagged links.
29
- *
30
- * @example https://github.com/samchon/nestia-start/blob/master/test/benchmaark/index.ts
31
- * @example https://github.com/samchon/backend/blob/master/test/benchmark/index.ts
32
- * @author Jeongho Nam - https://github.com/samchon
33
- */
34
- export declare namespace DynamicBenchmarker {
35
- /**
36
- * Properties of the master program.
37
- */
38
- interface IMasterProps {
39
- /**
40
- * Total count of the requests.
41
- */
42
- count: number;
43
- /**
44
- * Number of threads.
45
- *
46
- * The number of threads to be executed as parallel servant.
47
- */
48
- threads: number;
49
- /**
50
- * Number of simultaneous requests.
51
- *
52
- * The number of requests to be executed simultaneously.
53
- *
54
- * This property value would be divided by the {@link threads} in the servants.
55
- */
56
- simultaneous: number;
57
- /**
58
- * Path of the servant program.
59
- *
60
- * The path of the servant program executing the
61
- * {@link DynamicBenchmarker.servant} function.
62
- */
63
- servant: string;
64
- /**
65
- * Filter function.
66
- *
67
- * The filter function to determine whether to execute the function in
68
- * the servant or not.
69
- *
70
- * @param name Function name
71
- * @returns Whether to execute the function or not.
72
- */
73
- filter?: (name: string) => boolean;
74
- /**
75
- * Progress callback function.
76
- *
77
- * @param complete The number of completed requests.
78
- */
79
- progress?: (complete: number) => void;
80
- /**
81
- * Standard I/O option.
82
- *
83
- * The standard I/O option for the servant programs.
84
- */
85
- stdio?: undefined | "overlapped" | "pipe" | "ignore" | "inherit";
86
- }
87
- /**
88
- * Properties of the servant progrma.
89
- */
90
- interface IServantProps<Parameters extends any[]> {
91
- /**
92
- * Default connection.
93
- *
94
- * Default connection to be used in the servant.
95
- */
96
- connection: IConnection;
97
- /**
98
- * Location of the benchmark functions.
99
- */
100
- location: string;
101
- /**
102
- * Prefix of the benchmark functions.
103
- *
104
- * Every prefixed function will be executed in the servant.
105
- *
106
- * In other words, if a function name doesn't start with the prefix,
107
- * then it would never be executed.
108
- */
109
- prefix: string;
110
- /**
111
- * Get parameters of a function.
112
- *
113
- * When composing the parameters, never forget to copy the
114
- * {@link IConnection.logger} property of default connection to the
115
- * returning parameters.
116
- *
117
- * @param connection Default connection instance
118
- * @param name Function name
119
- */
120
- parameters: (connection: IConnection, name: string) => Parameters;
121
- }
122
- /**
123
- * Benchmark report.
124
- */
125
- interface IReport {
126
- count: number;
127
- threads: number;
128
- simultaneous: number;
129
- started_at: string;
130
- completed_at: string;
131
- statistics: IReport.IStatistics;
132
- endpoints: Array<IReport.IEndpoint & IReport.IStatistics>;
133
- }
134
- namespace IReport {
135
- interface IEndpoint {
136
- method: string;
137
- path: string;
138
- }
139
- interface IStatistics {
140
- count: number;
141
- success: number;
142
- mean: number | null;
143
- stdev: number | null;
144
- minimum: number | null;
145
- maximum: number | null;
146
- }
147
- }
148
- /**
149
- * Master program.
150
- *
151
- * Creates a master program that executing the servant programs in parallel.
152
- *
153
- * Note that, {@link IMasterProps.servant} property must be the path of
154
- * the servant program executing the {@link servant} function.
155
- *
156
- * @param props Properties of the master program
157
- * @returns Benchmark report
158
- */
159
- const master: (props: IMasterProps) => Promise<IReport>;
160
- /**
161
- * Create a servant program.
162
- *
163
- * Creates a servant program executing the prefixed functions in parallel.
164
- *
165
- * @param props Properties of the servant program
166
- * @returns Servant program as a worker server
167
- */
168
- const servant: <Parameters extends any[]>(props: IServantProps<Parameters>) => Promise<WorkerServer<null, IBenchmarkServant, IBenchmarkMaster>>;
169
- /**
170
- * Convert the benchmark report to markdown content.
171
- *
172
- * @param report Benchmark report
173
- * @returns Markdown content
174
- */
175
- const markdown: (report: DynamicBenchmarker.IReport) => string;
176
- }