view src/alice/test/codesegment/local/TestCodeSegment.java @ 196:caee170e6cfa working

use no convert put/update method
author e095732
date Tue, 12 Mar 2013 13:49:48 +0900
parents a8b0d44bbe68
children 2b28d3c16a58
line wrap: on
line source

package alice.test.codesegment.local;

import alice.codesegment.CodeSegment;
import alice.datasegment.CommandType;
import alice.datasegment.Receiver;

public class TestCodeSegment extends CodeSegment {
	
	static int count = 0;
	static long y =0;
	// create input datasegment arg1
	Receiver arg1 = ids.create(CommandType.PEEK);
	public TestCodeSegment(){
		arg1.setKey("key1");
	}
	public TestCodeSegment(int index){
		arg1.setKey("key1",index);
	}
	
	@Override
	public void run() {
		if(count > 100000){
			System.out.println(System.currentTimeMillis() - StartCodeSegment.t);
			//System.out.println(TestCodeSegment.y );
			System.exit(1);
		}
		//DataList list = arg1.asClass(DataList.class);
		//System.out.println(list.table);
		//System.out.println(arg1.val);
		//long u = System.currentTimeMillis();
		//int i = arg1.asInteger()+1;
		//TestCodeSegment.y +=( System.currentTimeMillis() - u); 
		ods.update("local", "key1", arg1.val);
		
		new TestCodeSegment();
		
		//new TestCodeSegment(arg1.index);
		
		count++;
		// DataSegment.get("local").update
		//ods.update("local", "key1", arg1.index);
		
	}

}