GitLabgitlab-org

cli

main
ply7 git calls36 ms97 KiB6 cachedprotocol v2
127 lines3.6 KiBRaw
1// Code generated by MockGen. DO NOT EDIT.
2// Source: gitlab.com/gitlab-org/cli/internal/git (interfaces: GitRunner)
3//
4// Generated by this command:
5//
6// mockgen -typed -destination=./git_runner.go -package=testing gitlab.com/gitlab-org/cli/internal/git GitRunner
7//
9// Package testing is a generated GoMock package.
10package testing
12import (
13 io "io"
14 reflect "reflect"
16 gomock "go.uber.org/mock/gomock"
19// MockGitRunner is a mock of GitRunner interface.
20type MockGitRunner struct {
21 ctrl *gomock.Controller
22 recorder *MockGitRunnerMockRecorder
23 isgomock struct{}
26// MockGitRunnerMockRecorder is the mock recorder for MockGitRunner.
27type MockGitRunnerMockRecorder struct {
28 mock *MockGitRunner
31// NewMockGitRunner creates a new mock instance.
32func NewMockGitRunner(ctrl *gomock.Controller) *MockGitRunner {
33 mock := &MockGitRunner{ctrl: ctrl}
34 mock.recorder = &MockGitRunnerMockRecorder{mock}
35 return mock
38// EXPECT returns an object that allows the caller to indicate expected use.
39func (m *MockGitRunner) EXPECT() *MockGitRunnerMockRecorder {
40 return m.recorder
43// Git mocks base method.
44func (m *MockGitRunner) Git(args ...string) (string, error) {
45 m.ctrl.T.Helper()
46 varargs := []any{}
47 for _, a := range args {
48 varargs = append(varargs, a)
49 }
50 ret := m.ctrl.Call(m, "Git", varargs...)
51 ret0, _ := ret[0].(string)
52 ret1, _ := ret[1].(error)
53 return ret0, ret1
56// Git indicates an expected call of Git.
57func (mr *MockGitRunnerMockRecorder) Git(args ...any) *MockGitRunnerGitCall {
58 mr.mock.ctrl.T.Helper()
59 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Git", reflect.TypeOf((*MockGitRunner)(nil).Git), args...)
60 return &MockGitRunnerGitCall{Call: call}
63// MockGitRunnerGitCall wrap *gomock.Call
64type MockGitRunnerGitCall struct {
65 *gomock.Call
68// Return rewrite *gomock.Call.Return
69func (c *MockGitRunnerGitCall) Return(arg0 string, arg1 error) *MockGitRunnerGitCall {
70 c.Call = c.Call.Return(arg0, arg1)
71 return c
74// Do rewrite *gomock.Call.Do
75func (c *MockGitRunnerGitCall) Do(f func(...string) (string, error)) *MockGitRunnerGitCall {
76 c.Call = c.Call.Do(f)
77 return c
80// DoAndReturn rewrite *gomock.Call.DoAndReturn
81func (c *MockGitRunnerGitCall) DoAndReturn(f func(...string) (string, error)) *MockGitRunnerGitCall {
82 c.Call = c.Call.DoAndReturn(f)
83 return c
86// GitWithIO mocks base method.
87func (m *MockGitRunner) GitWithIO(stdout, stderr io.Writer, args ...string) error {
88 m.ctrl.T.Helper()
89 varargs := []any{stdout, stderr}
90 for _, a := range args {
91 varargs = append(varargs, a)
92 }
93 ret := m.ctrl.Call(m, "GitWithIO", varargs...)
94 ret0, _ := ret[0].(error)
95 return ret0
98// GitWithIO indicates an expected call of GitWithIO.
99func (mr *MockGitRunnerMockRecorder) GitWithIO(stdout, stderr any, args ...any) *MockGitRunnerGitWithIOCall {
100 mr.mock.ctrl.T.Helper()
101 varargs := append([]any{stdout, stderr}, args...)
102 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GitWithIO", reflect.TypeOf((*MockGitRunner)(nil).GitWithIO), varargs...)
103 return &MockGitRunnerGitWithIOCall{Call: call}
106// MockGitRunnerGitWithIOCall wrap *gomock.Call
107type MockGitRunnerGitWithIOCall struct {
108 *gomock.Call
111// Return rewrite *gomock.Call.Return
112func (c *MockGitRunnerGitWithIOCall) Return(arg0 error) *MockGitRunnerGitWithIOCall {
113 c.Call = c.Call.Return(arg0)
114 return c
117// Do rewrite *gomock.Call.Do
118func (c *MockGitRunnerGitWithIOCall) Do(f func(io.Writer, io.Writer, ...string) error) *MockGitRunnerGitWithIOCall {
119 c.Call = c.Call.Do(f)
120 return c
123// DoAndReturn rewrite *gomock.Call.DoAndReturn
124func (c *MockGitRunnerGitWithIOCall) DoAndReturn(f func(io.Writer, io.Writer, ...string) error) *MockGitRunnerGitWithIOCall {
125 c.Call = c.Call.DoAndReturn(f)
126 return c
Diagnostics7 git calls · 36 ms
CallStatusSizeTime036 ms
discover200185 B2 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=2
git.response.bytes=185
git.server.agent=git/2.56.g1891de4-Linux
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch server-option object-format
git.server.fetch=shallow wait-for-done filter
git.protocol.version=2
git.pkt.frames=9
git.pkt.data=7
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=185
git.pkt.payload.max=35
ls-refs20058 KiB · hit2 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=2
git.response.bytes=59849
git.response.cache=HIT
git.response.duration_ms=2
git.protocol.version=2
git.pkt.frames=731
git.pkt.data=730
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=59849
git.pkt.payload.max=143
git.ls_refs.count=730
git.ls_refs.head=refs/heads/main
fetchtree:0 · deepen 1020032 KiB · hit2 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=32926
git.response.cache=HIT
git.response.duration_ms=2
git.fetch.filter=tree:0
git.fetch.wants=0dd7574dce9e385c5c30540e6c15657adc6bdce9
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=22
git.pkt.data=20
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=32926
git.pkt.payload.max=32046
git.sideband.band1.bytes=32046
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=80
git.pack.bytes=32046
git.pack.ofs_delta=36
git.pack.ref_delta=0
git.pack.chain.max=2
git.pack.trailer=cb0bad5d7ffc514895d8b21c4dd470327f90bc91
git.pack.full=44
Open pack map
fetchcombine:blob:none+tree:2 · deepen 12004.2 KiB · hit5 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=5
git.response.bytes=4273
git.response.cache=HIT
git.response.duration_ms=5
git.fetch.filter=combine:blob:none+tree:2
git.fetch.wants=0dd7574dce9e385c5c30540e6c15657adc6bdce9
git.fetch.haves.count=0
git.fetch.deepen=1
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=7
git.pkt.data=5
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=4273
git.pkt.payload.max=4173
git.sideband.band1.bytes=4173
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=11
git.pack.bytes=4173
git.fetch.wide.objects=11
git.fetch.wide.extra_bytes=3930
git.fetch.wide.blobs=0
fetchtree:0200510 B · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.bytes=510
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=tree:0
git.fetch.wants=a3147172443266d011121808a125248c5c915972
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=510
git.pkt.payload.max=483
git.sideband.band1.bytes=483
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=1
git.pack.bytes=483
git.pack.trailer=4ef234d86a93490a6a3da3549aa13a474a5c9eac
Open pack map
fetchtree:0200139 B · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.bytes=139
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=tree:0
git.fetch.wants=bae8523b334329289a070a1efc2e00836495e4cb
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=139
git.pkt.payload.max=112
git.sideband.band1.bytes=112
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=1
git.pack.bytes=112
git.pack.trailer=77e33730f8c85b9cb81b77b62c40acaa2aa7ccc2
Open pack map
fetch2001.0 KiB · hit23 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=23
git.response.bytes=1043
git.response.cache=HIT
git.response.duration_ms=23
git.fetch.wants=4a36f17a8ad096801ba242fb2fb8385989d61724
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=1043
git.pkt.payload.max=1016
git.sideband.band1.bytes=1016
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://gitlab.com/gitlab-org/cli
Ref
refs/heads/main
Commit
0dd7574dce9e385c5c30540e6c15657adc6bdce9
cf-ray
a5e12ff28c85a9fe
Request
2579c312…
Protocol
v2 · sha1
Agent
git/2.56.g1891de4-Linux
Filter
advertised
Fetch
shallow wait-for-done filter
Capabilities
agent ls-refs fetch server-option object-format