Skip to content

Commit

Permalink
gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
vdavid committed Dec 20, 2024
1 parent 48f2088 commit 0b136ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cmd/src/gateway_benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Examples:
}
fmt.Println("Benchmarking Sourcegraph instance:", *sgEndpoint)
headers := http.Header{
"Authorization": []string{"token " + *sgpToken},
"Authorization": []string{"token " + *sgpToken},
"X-Sourcegraph-Should-Trace": []string{"true"},
}
if *useSpecialHeader {
Expand All @@ -118,7 +118,7 @@ Examples:
fmt.Printf("Starting benchmark with %d requests per endpoint...\n", *requestCount)

var eResults []endpointResult
rResults := map[string][]requestResult {}
rResults := map[string][]requestResult{}
for name, clientOrURL := range endpoints {
durations := make([]time.Duration, 0, *requestCount)
rResults[name] = make([]requestResult, 0, *requestCount)
Expand Down Expand Up @@ -190,7 +190,7 @@ Examples:
}

type webSocketClient struct {
conn *websocket.Conn
conn *websocket.Conn
URL string
reqHeaders http.Header
respHeaders http.Header
Expand Down
4 changes: 2 additions & 2 deletions cmd/src/gateway_benchmark_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Examples:
}

// Output the results.
endpointResults := []endpointResult { cgResult, sgResult}
endpointResults := []endpointResult{cgResult, sgResult}
printResults(endpointResults, requestCount)
if *csvOutput != "" {
if err := writeResultsToCSV(*csvOutput, endpointResults, requestCount); err != nil {
Expand All @@ -96,7 +96,7 @@ Examples:
fmt.Printf("\nAggregate results exported to %s\n", *csvOutput)
}
if *requestLevelCsvOutput != "" {
if err := writeRequestResultsToCSV(*requestLevelCsvOutput, map[string][]requestResult { "gateway": cgRequestResults, "sourcegraph": sgRequestResults}); err != nil {
if err := writeRequestResultsToCSV(*requestLevelCsvOutput, map[string][]requestResult{"gateway": cgRequestResults, "sourcegraph": sgRequestResults}); err != nil {
return fmt.Errorf("failed to export CSV: %v", err)
}
fmt.Printf("\nRequest-level results exported to %s\n", *requestLevelCsvOutput)
Expand Down

0 comments on commit 0b136ed

Please sign in to comment.