@ohos-perf/core 0.22.0 → 0.22.2
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/index.js +7 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -746,6 +746,7 @@ function buildHiprofilerConfig(opts) {
|
|
|
746
746
|
var DEVICE_CONFIG_PATH = "/data/local/tmp/ohos-perf-hiprofiler.cfg";
|
|
747
747
|
var DEVICE_OUTPUT_PATH = "/data/local/tmp/ohos-perf-hiprofiler.htrace";
|
|
748
748
|
var DONE_MARKER = "DONE";
|
|
749
|
+
var SKELETON_MAX_BYTES = 2048;
|
|
749
750
|
var MAX_DURATION_MS = 2147483647;
|
|
750
751
|
var DETAIL_MAX_LINES2 = 5;
|
|
751
752
|
function detail2(text) {
|
|
@@ -828,6 +829,12 @@ var HiprofilerCollector = class {
|
|
|
828
829
|
{ code: "HIPROFILER_NO_OUTPUT" }
|
|
829
830
|
);
|
|
830
831
|
}
|
|
832
|
+
if (size <= SKELETON_MAX_BYTES) {
|
|
833
|
+
throw new OhosPerfError(
|
|
834
|
+
`hiprofiler wrote ${size} bytes to ${DEVICE_OUTPUT_PATH}, which is the container skeleton and holds no events: the session ran but recorded nothing. Check that the target app was running and that the plugins asked for are supported by this device. ls -l output: ${detail2(combined2(listing))}`,
|
|
835
|
+
{ code: "HIPROFILER_NO_OUTPUT" }
|
|
836
|
+
);
|
|
837
|
+
}
|
|
831
838
|
const partial = `${layout.traceFile}.partial`;
|
|
832
839
|
try {
|
|
833
840
|
await hdc.recv(target, DEVICE_OUTPUT_PATH, partial);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ohos-perf/core",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.2",
|
|
4
4
|
"description": "HarmonyOS performance analysis: capability probing, nine collectors, trace ingest, typed queries, twenty-one analyzers with provenance and fidelity, reports and a scenario runner",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"harmonyos",
|