Skip to content

Commit

Permalink
Slow down CPU test
Browse files Browse the repository at this point in the history
This should reduce the number of random false failures
  • Loading branch information
2kai2kai2 committed Feb 20, 2024
1 parent e3a0508 commit 2298f64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_cpu_basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ for (let i = 0; i < TRIALS; i++) {
// And do some extra computation to make sure we get more time.
let v = 1 + Math.random();
let u = '{"a": 1}';
for (let j = 0; j < 1000; j++) {
v = Math.hypot(v, Math.random(), Math.random());
for (let j = 0; j < 10000; j++) {
v = eval("Math.hypot(v, Math.random(), Math.random())");
let c = JSON.parse(u);
c[String.fromCharCode(97 + Math.floor(j * v) % 26)] = v;
u = JSON.stringify(c);
Expand Down

0 comments on commit 2298f64

Please sign in to comment.