Add git pull test to the Performance Toolkit
Added test for git pull
based on https://git-scm.com/book/en/v2/Git-Internals-Transfer-Protocols#_downloading_data and https://gitlab.com/gitlab-org/gitaly/blob/master/cmd/gitaly-debug/analyzehttp.go
Git pull process details
When user calls git pull
to download data, the fetch-pack
and upload-pack
processes are involved. The client initiates a fetch-pack
process that connects to an upload-pack
process on the remote side to negotiate what data will be transferred down:
- The first request is a GET to the repository:
GET /qa-perf-testing/gitlabhq.git/info/refs?service=git-upload-pack HTTP/1.1
Host: localhost
Accept: */*
Accept-Encoding: deflate, gzip
Pragma: no-cache
Response example:
001e# service=git-upload-pack
000000fa691d88b71d51786983b823207d876cee7c93f5d4 HEADmulti_ack thin-pack side-band side-band-64k ofs-delta shallow deepen-since deepen-not deepen-relative no-progress include-tag multi_ack_detailed no-done symref=HEAD:refs/heads/master agent=git/2.22.0
0050eedcd0db2cbc11f683f152ef61a9b9a266563eff refs/heads/1-1-auto-deploy-0000001
(...)
- The second request to pull objects that
fetch-pack
process needs by sending “want” and then the SHA-1 it wants:
POST /qa-perf-testing/gitlabhq.git/git-upload-pack HTTP/1.1
Host: localhost
Accept: application/x-git-upload-pack-result
Content-Type: application/x-git-upload-pack-request
Accept-Encoding: deflate, gzip
0054want 691d88b71d51786983b823207d876cee7c93f5d4 multi_ack side-band-64k ofs-delta\n
0032have eedcd0db2cbc11f683f152ef61a9b9a266563eff\n
00000009done\n
Additional info: pkt-line format should be used for body.
The response to this request indicates success or failure, and includes the packfile.
Relates to #44 (closed)
Edited by Nailia Iskhakova (OOO)