@xylabs/profile 3.6.6 → 3.6.7
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/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.d.cts +1 -1
- package/dist/browser/index.d.mts +1 -1
- package/dist/browser/index.d.ts +1 -1
- package/dist/browser/{index.js → index.mjs} +1 -1
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.d.cts +1 -1
- package/dist/neutral/index.d.mts +1 -1
- package/dist/neutral/index.d.ts +1 -1
- package/dist/{node/index.js → neutral/index.mjs} +1 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +1 -1
- package/dist/node/index.d.mts +1 -1
- package/dist/node/index.d.ts +1 -1
- package/dist/{neutral/index.js → node/index.mjs} +1 -1
- package/package.json +6 -6
- package/src/index.ts +1 -1
- /package/dist/browser/{index.js.map → index.mjs.map} +0 -0
- /package/dist/neutral/{index.js.map → index.mjs.map} +0 -0
- /package/dist/node/{index.js.map → index.mjs.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/profiler.ts"],"sourcesContent":["export * from './profiler.
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/profiler.ts"],"sourcesContent":["export * from './profiler.ts'\n","export type Profiler = Record<string, number[]>\n\nexport const createProfiler = (): Profiler => {\n return {}\n}\n\nexport const profile = (profiler: Profiler, name: string) => {\n const timeData = profiler[name] ?? []\n timeData.push(Date.now())\n profiler[name] = timeData\n}\n\nexport const profileReport = (profiler: Profiler) => {\n let lowest = Date.now()\n let highest = 0\n // eslint-disable-next-line unicorn/no-array-reduce\n const results = Object.entries(profiler).reduce<Record<string, number>>((prev, [name, readings]) => {\n const start = readings.at(0)\n if (start) {\n if (start < lowest) {\n lowest = start\n }\n const end = readings.at(-1) ?? Date.now()\n if (end > highest) {\n highest = end\n }\n prev[name] = end - start\n }\n return prev\n }, {})\n if (highest) {\n results['-all-'] = highest - lowest\n }\n return results\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,IAAM,iBAAiB,MAAgB;AAC5C,SAAO,CAAC;AACV;AAEO,IAAM,UAAU,CAAC,UAAoB,SAAiB;AAC3D,QAAM,WAAW,SAAS,IAAI,KAAK,CAAC;AACpC,WAAS,KAAK,KAAK,IAAI,CAAC;AACxB,WAAS,IAAI,IAAI;AACnB;AAEO,IAAM,gBAAgB,CAAC,aAAuB;AACnD,MAAI,SAAS,KAAK,IAAI;AACtB,MAAI,UAAU;AAEd,QAAM,UAAU,OAAO,QAAQ,QAAQ,EAAE,OAA+B,CAAC,MAAM,CAAC,MAAM,QAAQ,MAAM;AAClG,UAAM,QAAQ,SAAS,GAAG,CAAC;AAC3B,QAAI,OAAO;AACT,UAAI,QAAQ,QAAQ;AAClB,iBAAS;AAAA,MACX;AACA,YAAM,MAAM,SAAS,GAAG,EAAE,KAAK,KAAK,IAAI;AACxC,UAAI,MAAM,SAAS;AACjB,kBAAU;AAAA,MACZ;AACA,WAAK,IAAI,IAAI,MAAM;AAAA,IACrB;AACA,WAAO;AAAA,EACT,GAAG,CAAC,CAAC;AACL,MAAI,SAAS;AACX,YAAQ,OAAO,IAAI,UAAU;AAAA,EAC/B;AACA,SAAO;AACT;","names":[]}
|
package/dist/browser/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './profiler.
|
|
1
|
+
export * from './profiler.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/browser/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './profiler.
|
|
1
|
+
export * from './profiler.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './profiler.
|
|
1
|
+
export * from './profiler.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/profiler.ts"],"sourcesContent":["export * from './profiler.
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/profiler.ts"],"sourcesContent":["export * from './profiler.ts'\n","export type Profiler = Record<string, number[]>\n\nexport const createProfiler = (): Profiler => {\n return {}\n}\n\nexport const profile = (profiler: Profiler, name: string) => {\n const timeData = profiler[name] ?? []\n timeData.push(Date.now())\n profiler[name] = timeData\n}\n\nexport const profileReport = (profiler: Profiler) => {\n let lowest = Date.now()\n let highest = 0\n // eslint-disable-next-line unicorn/no-array-reduce\n const results = Object.entries(profiler).reduce<Record<string, number>>((prev, [name, readings]) => {\n const start = readings.at(0)\n if (start) {\n if (start < lowest) {\n lowest = start\n }\n const end = readings.at(-1) ?? Date.now()\n if (end > highest) {\n highest = end\n }\n prev[name] = end - start\n }\n return prev\n }, {})\n if (highest) {\n results['-all-'] = highest - lowest\n }\n return results\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,IAAM,iBAAiB,MAAgB;AAC5C,SAAO,CAAC;AACV;AAEO,IAAM,UAAU,CAAC,UAAoB,SAAiB;AAC3D,QAAM,WAAW,SAAS,IAAI,KAAK,CAAC;AACpC,WAAS,KAAK,KAAK,IAAI,CAAC;AACxB,WAAS,IAAI,IAAI;AACnB;AAEO,IAAM,gBAAgB,CAAC,aAAuB;AACnD,MAAI,SAAS,KAAK,IAAI;AACtB,MAAI,UAAU;AAEd,QAAM,UAAU,OAAO,QAAQ,QAAQ,EAAE,OAA+B,CAAC,MAAM,CAAC,MAAM,QAAQ,MAAM;AAClG,UAAM,QAAQ,SAAS,GAAG,CAAC;AAC3B,QAAI,OAAO;AACT,UAAI,QAAQ,QAAQ;AAClB,iBAAS;AAAA,MACX;AACA,YAAM,MAAM,SAAS,GAAG,EAAE,KAAK,KAAK,IAAI;AACxC,UAAI,MAAM,SAAS;AACjB,kBAAU;AAAA,MACZ;AACA,WAAK,IAAI,IAAI,MAAM;AAAA,IACrB;AACA,WAAO;AAAA,EACT,GAAG,CAAC,CAAC;AACL,MAAI,SAAS;AACX,YAAQ,OAAO,IAAI,UAAU;AAAA,EAC/B;AACA,SAAO;AACT;","names":[]}
|
package/dist/neutral/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './profiler.
|
|
1
|
+
export * from './profiler.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/neutral/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './profiler.
|
|
1
|
+
export * from './profiler.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './profiler.
|
|
1
|
+
export * from './profiler.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/profiler.ts"],"sourcesContent":["export * from './profiler.
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/profiler.ts"],"sourcesContent":["export * from './profiler.ts'\n","export type Profiler = Record<string, number[]>\n\nexport const createProfiler = (): Profiler => {\n return {}\n}\n\nexport const profile = (profiler: Profiler, name: string) => {\n const timeData = profiler[name] ?? []\n timeData.push(Date.now())\n profiler[name] = timeData\n}\n\nexport const profileReport = (profiler: Profiler) => {\n let lowest = Date.now()\n let highest = 0\n // eslint-disable-next-line unicorn/no-array-reduce\n const results = Object.entries(profiler).reduce<Record<string, number>>((prev, [name, readings]) => {\n const start = readings.at(0)\n if (start) {\n if (start < lowest) {\n lowest = start\n }\n const end = readings.at(-1) ?? Date.now()\n if (end > highest) {\n highest = end\n }\n prev[name] = end - start\n }\n return prev\n }, {})\n if (highest) {\n results['-all-'] = highest - lowest\n }\n return results\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,IAAM,iBAAiB,MAAgB;AAC5C,SAAO,CAAC;AACV;AAEO,IAAM,UAAU,CAAC,UAAoB,SAAiB;AAC3D,QAAM,WAAW,SAAS,IAAI,KAAK,CAAC;AACpC,WAAS,KAAK,KAAK,IAAI,CAAC;AACxB,WAAS,IAAI,IAAI;AACnB;AAEO,IAAM,gBAAgB,CAAC,aAAuB;AACnD,MAAI,SAAS,KAAK,IAAI;AACtB,MAAI,UAAU;AAEd,QAAM,UAAU,OAAO,QAAQ,QAAQ,EAAE,OAA+B,CAAC,MAAM,CAAC,MAAM,QAAQ,MAAM;AAClG,UAAM,QAAQ,SAAS,GAAG,CAAC;AAC3B,QAAI,OAAO;AACT,UAAI,QAAQ,QAAQ;AAClB,iBAAS;AAAA,MACX;AACA,YAAM,MAAM,SAAS,GAAG,EAAE,KAAK,KAAK,IAAI;AACxC,UAAI,MAAM,SAAS;AACjB,kBAAU;AAAA,MACZ;AACA,WAAK,IAAI,IAAI,MAAM;AAAA,IACrB;AACA,WAAO;AAAA,EACT,GAAG,CAAC,CAAC;AACL,MAAI,SAAS;AACX,YAAQ,OAAO,IAAI,UAAU;AAAA,EAC/B;AACA,SAAO;AACT;","names":[]}
|
package/dist/node/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './profiler.
|
|
1
|
+
export * from './profiler.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './profiler.
|
|
1
|
+
export * from './profiler.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './profiler.
|
|
1
|
+
export * from './profiler.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
"default": "./dist/neutral/index.cjs"
|
|
19
19
|
},
|
|
20
20
|
"import": {
|
|
21
|
-
"types": "./dist/neutral/index.d.
|
|
22
|
-
"default": "./dist/neutral/index.
|
|
21
|
+
"types": "./dist/neutral/index.d.ts",
|
|
22
|
+
"default": "./dist/neutral/index.mjs"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
27
|
"main": "./dist/neutral/index.cjs",
|
|
28
28
|
"types": "./dist/neutral/index.d.ts",
|
|
29
|
-
"module": "./dist/neutral/index.
|
|
29
|
+
"module": "./dist/neutral/index.mjs",
|
|
30
30
|
"homepage": "https://xylabs.com",
|
|
31
31
|
"keywords": [
|
|
32
32
|
"profile",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"esm"
|
|
38
38
|
],
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@xylabs/ts-scripts-yarn3": "^3.
|
|
41
|
-
"@xylabs/tsconfig": "^3.
|
|
40
|
+
"@xylabs/ts-scripts-yarn3": "^3.15.4",
|
|
41
|
+
"@xylabs/tsconfig": "^3.15.4",
|
|
42
42
|
"typescript": "^5.5.4"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
@@ -52,6 +52,6 @@
|
|
|
52
52
|
"url": "https://github.com/xylabs/sdk-js.git"
|
|
53
53
|
},
|
|
54
54
|
"sideEffects": false,
|
|
55
|
-
"version": "3.6.
|
|
55
|
+
"version": "3.6.7",
|
|
56
56
|
"type": "module"
|
|
57
57
|
}
|
package/src/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './profiler.
|
|
1
|
+
export * from './profiler.ts'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|