@ohos-perf/cli 0.13.0 → 0.13.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.
Files changed (2) hide show
  1. package/dist/index.js +6 -4
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1174,7 +1174,8 @@ function realDeps(version = packageVersion(), overrides = {}) {
1174
1174
  ...req.hidumper === true ? { hidumper: true } : {},
1175
1175
  ...req.uitest === true ? { uitest: true } : {},
1176
1176
  ...req.screenshot === true ? { screenshot: true } : {},
1177
- ...req.hilog === true ? { hilog: true } : {}
1177
+ ...req.hilog === true ? { hilog: true } : {},
1178
+ ...req.jsheap === true ? { jsheap: true } : {}
1178
1179
  });
1179
1180
  const scene = await session.ingest();
1180
1181
  try {
@@ -1378,7 +1379,7 @@ function buildProgram(deps2, io, opts = {}) {
1378
1379
  ).option("--hiperf", "also capture a hiperf perf.data (debuggable app only)").option(
1379
1380
  "--so-dir <dir>",
1380
1381
  "host directory of shared objects to symbolize the hiperf capture with"
1381
- ).option("--hidumper", "also sample the RenderService fps and hitch counters").option("--uitest", "also dump the on-screen UI tree").option("--screenshot", "also capture the whole screen into screenshot.png").option("--hilog", "also stream the device log (hilog) for the capture window").option("--target <id>", "capture from this hdc target instead of the first connected one").option("--json", "print the result as JSON").action(async (opts2) => {
1382
+ ).option("--hidumper", "also sample the RenderService fps and hitch counters").option("--uitest", "also dump the on-screen UI tree").option("--screenshot", "also capture the whole screen into screenshot.png").option("--hilog", "also stream the device log (hilog) for the capture window").option("--jsheap", "also dump a JS heap snapshot for the app (debuggable app only)").option("--target <id>", "capture from this hdc target instead of the first connected one").option("--json", "print the result as JSON").action(async (opts2) => {
1382
1383
  let durationMs;
1383
1384
  try {
1384
1385
  durationMs = parseDurationSeconds(opts2.duration);
@@ -1413,11 +1414,11 @@ function buildProgram(deps2, io, opts = {}) {
1413
1414
  return;
1414
1415
  }
1415
1416
  }
1416
- const needsApp = opts2.procfs === true || opts2.coldStart !== void 0 || opts2.hiperf === true || (hiprofilerRequest?.plugins?.includes("nativehook") ?? false);
1417
+ const needsApp = opts2.procfs === true || opts2.coldStart !== void 0 || opts2.hiperf === true || opts2.jsheap === true || (hiprofilerRequest?.plugins?.includes("nativehook") ?? false);
1417
1418
  if (needsApp && (opts2.app === void 0 || opts2.app === "")) {
1418
1419
  io.emit({
1419
1420
  stdout: "",
1420
- stderr: "missing --app: --procfs, --cold-start, --hiperf and the nativehook plugin require an application package name\n",
1421
+ stderr: "missing --app: --procfs, --cold-start, --hiperf, --jsheap and the nativehook plugin require an application package name\n",
1421
1422
  exitCode: 1
1422
1423
  });
1423
1424
  return;
@@ -1435,6 +1436,7 @@ function buildProgram(deps2, io, opts = {}) {
1435
1436
  ...opts2.uitest === true ? { uitest: true } : {},
1436
1437
  ...opts2.screenshot === true ? { screenshot: true } : {},
1437
1438
  ...opts2.hilog === true ? { hilog: true } : {},
1439
+ ...opts2.jsheap === true ? { jsheap: true } : {},
1438
1440
  ...opts2.target === void 0 ? {} : { target: opts2.target }
1439
1441
  }, { json: opts2.json }));
1440
1442
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ohos-perf/cli",
3
- "version": "0.13.0",
3
+ "version": "0.13.2",
4
4
  "description": "Command-line interface for HarmonyOS performance analysis: doctor, caps, collect, analyze, query, tools, compare, report, gesture, emulator and selector-driven scenarios",
5
5
  "keywords": [
6
6
  "harmonyos",
@@ -36,7 +36,7 @@
36
36
  "access": "public"
37
37
  },
38
38
  "dependencies": {
39
- "@ohos-perf/core": "0.13.0",
39
+ "@ohos-perf/core": "0.13.2",
40
40
  "commander": "^12.1.0"
41
41
  },
42
42
  "scripts": {