public abstract class JRedisBenchmark.BenchmarkWorker extends Object implements Runnable
| Constructor and Description |
|---|
BenchmarkWorker(String host,
int port,
int db) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
prep()
anything that needs to be done to setup the calls -- typically all time consuming data setup tasks go here ...
|
void |
run()
1 - connects to the redis server
|
protected abstract void |
work()
Typically just a tight loop calling the redis server for the given test and using the data prep'd in
prep() |
public BenchmarkWorker(String host, int port, int db)
public void run()
1 - connects to the redis server
2 - calls the prep() -- subclasses will implement this
3 - waits for the mark signal to start the calls
4 - gets the sys time, and ..
5 - calls the work() method -- subclasses will implement this
6 - gets the sys time -- this is the time delta for this worker
7 - closes the connection, and signals completion to the benchmarker.
protected abstract void prep()
protected abstract void work()
prep()Copyright © 2009–2021. All rights reserved.