Skip to content

Conversation

@oleg-jukovec
Copy link
Collaborator

@oleg-jukovec oleg-jukovec commented Oct 27, 2025

Existing benchmarks are no longer relevant - no one knows what they're testing. Instead, benchmarks have been added for the following metrics:

  • Number of allocations.
  • RPS on synchronous and asynchronous modes.

The pull request also attempts to fix flaky tests found.

@oleg-jukovec oleg-jukovec force-pushed the oleg-jukovec/perf-tests branch 3 times, most recently from 6008328 to a95a5cd Compare October 27, 2025 15:28
b.Errorf("Failed to replace: %s", err)
}
rps := float64(requests) / duration.Seconds()
fmt.Println("requests :", requests) // nolint
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use t.Log/t.Logf instead of fmt.Println here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, thank you.

}
}
}()
_, err := conns[0].Replace(spaceNo, []interface{}{uint(1111), "hello", "world"})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not use deprecated APIs in new/modified benches

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

// TestPerformance is a benchmark for the async API that is unable to implement
// with a Go-benchmark. It can be used to test performance with different
// numbers of connections and processing goroutines.
func TestBenchmarkAsync(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not strongly agains that kind of "bench", but i'd suggest it to be t.Skip()ped by default, only run it in case of CLI argument is provided.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpicking: we can configure this bench using CLI flags too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added t.Skip().

// TestPerformance is a benchmark for the async API that is unable to implement
// with a Go-benchmark. It can be used to test performance with different
// numbers of connections and processing goroutines.
func TestBenchmarkAsync(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer this test to be separated from usual integration tests (for example - in other file). The same thing applies to usual benches, but again - no prio.

Copy link
Collaborator Author

@oleg-jukovec oleg-jukovec Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer consistency across the project. All integration tests requiring Tarantool are located in tarantool_test.go , let's benchmarks will lead the logic too.

Existing benchmarks are no longer relevant - no one knows what they're
testing. Instead, benchmarks have been added for the following
metrics:

* Number of allocations.
* RPS on synchronous and asynchronous modes.
@oleg-jukovec oleg-jukovec force-pushed the oleg-jukovec/perf-tests branch from a95a5cd to 334beab Compare November 3, 2025 08:34
@oleg-jukovec oleg-jukovec requested a review from bigbes November 3, 2025 08:36
It should help to fix flaky tests on CI.
It seems that a connection's file descriptor is not always fully ready
after the connection is created. The hack helps to avoid the "bad file
descriptor" flaky errors for the test.
@oleg-jukovec oleg-jukovec force-pushed the oleg-jukovec/perf-tests branch from f6fd089 to 683d1e4 Compare November 3, 2025 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants