MCPcopy Create free account
hub / github.com/cli/cli / RecordOperations

Method RecordOperations

internal/attachments/telemetry.go:41–50  ·  view source on GitHub ↗

RecordOperations replaces, rather than adds to, the completed operation counts. Pass partial results before handling an upload error so successful work is retained. A nil event, returned by Begin for zero attachments, is a no-op.

(result UploadResult)

Source from the content-addressed store, hash-verified

39// Pass partial results before handling an upload error so successful work is retained.
40// A nil event, returned by Begin for zero attachments, is a no-op.
41func (e *TelemetryEvent) RecordOperations(result UploadResult) {
42 if e == nil {
43 return
44 }
45
46 e.pendingEvent.UpsertMeasures(ghtelemetry.Measures{
47 "append_ops_count": int64(result.AppendOperations),
48 "replace_ops_count": int64(result.ReplaceOperations),
49 })
50}

Callers 6

createRunFunction · 0.80
editRunFunction · 0.80
bodyForWriteFunction · 0.80
submitPRFunction · 0.80
editRunFunction · 0.80
TestAttachmentTelemetryFunction · 0.80

Calls 1

UpsertMeasuresMethod · 0.65

Tested by 1

TestAttachmentTelemetryFunction · 0.64