gh-116576: Fix `Tools/scripts/sortperf.py` sorting the same list (#116577)

This commit is contained in:
Nikita Sobolev 2024-03-11 09:38:04 +03:00 committed by GitHub
parent 2339e7cff7
commit 4704e55a71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -130,7 +130,8 @@ class Benchmark:
def _prepare_data(self, loops: int) -> list[float]:
bench = BENCHMARKS[self._name]
return [bench(self._size, self._random)] * loops
data = bench(self._size, self._random)
return [data.copy() for _ in range(loops)]
def add_cmdline_args(cmd: list[str], args) -> None: