Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
ada70c7c
Commit
ada70c7c
authored
Jul 14, 2016
by
antirez
Browse files
LFU simulator: remove dead code.
parent
fc92c667
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/lru/lfu-simulation.c
View file @
ada70c7c
...
@@ -108,11 +108,6 @@ int main(void) {
...
@@ -108,11 +108,6 @@ int main(void) {
* 'switch_after' seconds. Then revert to flat access pattern. */
* 'switch_after' seconds. Then revert to flat access pattern. */
if
(
now
-
start
<
switch_after
)
{
if
(
now
-
start
<
switch_after
)
{
/* Power law. */
/* Power law. */
#if 0
idx = keyspace_size;
while(rand() % 2 && idx > 1) idx /= 2;
idx = rand() % idx;
#endif
idx
=
1
;
idx
=
1
;
while
((
rand
()
%
21
)
!=
0
&&
idx
<
keyspace_size
)
idx
*=
2
;
while
((
rand
()
%
21
)
!=
0
&&
idx
<
keyspace_size
)
idx
*=
2
;
if
(
idx
>
keyspace_size
)
idx
=
keyspace_size
;
if
(
idx
>
keyspace_size
)
idx
=
keyspace_size
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment