@nestia/benchmark 10.0.2 → 11.0.0-dev.20260305
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/LICENSE +21 -21
- package/README.md +93 -93
- package/package.json +22 -26
- package/src/DynamicBenchmarker.ts +436 -436
- package/src/IBenchmarkEvent.ts +10 -10
- package/src/index.ts +2 -2
- package/src/internal/DynamicBenchmarkReporter.ts +104 -104
- package/src/internal/IBenchmarkMaster.ts +4 -4
- package/src/internal/IBenchmarkServant.ts +8 -8
- package/lib/DynamicBenchmarker.d.ts +0 -185
- package/lib/DynamicBenchmarker.js +0 -547
- package/lib/DynamicBenchmarker.js.map +0 -1
- package/lib/IBenchmarkEvent.d.ts +0 -9
- package/lib/IBenchmarkEvent.js +0 -3
- package/lib/IBenchmarkEvent.js.map +0 -1
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -19
- package/lib/index.js.map +0 -1
- package/lib/internal/DynamicBenchmarkReporter.d.ts +0 -4
- package/lib/internal/DynamicBenchmarkReporter.js +0 -133
- package/lib/internal/DynamicBenchmarkReporter.js.map +0 -1
- package/lib/internal/IBenchmarkMaster.d.ts +0 -4
- package/lib/internal/IBenchmarkMaster.js +0 -3
- package/lib/internal/IBenchmarkMaster.js.map +0 -1
- package/lib/internal/IBenchmarkServant.d.ts +0 -7
- package/lib/internal/IBenchmarkServant.js +0 -3
- package/lib/internal/IBenchmarkServant.js.map +0 -1
package/src/IBenchmarkEvent.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IFetchRoute } from "@nestia/fetcher";
|
|
2
|
-
|
|
3
|
-
export interface IBenchmarkEvent {
|
|
4
|
-
metadata: IFetchRoute<any>;
|
|
5
|
-
status: number | null;
|
|
6
|
-
started_at: string;
|
|
7
|
-
respond_at: string | null;
|
|
8
|
-
completed_at: string;
|
|
9
|
-
success: boolean;
|
|
10
|
-
}
|
|
1
|
+
import { IFetchRoute } from "@nestia/fetcher";
|
|
2
|
+
|
|
3
|
+
export interface IBenchmarkEvent {
|
|
4
|
+
metadata: IFetchRoute<any>;
|
|
5
|
+
status: number | null;
|
|
6
|
+
started_at: string;
|
|
7
|
+
respond_at: string | null;
|
|
8
|
+
completed_at: string;
|
|
9
|
+
success: boolean;
|
|
10
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./DynamicBenchmarker";
|
|
2
|
-
export * from "./IBenchmarkEvent";
|
|
1
|
+
export * from "./DynamicBenchmarker";
|
|
2
|
+
export * from "./IBenchmarkEvent";
|
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
import os from "os";
|
|
2
|
-
|
|
3
|
-
import { DynamicBenchmarker } from "../DynamicBenchmarker";
|
|
4
|
-
|
|
5
|
-
export namespace DynamicBenchmarkReporter {
|
|
6
|
-
export const markdown = (report: DynamicBenchmarker.IReport): string => {
|
|
7
|
-
const format = (value: number | null) =>
|
|
8
|
-
value === null ? "N/A" : (Math.floor(value * 100) / 100).toLocaleString();
|
|
9
|
-
const head = () =>
|
|
10
|
-
[
|
|
11
|
-
"Type",
|
|
12
|
-
"Count",
|
|
13
|
-
"Success",
|
|
14
|
-
"Mean.",
|
|
15
|
-
"Stdev.",
|
|
16
|
-
"Minimum",
|
|
17
|
-
"Maximum",
|
|
18
|
-
].join(" | ") +
|
|
19
|
-
"\n" +
|
|
20
|
-
new Array(7).fill("----").join("|");
|
|
21
|
-
const row = (title: string, s: DynamicBenchmarker.IReport.IStatistics) =>
|
|
22
|
-
[
|
|
23
|
-
title,
|
|
24
|
-
s.count.toLocaleString(),
|
|
25
|
-
s.success.toLocaleString(),
|
|
26
|
-
format(s.mean),
|
|
27
|
-
format(s.stdev),
|
|
28
|
-
format(s.minimum),
|
|
29
|
-
format(s.maximum),
|
|
30
|
-
].join(" | ");
|
|
31
|
-
const line = (
|
|
32
|
-
title: string,
|
|
33
|
-
getter: (m: NodeJS.MemoryUsage) => number,
|
|
34
|
-
): string =>
|
|
35
|
-
`line "${title}" [${report.memories.map((m) => Math.floor(getter(m.usage) / 1024 ** 2)).join(", ")}]`;
|
|
36
|
-
|
|
37
|
-
return [
|
|
38
|
-
`# Benchmark Report`,
|
|
39
|
-
"> Generated by [`@nestia/benchmark`](https://github.com/samchon/nestia)",
|
|
40
|
-
``,
|
|
41
|
-
` - Specifications`,
|
|
42
|
-
` - CPU: ${os.cpus()[0]
|
|
43
|
-
` - RAM: ${Math.floor(os.totalmem() / 1024 / 1024 / 1024).toLocaleString()} GB`,
|
|
44
|
-
` - NodeJS Version: ${process.version}`,
|
|
45
|
-
` - Backend Server: 1 core / 1 thread`,
|
|
46
|
-
` - Arguments`,
|
|
47
|
-
` - Count: ${report.count.toLocaleString()}`,
|
|
48
|
-
` - Threads: ${report.threads.toLocaleString()}`,
|
|
49
|
-
` - Simultaneous: ${report.simultaneous.toLocaleString()}`,
|
|
50
|
-
` - Time`,
|
|
51
|
-
` - Start: ${report.started_at}`,
|
|
52
|
-
` - Complete: ${report.completed_at}`,
|
|
53
|
-
` - Elapsed: ${(new Date(report.completed_at).getTime() - new Date(report.started_at).getTime()).toLocaleString()} ms`,
|
|
54
|
-
``,
|
|
55
|
-
head(),
|
|
56
|
-
row("Total", report.statistics),
|
|
57
|
-
"",
|
|
58
|
-
"> Unit: milliseconds",
|
|
59
|
-
"",
|
|
60
|
-
"## Memory Consumptions",
|
|
61
|
-
"```mermaid",
|
|
62
|
-
"xychart-beta",
|
|
63
|
-
` x-axis "Time (second)"`,
|
|
64
|
-
` y-axis "Memory (MB)"`,
|
|
65
|
-
` ${line("Resident Set Size", (m) => m.rss)}`,
|
|
66
|
-
` ${line("Heap Total", (m) => m.heapTotal)}`,
|
|
67
|
-
` ${line("Heap Used + External", (m) => m.heapUsed + m.external)}`,
|
|
68
|
-
` ${line("Heap Used Only", (m) => m.heapUsed)}`,
|
|
69
|
-
"```",
|
|
70
|
-
"",
|
|
71
|
-
`> - 🟦 Resident Set Size`,
|
|
72
|
-
`> - 🟢 Heap Total`,
|
|
73
|
-
`> - 🔴 Heap Used + External`,
|
|
74
|
-
`> - 🟡 Heap Used Only`,
|
|
75
|
-
"",
|
|
76
|
-
"## Endpoints",
|
|
77
|
-
head(),
|
|
78
|
-
...report.endpoints
|
|
79
|
-
.slice()
|
|
80
|
-
.sort((a, b) => (b.mean ?? 0) - (a.mean ?? 0))
|
|
81
|
-
.map((endpoint) =>
|
|
82
|
-
row(`${endpoint.method} ${endpoint.path}`, endpoint),
|
|
83
|
-
),
|
|
84
|
-
"",
|
|
85
|
-
"> Unit: milliseconds",
|
|
86
|
-
"",
|
|
87
|
-
"## Failures",
|
|
88
|
-
"Method | Path | Count | Failures",
|
|
89
|
-
"-------|------|-------|----------",
|
|
90
|
-
...report.endpoints
|
|
91
|
-
.filter((e) => e.success !== e.count)
|
|
92
|
-
.slice()
|
|
93
|
-
.sort((a, b) => b.count - a.count)
|
|
94
|
-
.map((e) =>
|
|
95
|
-
[
|
|
96
|
-
e.method,
|
|
97
|
-
e.path,
|
|
98
|
-
e.count.toLocaleString(),
|
|
99
|
-
(e.count - e.success).toLocaleString(),
|
|
100
|
-
].join(" | "),
|
|
101
|
-
),
|
|
102
|
-
].join("\n");
|
|
103
|
-
};
|
|
104
|
-
}
|
|
1
|
+
import os from "os";
|
|
2
|
+
|
|
3
|
+
import { DynamicBenchmarker } from "../DynamicBenchmarker";
|
|
4
|
+
|
|
5
|
+
export namespace DynamicBenchmarkReporter {
|
|
6
|
+
export const markdown = (report: DynamicBenchmarker.IReport): string => {
|
|
7
|
+
const format = (value: number | null) =>
|
|
8
|
+
value === null ? "N/A" : (Math.floor(value * 100) / 100).toLocaleString();
|
|
9
|
+
const head = () =>
|
|
10
|
+
[
|
|
11
|
+
"Type",
|
|
12
|
+
"Count",
|
|
13
|
+
"Success",
|
|
14
|
+
"Mean.",
|
|
15
|
+
"Stdev.",
|
|
16
|
+
"Minimum",
|
|
17
|
+
"Maximum",
|
|
18
|
+
].join(" | ") +
|
|
19
|
+
"\n" +
|
|
20
|
+
new Array(7).fill("----").join("|");
|
|
21
|
+
const row = (title: string, s: DynamicBenchmarker.IReport.IStatistics) =>
|
|
22
|
+
[
|
|
23
|
+
title,
|
|
24
|
+
s.count.toLocaleString(),
|
|
25
|
+
s.success.toLocaleString(),
|
|
26
|
+
format(s.mean),
|
|
27
|
+
format(s.stdev),
|
|
28
|
+
format(s.minimum),
|
|
29
|
+
format(s.maximum),
|
|
30
|
+
].join(" | ");
|
|
31
|
+
const line = (
|
|
32
|
+
title: string,
|
|
33
|
+
getter: (m: NodeJS.MemoryUsage) => number,
|
|
34
|
+
): string =>
|
|
35
|
+
`line "${title}" [${report.memories.map((m) => Math.floor(getter(m.usage) / 1024 ** 2)).join(", ")}]`;
|
|
36
|
+
|
|
37
|
+
return [
|
|
38
|
+
`# Benchmark Report`,
|
|
39
|
+
"> Generated by [`@nestia/benchmark`](https://github.com/samchon/nestia)",
|
|
40
|
+
``,
|
|
41
|
+
` - Specifications`,
|
|
42
|
+
` - CPU: ${os.cpus()[0]!.model}`,
|
|
43
|
+
` - RAM: ${Math.floor(os.totalmem() / 1024 / 1024 / 1024).toLocaleString()} GB`,
|
|
44
|
+
` - NodeJS Version: ${process.version}`,
|
|
45
|
+
` - Backend Server: 1 core / 1 thread`,
|
|
46
|
+
` - Arguments`,
|
|
47
|
+
` - Count: ${report.count.toLocaleString()}`,
|
|
48
|
+
` - Threads: ${report.threads.toLocaleString()}`,
|
|
49
|
+
` - Simultaneous: ${report.simultaneous.toLocaleString()}`,
|
|
50
|
+
` - Time`,
|
|
51
|
+
` - Start: ${report.started_at}`,
|
|
52
|
+
` - Complete: ${report.completed_at}`,
|
|
53
|
+
` - Elapsed: ${(new Date(report.completed_at).getTime() - new Date(report.started_at).getTime()).toLocaleString()} ms`,
|
|
54
|
+
``,
|
|
55
|
+
head(),
|
|
56
|
+
row("Total", report.statistics),
|
|
57
|
+
"",
|
|
58
|
+
"> Unit: milliseconds",
|
|
59
|
+
"",
|
|
60
|
+
"## Memory Consumptions",
|
|
61
|
+
"```mermaid",
|
|
62
|
+
"xychart-beta",
|
|
63
|
+
` x-axis "Time (second)"`,
|
|
64
|
+
` y-axis "Memory (MB)"`,
|
|
65
|
+
` ${line("Resident Set Size", (m) => m.rss)}`,
|
|
66
|
+
` ${line("Heap Total", (m) => m.heapTotal)}`,
|
|
67
|
+
` ${line("Heap Used + External", (m) => m.heapUsed + m.external)}`,
|
|
68
|
+
` ${line("Heap Used Only", (m) => m.heapUsed)}`,
|
|
69
|
+
"```",
|
|
70
|
+
"",
|
|
71
|
+
`> - 🟦 Resident Set Size`,
|
|
72
|
+
`> - 🟢 Heap Total`,
|
|
73
|
+
`> - 🔴 Heap Used + External`,
|
|
74
|
+
`> - 🟡 Heap Used Only`,
|
|
75
|
+
"",
|
|
76
|
+
"## Endpoints",
|
|
77
|
+
head(),
|
|
78
|
+
...report.endpoints
|
|
79
|
+
.slice()
|
|
80
|
+
.sort((a, b) => (b.mean ?? 0) - (a.mean ?? 0))
|
|
81
|
+
.map((endpoint) =>
|
|
82
|
+
row(`${endpoint.method} ${endpoint.path}`, endpoint),
|
|
83
|
+
),
|
|
84
|
+
"",
|
|
85
|
+
"> Unit: milliseconds",
|
|
86
|
+
"",
|
|
87
|
+
"## Failures",
|
|
88
|
+
"Method | Path | Count | Failures",
|
|
89
|
+
"-------|------|-------|----------",
|
|
90
|
+
...report.endpoints
|
|
91
|
+
.filter((e) => e.success !== e.count)
|
|
92
|
+
.slice()
|
|
93
|
+
.sort((a, b) => b.count - a.count)
|
|
94
|
+
.map((e) =>
|
|
95
|
+
[
|
|
96
|
+
e.method,
|
|
97
|
+
e.path,
|
|
98
|
+
e.count.toLocaleString(),
|
|
99
|
+
(e.count - e.success).toLocaleString(),
|
|
100
|
+
].join(" | "),
|
|
101
|
+
),
|
|
102
|
+
].join("\n");
|
|
103
|
+
};
|
|
104
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface IBenchmarkMaster {
|
|
2
|
-
filter: (name: string) => boolean;
|
|
3
|
-
progress: (current: number) => void;
|
|
4
|
-
}
|
|
1
|
+
export interface IBenchmarkMaster {
|
|
2
|
+
filter: (name: string) => boolean;
|
|
3
|
+
progress: (current: number) => void;
|
|
4
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IBenchmarkEvent } from "../IBenchmarkEvent";
|
|
2
|
-
|
|
3
|
-
export interface IBenchmarkServant {
|
|
4
|
-
execute(props: {
|
|
5
|
-
count: number;
|
|
6
|
-
simultaneous: number;
|
|
7
|
-
}): Promise<IBenchmarkEvent[]>;
|
|
8
|
-
}
|
|
1
|
+
import { IBenchmarkEvent } from "../IBenchmarkEvent";
|
|
2
|
+
|
|
3
|
+
export interface IBenchmarkServant {
|
|
4
|
+
execute(props: {
|
|
5
|
+
count: number;
|
|
6
|
+
simultaneous: number;
|
|
7
|
+
}): Promise<IBenchmarkEvent[]>;
|
|
8
|
+
}
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
import { IConnection } from "@nestia/fetcher";
|
|
2
|
-
import { WorkerServer } from "tgrid";
|
|
3
|
-
import { IBenchmarkMaster } from "./internal/IBenchmarkMaster";
|
|
4
|
-
import { IBenchmarkServant } from "./internal/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 the
|
|
19
|
-
* 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, see the below
|
|
28
|
-
* example tagged links.
|
|
29
|
-
*
|
|
30
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
31
|
-
* @example
|
|
32
|
-
* https://github.com/samchon/nestia-start/blob/master/test/benchmaark/index.ts
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* https://github.com/samchon/backend/blob/master/test/benchmark/index.ts
|
|
36
|
-
*/
|
|
37
|
-
export declare namespace DynamicBenchmarker {
|
|
38
|
-
/** Properties of the master program. */
|
|
39
|
-
interface IMasterProps {
|
|
40
|
-
/** Total count of the requests. */
|
|
41
|
-
count: number;
|
|
42
|
-
/**
|
|
43
|
-
* Number of threads.
|
|
44
|
-
*
|
|
45
|
-
* The number of threads to be executed as parallel servant.
|
|
46
|
-
*/
|
|
47
|
-
threads: number;
|
|
48
|
-
/**
|
|
49
|
-
* Number of simultaneous requests.
|
|
50
|
-
*
|
|
51
|
-
* The number of requests to be executed simultaneously.
|
|
52
|
-
*
|
|
53
|
-
* This property value would be divided by the {@link threads} in the
|
|
54
|
-
* 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 the
|
|
68
|
-
* 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
|
-
* Get memory usage.
|
|
82
|
-
*
|
|
83
|
-
* Get the memory usage of the master program.
|
|
84
|
-
*
|
|
85
|
-
* Specify this property only when your backend server is running on a
|
|
86
|
-
* different process, so that need to measure the memory usage of the
|
|
87
|
-
* backend server from other process.
|
|
88
|
-
*/
|
|
89
|
-
memory?: () => Promise<NodeJS.MemoryUsage>;
|
|
90
|
-
/**
|
|
91
|
-
* Standard I/O option.
|
|
92
|
-
*
|
|
93
|
-
* The standard I/O option for the servant programs.
|
|
94
|
-
*/
|
|
95
|
-
stdio?: undefined | "overlapped" | "pipe" | "ignore" | "inherit";
|
|
96
|
-
}
|
|
97
|
-
/** Properties of the servant program. */
|
|
98
|
-
interface IServantProps<Parameters extends any[]> {
|
|
99
|
-
/**
|
|
100
|
-
* Default connection.
|
|
101
|
-
*
|
|
102
|
-
* Default connection to be used in the servant.
|
|
103
|
-
*/
|
|
104
|
-
connection: IConnection;
|
|
105
|
-
/** Location of the benchmark functions. */
|
|
106
|
-
location: string;
|
|
107
|
-
/**
|
|
108
|
-
* Prefix of the benchmark functions.
|
|
109
|
-
*
|
|
110
|
-
* Every prefixed function will be executed in the servant.
|
|
111
|
-
*
|
|
112
|
-
* In other words, if a function name doesn't start with the prefix, then it
|
|
113
|
-
* would never be executed.
|
|
114
|
-
*/
|
|
115
|
-
prefix: string;
|
|
116
|
-
/**
|
|
117
|
-
* Get parameters of a function.
|
|
118
|
-
*
|
|
119
|
-
* When composing the parameters, never forget to copy the
|
|
120
|
-
* {@link IConnection.logger} property of default connection to the returning
|
|
121
|
-
* parameters.
|
|
122
|
-
*
|
|
123
|
-
* @param connection Default connection instance
|
|
124
|
-
* @param name Function name
|
|
125
|
-
*/
|
|
126
|
-
parameters: (connection: IConnection, name: string) => Parameters;
|
|
127
|
-
}
|
|
128
|
-
/** Benchmark report. */
|
|
129
|
-
interface IReport {
|
|
130
|
-
count: number;
|
|
131
|
-
threads: number;
|
|
132
|
-
simultaneous: number;
|
|
133
|
-
started_at: string;
|
|
134
|
-
completed_at: string;
|
|
135
|
-
statistics: IReport.IStatistics;
|
|
136
|
-
endpoints: Array<IReport.IEndpoint & IReport.IStatistics>;
|
|
137
|
-
memories: IReport.IMemory[];
|
|
138
|
-
}
|
|
139
|
-
namespace IReport {
|
|
140
|
-
interface IEndpoint {
|
|
141
|
-
method: string;
|
|
142
|
-
path: string;
|
|
143
|
-
}
|
|
144
|
-
interface IStatistics {
|
|
145
|
-
count: number;
|
|
146
|
-
success: number;
|
|
147
|
-
mean: number | null;
|
|
148
|
-
stdev: number | null;
|
|
149
|
-
minimum: number | null;
|
|
150
|
-
maximum: number | null;
|
|
151
|
-
}
|
|
152
|
-
interface IMemory {
|
|
153
|
-
time: string;
|
|
154
|
-
usage: NodeJS.MemoryUsage;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Master program.
|
|
159
|
-
*
|
|
160
|
-
* Creates a master program that executing the servant programs in parallel.
|
|
161
|
-
*
|
|
162
|
-
* Note that, {@link IMasterProps.servant} property must be the path of the
|
|
163
|
-
* servant program executing the {@link servant} function.
|
|
164
|
-
*
|
|
165
|
-
* @param props Properties of the master program
|
|
166
|
-
* @returns Benchmark report
|
|
167
|
-
*/
|
|
168
|
-
const master: (props: IMasterProps) => Promise<IReport>;
|
|
169
|
-
/**
|
|
170
|
-
* Create a servant program.
|
|
171
|
-
*
|
|
172
|
-
* Creates a servant program executing the prefixed functions in parallel.
|
|
173
|
-
*
|
|
174
|
-
* @param props Properties of the servant program
|
|
175
|
-
* @returns Servant program as a worker server
|
|
176
|
-
*/
|
|
177
|
-
const servant: <Parameters extends any[]>(props: IServantProps<Parameters>) => Promise<WorkerServer<null, IBenchmarkServant, IBenchmarkMaster>>;
|
|
178
|
-
/**
|
|
179
|
-
* Convert the benchmark report to markdown content.
|
|
180
|
-
*
|
|
181
|
-
* @param report Benchmark report
|
|
182
|
-
* @returns Markdown content
|
|
183
|
-
*/
|
|
184
|
-
const markdown: (report: DynamicBenchmarker.IReport) => string;
|
|
185
|
-
}
|