Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The reader will build the following competences by following this tutorial:

  • To measure message sizes of IoT protocols deployed in embedded systems, using techniques such as logging and packet sniffing.To assess Flash and static RAM usage at compile time, by analysing memory map files.

  • To measure Heap and Stack usage at runtime using the technique of memory painting.

  • To measure execution time using internal and external tools (hardware timers and logic analysers).

  • To measure energy consumption using osciloscopes and power profilers.

  • To correlate execution time and energy consumption data in a granular and step-by-step way, allowing the identification of performance bottlenecks.

Measuring Message Sizes

logging, hardware packet sniffing, packet analysis tools (wireshark)

Logging: can be performed on the mote or on the gateway, easier on the latter.

Packet sniffing: there are two main situations.

  • If the constrained devices talks to a computer or gateway, just run Wireshark on the computer.

  • If two devices talk between each other, you need a third device that understand the protocol to sniff the conversation. Some IoT platforms offer facilities to save the conversation as a .cap file, which can be later analyzed on WiresharkTo measure message sizes of IoT protocols deployed in embedded systems, using techniques such as logging and packet sniffing.

Measuring Memory Usage

Flash and RAM (Compile Time)

compiled binary, GNU size, nm, analysing linker map files

...

Another way is using the nm utility.

Stack and heap (RAM at Runtime)

Stack and heap: memory painting, gdb, jlink

Measuring Execution Time

timers, gpio's connected to logic analysers

Measuring Energy Consumption

multimeters, oscilloscopes, power profilers

Correlating Execution Time and Energy Consumption

Syncing execution time and energy consumption: power profiler with gpio

Step-by-step Granular Time and Energy Consumption

Obtaining step-by-step time and energy consumption: merging results from power profiler and logic analyser

Measuring Message Sizes

logging, hardware packet sniffing, packet analysis tools (wireshark)

Logging: can be performed on the mote or on the gateway, easier on the latter.

Packet sniffing: there are two main situations.

  • If the constrained devices talks to a computer or gateway, just run Wireshark on the computer.

  • If two devices talk between each other, you need a third device that understand the protocol to sniff the conversation. Some IoT platforms offer facilities to save the conversation as a .cap file, which can be later analyzed on Wireshark.