@xylabs/profile 5.0.95 → 5.0.96
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/README.md +57 -75
- package/package.json +6 -9
package/README.md
CHANGED
|
@@ -1,45 +1,52 @@
|
|
|
1
1
|
# @xylabs/profile
|
|
2
2
|
|
|
3
|
-
[![
|
|
3
|
+
[![npm][npm-badge]][npm-link]
|
|
4
|
+
[![license][license-badge]][license-link]
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
[![npm-badge][]][npm-link]
|
|
7
|
-
[![npm-downloads-badge][]][npm-link]
|
|
8
|
-
[![jsdelivr-badge][]][jsdelivr-link]
|
|
9
|
-
[![npm-license-badge][]](LICENSE)
|
|
10
|
-
[![codacy-badge][]][codacy-link]
|
|
11
|
-
[![codeclimate-badge][]][codeclimate-link]
|
|
12
|
-
[![snyk-badge][]][snyk-link]
|
|
13
|
-
[![socket-badge][]][socket-link]
|
|
6
|
+
> Base functionality used throughout XY Labs TypeScript/JavaScript libraries
|
|
14
7
|
|
|
8
|
+
## Install
|
|
15
9
|
|
|
16
|
-
|
|
10
|
+
Using npm:
|
|
17
11
|
|
|
12
|
+
```sh
|
|
13
|
+
npm install {{name}}
|
|
14
|
+
```
|
|
18
15
|
|
|
16
|
+
Using yarn:
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
```sh
|
|
19
|
+
yarn add {{name}}
|
|
20
|
+
```
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Using pnpm:
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
```sh
|
|
25
|
+
pnpm add {{name}}
|
|
26
|
+
```
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
Using bun:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
bun add {{name}}
|
|
32
|
+
```
|
|
27
33
|
|
|
28
|
-
| Type Alias | Description |
|
|
29
|
-
| ------ | ------ |
|
|
30
|
-
| [Profiler](#type-aliases/Profiler) | A record of named timing entries, where each key maps to an array of timestamps. |
|
|
31
34
|
|
|
32
|
-
##
|
|
35
|
+
## License
|
|
33
36
|
|
|
34
|
-
|
|
35
|
-
| ------ | ------ |
|
|
36
|
-
| [createProfiler](#functions/createProfiler) | Creates a new empty profiler instance. |
|
|
37
|
-
| [profile](#functions/profile) | Records a timestamp for the given profile name. |
|
|
38
|
-
| [profileReport](#functions/profileReport) | Generates a report of elapsed times for each profiled entry. |
|
|
37
|
+
See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
## Reference
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
### packages
|
|
42
|
+
|
|
43
|
+
### profile
|
|
44
|
+
|
|
45
|
+
### .temp-typedoc
|
|
46
|
+
|
|
47
|
+
### functions
|
|
48
|
+
|
|
49
|
+
### <a id="createProfiler"></a>createProfiler
|
|
43
50
|
|
|
44
51
|
[**@xylabs/profile**](#../README)
|
|
45
52
|
|
|
@@ -55,46 +62,55 @@ Creates a new empty profiler instance.
|
|
|
55
62
|
|
|
56
63
|
[`Profiler`](#../type-aliases/Profiler)
|
|
57
64
|
|
|
58
|
-
|
|
65
|
+
### <a id="profile"></a>profile
|
|
59
66
|
|
|
60
67
|
[**@xylabs/profile**](#../README)
|
|
61
68
|
|
|
62
69
|
***
|
|
63
70
|
|
|
64
71
|
```ts
|
|
65
|
-
function profile(profiler
|
|
72
|
+
function profile(profiler, name): void;
|
|
66
73
|
```
|
|
67
74
|
|
|
68
75
|
Records a timestamp for the given profile name.
|
|
69
76
|
|
|
70
77
|
## Parameters
|
|
71
78
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
79
|
+
### profiler
|
|
80
|
+
|
|
81
|
+
[`Profiler`](#../type-aliases/Profiler)
|
|
82
|
+
|
|
83
|
+
The profiler instance to record into.
|
|
84
|
+
|
|
85
|
+
### name
|
|
86
|
+
|
|
87
|
+
`string`
|
|
88
|
+
|
|
89
|
+
The name of the timing entry.
|
|
76
90
|
|
|
77
91
|
## Returns
|
|
78
92
|
|
|
79
93
|
`void`
|
|
80
94
|
|
|
81
|
-
|
|
95
|
+
### <a id="profileReport"></a>profileReport
|
|
82
96
|
|
|
83
97
|
[**@xylabs/profile**](#../README)
|
|
84
98
|
|
|
85
99
|
***
|
|
86
100
|
|
|
87
101
|
```ts
|
|
88
|
-
function profileReport(profiler
|
|
102
|
+
function profileReport(profiler): Record<string, number>;
|
|
89
103
|
```
|
|
90
104
|
|
|
91
105
|
Generates a report of elapsed times for each profiled entry.
|
|
92
106
|
|
|
93
107
|
## Parameters
|
|
94
108
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
109
|
+
### profiler
|
|
110
|
+
|
|
111
|
+
[`Profiler`](#../type-aliases/Profiler)
|
|
112
|
+
|
|
113
|
+
The profiler instance to report on.
|
|
98
114
|
|
|
99
115
|
## Returns
|
|
100
116
|
|
|
@@ -102,9 +118,9 @@ Generates a report of elapsed times for each profiled entry.
|
|
|
102
118
|
|
|
103
119
|
A record mapping each profile name to its elapsed time in milliseconds, plus a '-all-' total.
|
|
104
120
|
|
|
105
|
-
### type-aliases
|
|
121
|
+
### type-aliases
|
|
106
122
|
|
|
107
|
-
|
|
123
|
+
### <a id="Profiler"></a>Profiler
|
|
108
124
|
|
|
109
125
|
[**@xylabs/profile**](#../README)
|
|
110
126
|
|
|
@@ -117,41 +133,7 @@ type Profiler = Record<string, number[]>;
|
|
|
117
133
|
A record of named timing entries, where each key maps to an array of timestamps.
|
|
118
134
|
|
|
119
135
|
|
|
120
|
-
Part of [sdk-js](https://www.npmjs.com/package/@xyo-network/sdk-js)
|
|
121
|
-
|
|
122
|
-
## Maintainers
|
|
123
|
-
|
|
124
|
-
- [Arie Trouw](https://github.com/arietrouw) ([arietrouw.com](https://arietrouw.com))
|
|
125
|
-
- [Matt Jones](https://github.com/jonesmac)
|
|
126
|
-
- [Joel Carter](https://github.com/JoelBCarter)
|
|
127
|
-
- [Jordan Trouw](https://github.com/jordantrouw)
|
|
128
|
-
|
|
129
|
-
## License
|
|
130
|
-
|
|
131
|
-
> See the [LICENSE](LICENSE) file for license details
|
|
132
|
-
|
|
133
|
-
## Credits
|
|
134
|
-
|
|
135
|
-
[Made with 🔥 and ❄️ by XYLabs](https://xylabs.com)
|
|
136
|
-
|
|
137
|
-
[logo]: https://cdn.xy.company/img/brand/XYPersistentCompany_Logo_Icon_Colored.svg
|
|
138
|
-
|
|
139
|
-
[main-build]: https://github.com/xylabs/sdk-js/actions/workflows/build.yml/badge.svg
|
|
140
|
-
[main-build-link]: https://github.com/xylabs/sdk-js/actions/workflows/build.yml
|
|
141
136
|
[npm-badge]: https://img.shields.io/npm/v/@xylabs/profile.svg
|
|
142
137
|
[npm-link]: https://www.npmjs.com/package/@xylabs/profile
|
|
143
|
-
[
|
|
144
|
-
[
|
|
145
|
-
[codeclimate-badge]: https://api.codeclimate.com/v1/badges/c5eb068f806f0b047ea7/maintainability
|
|
146
|
-
[codeclimate-link]: https://codeclimate.com/github/xylabs/sdk-js/maintainability
|
|
147
|
-
[snyk-badge]: https://snyk.io/test/github/xylabs/sdk-js/badge.svg?targetFile=package.json
|
|
148
|
-
[snyk-link]: https://snyk.io/test/github/xylabs/sdk-js?targetFile=package.json
|
|
149
|
-
|
|
150
|
-
[npm-downloads-badge]: https://img.shields.io/npm/dw/@xylabs/profile
|
|
151
|
-
[npm-license-badge]: https://img.shields.io/npm/l/@xylabs/profile
|
|
152
|
-
|
|
153
|
-
[jsdelivr-badge]: https://data.jsdelivr.com/v1/package/npm/@xylabs/profile/badge
|
|
154
|
-
[jsdelivr-link]: https://www.jsdelivr.com/package/npm/@xylabs/profile
|
|
155
|
-
|
|
156
|
-
[socket-badge]: https://socket.dev/api/badge/npm/package/@xylabs/profile
|
|
157
|
-
[socket-link]: https://socket.dev/npm/package/@xylabs/profile
|
|
138
|
+
[license-badge]: https://img.shields.io/npm/l/@xylabs/profile.svg
|
|
139
|
+
[license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/profile",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.96",
|
|
4
4
|
"description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"profile",
|
|
@@ -30,12 +30,10 @@
|
|
|
30
30
|
"exports": {
|
|
31
31
|
".": {
|
|
32
32
|
"types": "./dist/neutral/index.d.ts",
|
|
33
|
-
"import": "./dist/neutral/index.mjs",
|
|
34
33
|
"default": "./dist/neutral/index.mjs"
|
|
35
34
|
},
|
|
36
35
|
"./package.json": "./package.json"
|
|
37
36
|
},
|
|
38
|
-
"types": "./dist/neutral/index.d.ts",
|
|
39
37
|
"files": [
|
|
40
38
|
"dist",
|
|
41
39
|
"!**/*.bench.*",
|
|
@@ -44,14 +42,13 @@
|
|
|
44
42
|
"README.md"
|
|
45
43
|
],
|
|
46
44
|
"devDependencies": {
|
|
47
|
-
"@types/node": "^25.
|
|
48
|
-
"@xylabs/
|
|
49
|
-
"@xylabs/
|
|
50
|
-
"@xylabs/tsconfig": "~7.8.4",
|
|
45
|
+
"@types/node": "^25.6.0",
|
|
46
|
+
"@xylabs/toolchain": "~7.10.4",
|
|
47
|
+
"@xylabs/tsconfig": "~7.10.4",
|
|
51
48
|
"esbuild": "^0.28.0",
|
|
52
49
|
"typescript": "^5",
|
|
53
|
-
"vite": "^8.0.
|
|
54
|
-
"vitest": "^4.1.
|
|
50
|
+
"vite": "^8.0.8",
|
|
51
|
+
"vitest": "^4.1.4"
|
|
55
52
|
},
|
|
56
53
|
"engines": {
|
|
57
54
|
"node": ">=18"
|