Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

fix: clean up / fix ClientCount logic #1175

Merged
merged 1 commit into from
Jan 9, 2020
Merged

fix: clean up / fix ClientCount logic #1175

merged 1 commit into from
Jan 9, 2020

Conversation

mr-salty
Copy link
Contributor

@mr-salty mr-salty commented Jan 9, 2020

Removes the workaround for #1000 from the multiple rows benchmark.

Since we're no longer adjusting min, and the Config class already validates
min_clients <= max_clients we no longer need to do it here.

Fixes two small bugs in the existing code (AFAICT):

  • ClientCount would usually (always?) return min_clients because
    min_clients <= max_clients is generally true.
  • No need to subtract 1 from max_clients when generating a random number.

This change is Reviewable

@mr-salty mr-salty requested a review from coryan January 9, 2020 00:17
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 9, 2020
@codecov
Copy link

codecov bot commented Jan 9, 2020

Codecov Report

Merging #1175 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1175      +/-   ##
=========================================
+ Coverage   95.66%   95.7%   +0.04%     
=========================================
  Files         175     175              
  Lines       13536   13535       -1     
=========================================
+ Hits        12949   12954       +5     
+ Misses        587     581       -6
Impacted Files Coverage Δ
...nner/benchmarks/single_row_throughput_benchmark.cc 93.53% <100%> (+0.42%) ⬆️
.../spanner/benchmarks/multiple_rows_cpu_benchmark.cc 93.05% <100%> (+0.18%) ⬆️
...ud/spanner/integration_tests/client_stress_test.cc 81.57% <0%> (-1.76%) ⬇️
...anner/integration_tests/client_integration_test.cc 98.47% <0%> (-0.01%) ⬇️
google/cloud/spanner/keys.h 100% <0%> (ø) ⬆️
google/cloud/spanner/internal/transaction_impl.h 100% <0%> (ø) ⬆️
google/cloud/spanner/value.h 92.8% <0%> (+0.1%) ⬆️
google/cloud/spanner/samples/samples.cc 86.44% <0%> (+0.28%) ⬆️
google/cloud/spanner/client.cc 97.41% <0%> (+0.86%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 620bb7c...4582211. Read the comment docs.

Copy link
Contributor

@coryan coryan left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Removes the workaround for #1000 from the multiple rows benchmark.

Since we're no longer adjusting min, and the `Config` class already validates
`min_clients <= max_clients` we no longer need to do it here.

Fixes two small bugs in the existing code (AFAICT):

* `ClientCount` would usually (always?) return `min_clients` because
  `min_clients <= max_clients` is generally true.
* No need to subtract 1 from `max_clients` when generating a random number.
@mr-salty mr-salty merged commit fbdab30 into googleapis:master Jan 9, 2020
@mr-salty mr-salty deleted the bm_min branch January 9, 2020 20:59
devjgm pushed a commit to devjgm/google-cloud-cpp that referenced this pull request May 7, 2020
…anner#1175)

* fix: clean up / fix ClientCount logic

Removes the workaround for googleapis/google-cloud-cpp-spanner#1000 from the multiple rows benchmark.

Since we're no longer adjusting min, and the `Config` class already validates
`min_clients <= max_clients` we no longer need to do it here.

Fixes two small bugs in the existing code (AFAICT):

* `ClientCount` would usually (always?) return `min_clients` because
  `min_clients <= max_clients` is generally true.
* No need to subtract 1 from `max_clients` when generating a random number.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants