Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Performance Testing using DTrace

Performance Testing using DTrace

Slides from the presentation given at CocoaHeads Berlin February 2018 meet up.

Renzo Crisóstomo

February 14, 2018
Tweet

More Decks by Renzo Crisóstomo

Other Decks in Programming

Transcript

  1. ASOCCIATIVE ARRAYS instr$target:::benchmark_begin { time = timestamp; tag = copyinstr(arg0);

    tag_times[tag] = time; } instr$target:::benchmark_end / tag_times[copyinstr(arg0)] != 0 / { tag = copyinstr(arg0); time = (timestamp - tag_times[tag]); printf("%s:%d\n", tag, time); }
  2. VARS > execname -> process name > pid -> current

    pid > timestamp -> nanoseconds > args[0]...[N] -> probe arguments > probemod -> probe module > probefunc -> probe function
  3. ORCHESTRATION 1. Prepare the software 2. Run the software 3.

    Run DTrace 4. Build performance report
  4. ORCHESTRATION 1. Prepare the software 2. Run the software 3.

    Run DTrace 4. Build performance report
  5. CLOSING > /usr/share/examples/DTTk > Lots of information out there! objc.io,

    Oracle, Apple, Facebook > Software instrumentation using the iOS Simulator is far from ideal > Run DTrace on your own systems and get surprised by what's happening!