Skip to content

Commit f2c86ec

Browse files
author
Thomas Roos
committed
aws-iot-fleetwise-test-image: add description and tools for perf
1 parent a11f657 commit f2c86ec

3 files changed

Lines changed: 47 additions & 5 deletions

File tree

meta-aws-demos/recipes-core/images/aws-iot-fleetwise-test-image/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,27 @@ More information about AWS IoT FleetWise Edge Agent can be found [here](https://
3232
```bash
3333
runqemu slirp nographic
3434
```
35+
36+
### perf testing
37+
38+
Collecting data on the running target:
39+
```bash
40+
cd /usr/lib/aws-iot-fleetwise-edge/ptest
41+
perf record -g -- tests/fwe-gtest --gtest_filter="*RisingEdgeTrigger*" --gtest_fail_fast
42+
perf script > perf.out
43+
```
44+
45+
Then copy local:
46+
```bash
47+
scp -O root@192.168.7.2:/usr/lib/aws-iot-fleetwise-edge/ptest/perf.out .
48+
```
49+
50+
Then run Flamegraph commands on dev machine:
51+
52+
```bash
53+
cat perf.out | ~/git/FlameGraph/stackcollapse-perf.pl > perf.out.folded
54+
~/git/FlameGraph/flamegraph.pl perf.out.folded > out.svg
55+
```
56+
(download from here: `git clone https://github.com/brendangregg/FlameGraph`)
57+
58+
View with e.g. firefox

meta-aws-demos/recipes-core/images/aws-iot-fleetwise-test-image/aws-iot-fleetwise-test-image.bb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ TEST_SUITES = " ping aws-iot-fleetwise-edge "
99

1010
IMAGE_INSTALL:append = " aws-iot-fleetwise-edge \
1111
can-utils "
12+
13+
IMAGE_INSTALL:append = " perf"
14+
15+
IMAGE_INSTALL:append = " ssh openssh-sshd openssh-sftp openssh-scp"
16+
17+
IMAGE_INSTALL:append = " aws-iot-fleetwise-edge-ptest aws-iot-fleetwise-edge-dbg"

meta-aws-demos/recipes-core/images/aws-iot-fleetwise-test-image/config.conf

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
33

44
SDKMACHINE = "x86_64"
55

6-
TEST_SUITES = " ping aws-iot-fleetwise-edge "
7-
8-
QEMU_USE_KVM = ""
9-
QEMU_USE_SLIRP = "1"
10-
116
IMAGE_INSTALL:append = " aws-iot-fleetwise-edge \
127
can-utils "
138

@@ -24,3 +19,20 @@ VIRTUAL-RUNTIME_initscripts = ""
2419
VIRTUAL-RUNTIME_syslog = ""
2520

2621
QB_MEM = "-m 2048"
22+
23+
# use slirp networking instead of TAP interface (require root rights)
24+
QEMU_USE_SLIRP = "1"
25+
TEST_SERVER_IP = "127.0.0.1"
26+
27+
# this will specify what test should run when running testimage cmd - oeqa layer tests + ptests:
28+
# Ping and SSH are not required, but do help in debugging. ptest will discover all ptest packages.
29+
TEST_SUITES = " ping ssh ptest parselogs"
30+
31+
IMAGE_INSTALL:append = " ptest-runner ssh"
32+
33+
# this will specify what test should run when running testimage cmd - oeqa layer tests + ptests:
34+
# Ping and SSH are not required, but do help in debugging. ptest will discover all ptest packages.
35+
TEST_SUITES = " ping ssh ptest parselogs"
36+
37+
# this will allow - running testimage cmd: bitbake core-image-minimal -c testimage
38+
IMAGE_CLASSES += "testimage"

0 commit comments

Comments
 (0)