Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-7685

Fix invalid values and units for latencies in workgen

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.0, WT10.0.1, 4.4.8, 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • 1
    • Storage - Ra 2021-06-28

      In workgen.cxx, read/insert/update operation latencies are compared to thresholds defined by max_latency. However, only the read latencies are retrieved. Finally, the unit of max_latency is in ms while the read/insert/update are in us.

      Suggested fix:

      diff --git a/bench/workgen/workgen.cxx b/bench/workgen/workgen.cxx
      index cc2c93d3f..118cc1902 100644
      --- a/bench/workgen/workgen.cxx
      +++ b/bench/workgen/workgen.cxx
      @@ -415,7 +415,7 @@ int Monitor::run() {
           char time_buf[64], version[100];
           Stats prev_totals;
           WorkloadOptions *options = &_wrunner._workload->options;
      -    uint64_t latency_max = (uint64_t)options->max_latency;
      +    uint64_t latency_max = (uint64_t)options->max_latency * THOUSAND;
           size_t buf_size;
           bool first;
       
      @@ -548,8 +548,8 @@ int Monitor::run() {
               }
       
               uint64_t read_max = interval.read.max_latency;
      -        uint64_t insert_max = interval.read.max_latency;
      -        uint64_t update_max = interval.read.max_latency;
      +        uint64_t insert_max = interval.insert.max_latency;
      +        uint64_t update_max = interval.update.max_latency;

       

            Assignee:
            etienne.petrel@mongodb.com Etienne Petrel
            Reporter:
            etienne.petrel@mongodb.com Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: