[go: up one dir, main page]

Add HTTP clone analyzer

Part of #1737 (closed)

This will let us measure GitLab clone performance from the client perspective, taking into account the network pipe, but ignoring git index-pack performance of the client, and not wasting client disk space.

The idea is to eventually grow this into using structured logging and/or emitting prometheus metrics.

Example output:

% 	./gitaly-debug analyze-http-clone https://gitlab.com/gitlab-org/gitaly.git
---
--- GET https://gitlab.com/gitlab-org/gitaly.git/info/refs?service=git-upload-pack
---
response after 693.648996ms
response header: map[Cache-Control:[no-cache] Content-Type:[application/x-git-upload-pack-advertisement] Date:[Wed, 03 Jul 2019 10:56:54 GMT] Referrer-Policy:[strict-origin-when-cross-origin] Server:[nginx] Strict-Transport-Security:[max-age=31536000]]
HTTP status code 200
first packet 693.763408ms
received 2056 packets
done in 1.03407357s
payload data: 140242 bytes
received 2053 refs, selected 684 wants
---
--- POST https://gitlab.com/gitlab-org/gitaly.git/git-upload-pack
---
response after 522.950715ms
response header: map[Cache-Control:[no-cache] Content-Type:[application/x-git-upload-pack-result] Date:[Wed, 03 Jul 2019 10:56:55 GMT] Referrer-Policy:[strict-origin-when-cross-origin] Server:[nginx] Strict-Transport-Security:[max-age=31536000]]
HTTP status code 200
received NAK after 523.089551ms
received first progress packet after 523.099073ms
received first pack packet after 774.231601ms
.......................
received 2480 packets
done in 3.25881456s
    pack band:   18646403 payload bytes,   2278 packets
progress band:       8411 payload bytes,    200 packets
   error band:          0 payload bytes,      0 packets
packet payload size histogram: map[1:1 34:1 36:1 38:3 39:29 40:66 41:7 42:83 43:2 47:1 54:1 78:1 82:1 84:4 1411:1 8191:1 8192:2275]
Edited by GitLab Release Tools Bot

Merge request reports

Loading