[SERVER-27173] benchRun should print error in command path if 'showError: true' Created: 23/Nov/16  Updated: 06/Dec/22  Resolved: 11/May/20

Status: Closed
Project: Core Server
Component/s: Performance
Affects Version/s: 3.4.0-rc5
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Kyle Suarez Assignee: Backlog - Server Tooling and Methods (STM) (Inactive)
Resolution: Won't Fix Votes: 0
Labels: tig-benchrun
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Tooling & Methods
Participants:

 Description   

Currently, if a command is run by benchRun that returns {ok: 0}, we increment the error count but don't actually print out the error. Instead, we should conditionally report the error if the op specifies showError: true.

This would make developing and debugging new performance tests easier.



 Comments   
Comment by Ryan Timmons [ 11/May/20 ]

Closing as wont-fix to indicate that there is currently no intention of doing this. New performance workloads are advised to be written in genny rather than benchRun. Please re-open if there is priority for this. Perhaps this change could self-service by an appropriate server team if this is necessary rather than having to go thru the STM prioritization queue.

Comment by Kyle Suarez [ 23/Nov/16 ]

Note that nothing in the mongo-perf repository specifies showError in its ops, so some sort of option would have to be threaded through to modify the ops if we want this to be configurable in mongo-perf/benchrun.py as well.

Comment by Kyle Suarez [ 23/Nov/16 ]

Here is a proposed example:

diff --git a/src/mongo/shell/bench.cpp b/src/mongo/shell/bench.cpp
index 040002f..001b961 100644
--- a/src/mongo/shell/bench.cpp
+++ b/src/mongo/shell/bench.cpp
@@ -754,6 +754,10 @@ void BenchRunWorker::generateLoadOnConnection(DBClientBase* conn) {
                         }
                         if (!ok) {
                             stats.errCount++;
+                            if (op.showError) {
+                                log() << "Error detected in benchRun thread [command] : "
+                                      << result;
+                            }
                         }
 
                         if (!result["cursor"].eoo()) {

Generated at Thu Feb 08 04:14:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.