Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interop: improve rpc_soak and channel_soak test to cover concurrency in Go #7926

Merged
merged 45 commits into from
Jan 9, 2025
Merged
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
fd83eee
Improve the rpc soak test and channel soak test to cover concurrency …
zbilun Dec 12, 2024
0bbe38b
Remove .idea/ directory from Git tracking
zbilun Dec 12, 2024
219e17e
Fix the style issue
zbilun Dec 12, 2024
ead030a
Remove .idea/ from .gitignore
zbilun Dec 12, 2024
cbddddc
Add .gitignore file
zbilun Dec 12, 2024
be47357
fix channel close issue
zbilun Dec 12, 2024
bfd1b8e
Stop tracking .idea directory
zbilun Dec 12, 2024
3929ecf
Fix the comments style.
zbilun Dec 13, 2024
742ed86
Fix the go style issues.
zbilun Dec 17, 2024
9fdcd56
Fix the go style issues about the space.
zbilun Dec 17, 2024
b718300
Debug for test failure.
zbilun Dec 17, 2024
2df82f8
Replace long parameter lists with struct for cleaner code.
zbilun Dec 17, 2024
2d72173
Clean code by deleting useless comments.
zbilun Dec 17, 2024
a0a3ae2
Fix the test fail
zbilun Dec 17, 2024
957c1b4
Fix the format check
zbilun Dec 17, 2024
67948ce
Fix the p.addr
zbilun Dec 17, 2024
f03b6fe
Change the addrStr back due to the print type issue.
zbilun Dec 17, 2024
f621f31
Clean comments.
zbilun Dec 17, 2024
2204ae8
Add print message.
zbilun Dec 17, 2024
ca86c16
Debug the test fail
zbilun Dec 18, 2024
22c5544
Duplicate print error
zbilun Dec 18, 2024
04282c5
Refactor the doSoakTest func.
zbilun Dec 18, 2024
959c594
Clean comments.
zbilun Dec 18, 2024
895af05
Clean empty line.
zbilun Dec 18, 2024
262b98e
Address the second round comments.
zbilun Dec 29, 2024
1282e49
Fix the format issues.
zbilun Dec 29, 2024
5ef8eca
Fix the naming check.
zbilun Dec 29, 2024
64fc618
Remove .gitignore file from repository
zbilun Dec 29, 2024
85e2438
Refactor the common config.
zbilun Dec 30, 2024
0395c79
Clean comments.
zbilun Dec 30, 2024
8d9fb6b
Clean comments.
zbilun Jan 8, 2025
63e8250
Fix check issues.
zbilun Jan 8, 2025
9c60ca8
Improve latency handling and clean comments.
zbilun Jan 8, 2025
c0d6238
Update latency var name.
zbilun Jan 8, 2025
24a233a
Clean comments.
zbilun Jan 8, 2025
5ef9068
Refactor the big files.
zbilun Jan 9, 2025
f680c8f
Add copyrights.
zbilun Jan 9, 2025
f4cfaf9
Modify copyrights.
zbilun Jan 9, 2025
eacc6e0
Modify imports.
zbilun Jan 9, 2025
ca01d13
Clean comments.
zbilun Jan 9, 2025
8265b0b
Clean comments.
zbilun Jan 9, 2025
76bfa65
Address comments.
zbilun Jan 9, 2025
51b457d
Modify time.After limitaion.
zbilun Jan 9, 2025
3c8b2f4
Revert wrong changes.
zbilun Jan 9, 2025
823ae79
Clean code.
zbilun Jan 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Debug for test failure.
zbilun committed Dec 17, 2024
commit b7183008c25b9baec195d47eb9a8d25d1c847123
17 changes: 13 additions & 4 deletions interop/test_utils.go
Original file line number Diff line number Diff line change
@@ -802,13 +802,20 @@ func executeSoakTestInThread(
soakRequestSize,
soakResponseSize,
[]grpc.CallOption{grpc.Peer(&p)})
addrStr := "nil"
if p.Addr != nil {
fmt.Fprintf(os.Stderr, "Peer address: %q\n", p.Addr)
addrStr = p.Addr.String()
} else {
fmt.Fprintf(os.Stderr, "No peer address available for this RPC.\n")
}
//if p.Addr != nil {
// fmt.Fprintf(os.Stderr, "Peer address: %q\n", p.Addr)
//} else {
// fmt.Fprintf(os.Stderr, "No peer address available for this RPC.\n")
//}
if err != nil {
fmt.Fprintf(os.Stderr, "Thread %d: soak iteration: %d elapsed_ms: %d peer: %q server_uri: %s failed: %s\n", threadID, i, 0, p.Addr, serverAddr, err)
fmt.Fprintf(os.Stderr, "Thread %d: soak iteration: %d elapsed_ms: %d peer: %s server_uri: %s failed: %s\n", threadID, i, 0, addrStr, serverAddr, err)
//fmt.Fprintf(os.Stderr, "Thread %d: soak iteration: %d elapsed_ms: %d peer: %q server_uri: %s failed: %s\n", threadID, i, 0, p.Addr, serverAddr, err)
mu.Lock()
zbilun marked this conversation as resolved.
Show resolved Hide resolved
threadResults.Failures++
mu.Unlock()
@@ -817,7 +824,8 @@ func executeSoakTestInThread(
}
latencyMs := result.LatencyMs
if latencyMs > perIterationMaxAcceptableLatency.Milliseconds() {
fmt.Fprintf(os.Stderr, "Thread %d: soak iteration: %d elapsed_ms: %d peer: %q server_uri: %s exceeds max acceptable latency: %d\n", threadID, i, latencyMs, p.Addr, serverAddr, perIterationMaxAcceptableLatency.Milliseconds())
fmt.Fprintf(os.Stderr, "Thread %d: soak iteration: %d elapsed_ms: %d peer: %s server_uri: %s exceeds max acceptable latency: %d\n", threadID, i, latencyMs, addrStr, serverAddr, perIterationMaxAcceptableLatency.Milliseconds())
//fmt.Fprintf(os.Stderr, "Thread %d: soak iteration: %d elapsed_ms: %d peer: %q server_uri: %s exceeds max acceptable latency: %d\n", threadID, i, latencyMs, p.Addr, serverAddr, perIterationMaxAcceptableLatency.Milliseconds())
mu.Lock()
threadResults.Failures++
mu.Unlock()
@@ -829,7 +837,8 @@ func executeSoakTestInThread(
threadResults.Latencies.Add(latencyMs)
threadResults.IterationsDone++
mu.Unlock()
fmt.Fprintf(os.Stderr, "Thread %d: soak iteration: %d elapsed_ms: %d peer: %q server_uri: %s succeeded\n", threadID, i, latencyMs, p.Addr, serverAddr)
fmt.Fprintf(os.Stderr, "Thread %d: soak iteration: %d elapsed_ms: %d peer: %s server_uri: %s succeeded\n", threadID, i, latencyMs, addrStr, serverAddr)
//fmt.Fprintf(os.Stderr, "Thread %d: soak iteration: %d elapsed_ms: %d peer: %q server_uri: %s succeeded\n", threadID, i, latencyMs, p.Addr, serverAddr)
<-earliestNextStart
}
}