@Test
public void testWriteReadMicrobenchmark() {

	Properties p = new Properties();
	p.setProperty(WorkerConfig.WORKER_IP, "");
	p.setProperty(WorkerConfig.MASTER_IP, "");
	p.setProperty(WorkerConfig.PROPERTIES_FILE, "");
	WorkerConfig wc = new WorkerConfig(p);
	
	DataReferenceManager drm = DataReferenceManager.makeDataReferenceManager(wc);
	Schema schema = SchemaBuilder.getInstance().newField(Type.LONG, "uid").newField(Type.LONG, "ts").build();
	DataStore dataStore = new DataStore(schema, DataStoreType.IN_MEMORY); // how to get this
	InetAddress whatever = null;
	try {
		whatever = InetAddress.getLocalHost();
	} catch (UnknownHostException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	ControlEndPoint endPoint = new ControlEndPoint(0, whatever.getHostAddress(), 0); // me
	DataReference dr = DataReference.makeManagedDataReference(dataStore, endPoint, ServeMode.STORE);
	
	
	// to write to
	OBuffer ob = drm.manageNewDataReference(dr);
	
	//Write this number of tuples
	int numTuplesToWrite = 3000000; // enough for around 30MB
	long uid = 1;
	long ts = 1;
	long startW = System.currentTimeMillis();
	for(int i = 0; i < numTuplesToWrite; i++) {
		byte[] ot1 = OTuple.create(schema, new String[]{"uid", "ts"}, new Object[]{uid,ts});
		ob.write(ot1, null);
		uid++;
		ts++;
	}
	long endW = System.currentTimeMillis();
	
	// Read everything and output to console
	IBuffer ib = drm.getInputBufferFor(dr);
	DatasetInputAdapter dia = new DatasetInputAdapter(wc, 0, ((Dataset)ib));
	long startR = System.currentTimeMillis();
	for(int i = 0; i < numTuplesToWrite; i++) {
		ITuple iTuple = dia.pullDataItem(100);
		long uid1 = iTuple.getInt("uid");
		long ts1 = iTuple.getLong("ts");
/			System.out.println("1- UID: " + uid1 + ", 2- TS: " + ts1);
	}
	long endR = System.currentTimeMillis();
	
	System.out.println("Time to write: " + (endW - startW));
	System.out.println("Time to read: " + (endR - startR));
}