File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
pkg/kv/kvserver/asim/history Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 1
1
echo
2
2
----
3
3
An example that the thrashing percentage can arbitarily exceed 200%.
4
- input: [0 0.3090169943749474 0.5877852522924731 0.8090169943749475 0.9510565162951535 1 0.9510565162951536 0.8090169943749475 0.5877852522924732 0.3090169943749475 1.2246467991473515e-16 -0.3090169943749469 -0.587785252292473 -0.8090169943749473 -0.9510565162951535 -1 -0.9510565162951536 -0.8090169943749476 -0.5877852522924732 -0.3090169943749476 -2.449293598294703e-16 0.3090169943749472 0.5877852522924722 0.8090169943749472 0.9510565162951535 1 0.9510565162951538 0.8090169943749476 0.5877852522924734 0.3090169943749478 3.6739403974420544e-16 -0.30901699437494706 -0.5877852522924728 -0.8090169943749472 -0.9510565162951534 -1 -0.9510565162951538 -0.8090169943749477 -0.5877852522924735 -0.3090169943749479 -4.898587196589406e-16 0.30901699437494523 0.5877852522924728 0.8090169943749471 0.9510565162951529 1 0.9510565162951538 0.8090169943749468 0.5877852522924737 0.30901699437494967 6.123233995736757e-16 -0.3090169943749451 -0.5877852522924726 -0.8090169943749481 -0.9510565162951534 -1 -0.9510565162951539 -0.8090169943749489 -0.5877852522924737 -0.3090169943749498 -7.347880794884109e-16 0.3090169943749484 0.5877852522924725 0.809016994374948 0.9510565162951533 1 0.9510565162951539 0.809016994374949 0.5877852522924738 0.3090169943749465 8.57252759403146e-16 -0.3090169943749483 -0.5877852522924724 -0.8090169943749458 -0.9510565162951533 -1 -0.9510565162951539 -0.809016994374947 -0.5877852522924739 -0.3090169943749467 -9.797174393178812e-16 0.3090169943749448 0.5877852522924695 0.8090169943749479 0.9510565162951533 1 0.951056516295154 0.809016994374949 0.5877852522924769 0.3090169943749468 1.1021821192326163e-15 -0.3090169943749447 -0.5877852522924722 -0.8090169943749458 -0.9510565162951543 -1 -0.951056516295154 -0.8090169943749491 -0.587785252292477 -0.3090169943749469]
4
+ input: [0 0.309017 0.587785 0.809017 0.951057 1 0.951057 0.809017 0.587785 0.309017 0 -0.309017 -0.587785 -0.809017 -0.951057 -1 -0.951057 -0.809017 -0.587785 -0.309017 -0 0.309017 0.587785 0.809017 0.951057 1 0.951057 0.809017 0.587785 0.309017 0 -0.309017 -0.587785 -0.809017 -0.951057 -1 -0.951057 -0.809017 -0.587785 -0.309017 -0 0.309017 0.587785 0.809017 0.951057 1 0.951057 0.809017 0.587785 0.309017 0 -0.309017 -0.587785 -0.809017 -0.951057 -1 -0.951057 -0.809017 -0.587785 -0.309017 -0 0.309017 0.587785 0.809017 0.951057 1 0.951057 0.809017 0.587785 0.309017 0 -0.309017 -0.587785 -0.809017 -0.951057 -1 -0.951057 -0.809017 -0.587785 -0.309017 -0 0.309017 0.587785 0.809017 0.951057 1 0.951057 0.809017 0.587785 0.309017 0 -0.309017 -0.587785 -0.809017 -0.951057 -1 -0.951057 -0.809017 -0.587785 -0.309017]
5
5
1.00 ┤ ╭╮ ╭╮ ╭╮ ╭╮ ╭─╮
6
6
0.80 ┤╭╯│ ╭╯│ ╭╯│ ╭╯│ │ │
7
7
0.60 ┤│ ╰╮ │ ╰╮ │ ╰╮ │ │ │ │
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ import (
24
24
func tsFromFunc (ticks int , f func (tick int ) float64 ) []float64 {
25
25
vs := make ([]float64 , ticks )
26
26
for i := 0 ; i < ticks ; i ++ {
27
- vs [i ] = f (i )
27
+ vs [i ] = math . Round ( f (i )* 1e6 ) / 1e6
28
28
}
29
29
return vs
30
30
}
You can’t perform that action at this time.
0 commit comments