Introduce E2E fetch REST-API metrics

The E2E replication through the fetch REST-API
needs to be calculated from the client originating the call
where the initial ref-update happens.

Introduce a new end_2_end metric to track this latency.

When the pull replication is executed asynchronously,
the client originating the call propagates the timestamp
in an HTTP header (X-StartTimeNanos) and propagated
to the receiver side, which will use the initial time for
recording the final E2E replication time at the receiver
side.

Also add the pull-replication async integration tests
that were completely missing before: testing with async
replication is key for demonstrating that the E2E metrics
are working as expected.
Consequently, the TEST_REPLICATION_DELAY is reduced to
1 second for preventing the whole test suite to fail
for timeout.

TODO: Additional assertion on E2E metrics in sync and async
modes.

Change-Id: Ieb29e3475dc0938fe7700007b7d05a630c3c927f
16 files changed
tree: e9d1015942214067715bb1e39eddd5d2d22eb4cb
  1. src/
  2. BUILD
  3. Jenkinsfile
  4. LICENSE