rename Id -> ID to appease the linter

This commit is contained in:
William Banfield
2022-09-06 10:25:14 -04:00
parent 80c8b86553
commit b3a2c1d9bb
3 changed files with 8 additions and 8 deletions

View File

@@ -74,7 +74,7 @@ func main() {
"\tMinimum Latency: %s\n"+
"\tMaximum Latency: %s\n"+
"\tAverage Latency: %s\n"+
"\tStandard Deviation: %s\n\n", r.Id, r.Connections, r.Rate, r.Size, len(r.All), r.NegativeCount, r.Min, r.Max, r.Avg, r.StdDev)
"\tStandard Deviation: %s\n\n", r.ID, r.Connections, r.Rate, r.Size, len(r.All), r.NegativeCount, r.Min, r.Max, r.Avg, r.StdDev)
}
fmt.Printf("Total Invalid Tx: %d\n", rs.ErrorCount())
@@ -90,7 +90,7 @@ func toCSVRecords(rs []report.Report) [][]string {
res[0] = []string{"experiment_id", "duration_ns", "connections", "rate", "size"}
offset := 1
for _, r := range rs {
idStr := r.Id.String()
idStr := r.ID.String()
connStr := strconv.FormatInt(int64(r.Connections), 10)
rateStr := strconv.FormatInt(int64(r.Rate), 10)
sizeStr := strconv.FormatInt(int64(r.Size), 10)

View File

@@ -25,12 +25,12 @@ func TestRoundTrip(t *testing.T) {
testConns = 512
testRate = 4
)
testId := [16]byte(uuid.New())
testID := [16]byte(uuid.New())
b, err := payload.NewBytes(&payload.Payload{
Size: payloadSizeTarget,
Connections: testConns,
Rate: testRate,
Id: testId[:],
Id: testID[:],
})
if err != nil {
t.Fatalf("generating payload %s", err)
@@ -51,7 +51,7 @@ func TestRoundTrip(t *testing.T) {
if p.Rate != testRate {
t.Fatalf("payload rate value %d does not match expected %d", p.Rate, testRate)
}
if !bytes.Equal(p.Id, testId[:]) {
t.Fatalf("payload Id value %d does not match expected %d", p.Id, testId)
if !bytes.Equal(p.Id, testID[:]) {
t.Fatalf("payload ID value %d does not match expected %d", p.Id, testID)
}
}

View File

@@ -24,7 +24,7 @@ type BlockStore interface {
// Report contains the data calculated from reading the timestamped transactions
// of each block found in the blockstore.
type Report struct {
Id uuid.UUID
ID uuid.UUID
Rate, Connections, Size uint64
Max, Min, Avg, StdDev time.Duration
@@ -68,7 +68,7 @@ func (rs *Reports) addDataPoint(id uuid.UUID, l time.Duration, conns, rate, size
r = Report{
Max: 0,
Min: math.MaxInt64,
Id: id,
ID: id,
Connections: conns,
Rate: rate,
Size: size,