self-instrumentation in latency measurements