Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
lzchen authored Aug 21, 2024
2 parents 88b26f8 + 6e1429e commit 0f98f48
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1043,14 +1043,15 @@ def collect_and_validate(values, histogram) -> None:
# run this test case with the same values used in a previous execution,
# check the value printed by that previous execution of this test case
# and use the same value for the seed variable in the line below.
# seed = 4539544373807492135
# seed = 3373389994391084876

random_generator = Random(seed)
print(f"seed for {currentframe().f_code.co_name} is {seed}")

values = []
for i in range(2000):
value = random_generator.randint(0, 1000)
# avoid both values being 0
value = random_generator.randint(0 if i else 1, 1000)
values.append(value)
histogram.aggregate(Measurement(value, Mock()))
if i % 20 == 0:
Expand Down

0 comments on commit 0f98f48

Please sign in to comment.