# Introduction

This project is first started as a standalone project. It's now merged into the dbaas codebase.

The Makefile and commands is left for better debugging the project alone with dbaas systems.

# Instructions

## Monkey testing server
The monkey testing server is used as a mock server, which can drop TCP packets on demand.
It can provide a convenient way for manual testing the conditions when network connection to the agent is not working.

```bash
$ go run main.go monkey  # starts the monkey testing server
$ drop 10  # tell the monkey server to drop TCP traffic in the next 10s
```

## Unit Test
```bash
$ make test
```

## Benchmark Test
```bash
# benchmark all
$ make bench
# get profile
$ go test -benchmem -bench=".*Evict" -cpuprofile=cpu.profile -memprofile=mem.profile ./...
```
