Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mahsayedsalem committed Apr 21, 2023
1 parent 38d2824 commit 7a38a40
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ This allows the user to control the aggressiveness of eviction by adjusting the

## Testing

There's a testing script to run the server, start the server in debug mode by running
```sh
$ RUST_LOG=debug cargo run --bin server_main
```

You can use `redis-cli` to test the server. Simple install `redis-cli` and you can set a key using:

```sh
Expand Down Expand Up @@ -120,22 +125,7 @@ use std::{thread, time};
fn main() {
println!("Started filling");

for i in 10..2000 {
let expiry = 10 * i;
let sleep_time = time::Duration::from_nanos(100);
thread::sleep(sleep_time);
let i = format!("nx{}", i.to_string());
Command::new("redis-cli")
.arg("set")
.arg(i.to_string())
.arg(i.to_string())
.arg("PX")
.arg(expiry.to_string())
.spawn()
.expect("ls command failed to start");
}

for i in 10..5000 {
for i in 10..7000 {
let expiry = 10 * i;
let sleep_time = time::Duration::from_nanos(100);
thread::sleep(sleep_time);
Expand Down

0 comments on commit 7a38a40

Please sign in to comment.