0.3.2 Aug 23, 2022
0.3.1 Aug 13, 2022
0.2.1 Jul 22, 2022
0.1.6 Jul 5, 2022
0.1.4 May 23, 2022

#69 in #diem

Apache-2.0

1.5MB
28K SLoC

Profiling MoveVM with Instrument

This doc is going to talk about how to run performance benchmarks on macOS.

Step 1: Get latest Xcode and open Instrument

Instrument can be found in Xcode > Open Developer Tool > Instrument.

Step 2: Choose a benchmark suite.

We currently have four local benchmark candidates:

  • executor_benchmark in diem/executor
  • txn_bench in diem/language/benchmark
  • Arith and call benchmark in diem/language/benchmark

The first item is a comprehensive benchmark of diem adapter, executor and storage that generates a block of p2p transactions and tries to execute and commit it to the DiemDB in local storage. The second item is a benchmark of Diem adapter only with a fake executor and an in-memory storage that executes randomly generated p2p transactions. The third item, although it’s still invoking Diem adapter, is mostly testing on the MoveVM’s ability of handling simple arithmetic operations and call stacks.

Step 3: Select the running process in Instrument.

Open instrument and create a time profiler project.

Launch the benchmark target in the terminal, and select it in Instrument.

Step 4: Get analysis!

Here’s an example trace from running the benchmark

Dependencies

~30–46MB
~712K SLoC