Skip to content

Commit

Permalink
fix(profiler): fix ram usage when multiple pids (#290)
Browse files Browse the repository at this point in the history
* chore(cpp): change cmake min version

* fix(profiler): ignore 255 error code

* fix(profiler): fix ram usage when multiple pids

* chore: fix ci after lerna config change
  • Loading branch information
Almouro authored Jun 6, 2024
1 parent 5b34e58 commit 85656a7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"run-cli-example": "node packages/cli-example",
"build": "rm -rf .parcel-cache && yarn clean-dist && tsc --build && yarn workspace @perf-profiler/web-reporter build && yarn workspace @perf-profiler/measure build",
"release": "yarn build && lerna publish",
"test:e2e": "mkdir -p report && npx @perf-profiler/aws-device-farm runTest --apkPath .github/workflows/example.apk --projectName 'Flashlight-Serverless' --reportDestinationPath report --testCommand 'npx ts-node examples/e2e/appium-ci.test.ts' --testFolder .",
"test:e2e": "mkdir -p report && node packages/plugins/aws-device-farm/dist/bin.js runTest --apkPath .github/workflows/example.apk --projectName 'Flashlight-Serverless' --reportDestinationPath report --testCommand 'npx ts-node examples/e2e/appium-ci.test.ts' --testFolder .",
"prepare": "husky"
},
"homepage": "https://github.com/bamlab/flashlight#readme",
Expand Down
7 changes: 4 additions & 3 deletions packages/platforms/android/cpp-profiler/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
cmake_minimum_required(VERSION 3.16.0)
cmake_minimum_required(VERSION 3.22)
project(android-cmake-flashlight)
add_executable(BAMPerfProfiler src/main.cpp src/atrace.cpp src/utils.cpp)

set(CMAKE_CXX_STANDARD 21)
set(CMAKE_CXX_STANDARD 17)

add_executable(BAMPerfProfiler src/main.cpp src/atrace.cpp src/utils.cpp)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const BYTES_PER_MB = 1024 * 1024;

export const processOutput = (result: string, ramPageSize: number) => {
const lines = result.split("\n");
const lines = result.split("\n").filter(Boolean);
let total = 0;

for (const line of lines) {
Expand Down
1 change: 1 addition & 0 deletions packages/platforms/android/src/commands/shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export const executeAsync = (
130, // SIGINT
140, // SIGKILL
143, // SIGTERM
255, // SSH EXECUTION STOPPED
];

// SIGKILL or SIGTERM are likely to be normal, since we request termination from JS side
Expand Down

0 comments on commit 85656a7

Please sign in to comment.