Skip to content

Commit

Permalink
[benchunner] Fix typo to read error.reason from search response (#2139)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrodm authored Oct 3, 2024
1 parent f2526dc commit 7a08492
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions internal/benchrunner/runners/rally/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,6 @@ func (r *runner) installPackageFromPackageRoot(ctx context.Context) error {
RootPath: r.options.PackageRootPath,
SkipValidation: true,
})

if err != nil {
return fmt.Errorf("failed to initialize package installer: %w", err)
}
Expand Down Expand Up @@ -729,7 +728,6 @@ func (r *runner) runGenerator(destDir string) (uint64, error) {

// This seems to be the most performing way to calculate number of lines from an `io.Reader` (see: https://stackoverflow.com/a/52153000)
func countLine(r io.Reader) (uint64, error) {

var count uint64
const lineBreak = '\n'

Expand Down Expand Up @@ -1062,7 +1060,7 @@ func (r *runner) reindexData(ctx context.Context) error {

type searchResponse struct {
Error *struct {
Reason string `json:"reson"`
Reason string `json:"reason"`
} `json:"error"`
ScrollID string `json:"_scroll_id"`
Hits []struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/benchrunner/runners/system/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ func (r *runner) reindexData(ctx context.Context) error {

type searchResponse struct {
Error *struct {
Reason string `json:"reson"`
Reason string `json:"reason"`
} `json:"error"`
ScrollID string `json:"_scroll_id"`
Hits []struct {
Expand Down

0 comments on commit 7a08492

Please sign in to comment.