private void init() {
    mInstrumentation = new Instrumentation(this);
    if (mConfig.instrumentationEnabled) {
      mListener =
          new BaseImageListener() {

            @Override
            public void onSubmit(long id, @Nullable Object callerContext) {
              mInstrumentation.onStart();
            }

            @Override
            public void onFinalImageSet(
                long id,
                int imageOrigin,
                @Nullable ImageInfo imageInfo,
                @Nullable Drawable drawable) {
              mInstrumentation.onSuccess();
            }

            @Override
            public void onFailure(
                long id, @Nullable Drawable error, @Nullable Throwable throwable) {
              mInstrumentation.onFailure();
            }

            @Override
            public void onRelease(long id) {
              mInstrumentation.onCancellation();
            }
          };
    }
    VitoUtil.setBgColor(this, mConfig);
  }
{@link ImageView} with instrumentation and Vito utils.
samples/scrollperf/src/main/java/com/facebook/samples/scrollperf/instrumentation/InstrumentedVitoView.java