view src/main/java/alice/test/codesegment/api/PutCodeSegment.java @ 345:8f71c3e6f11d

Change directory structure Maven standard
author sugi
date Wed, 16 Apr 2014 18:26:07 +0900
parents
children aefbe41fcf12
line wrap: on
line source

package alice.test.codesegment.api;

import alice.codesegment.CodeSegment;

public class PutCodeSegment extends CodeSegment{
	
	private static int count = 0;
	
	@Override
	public synchronized void run() {
		
		int[] array = new int[1000];
		for (int i = 0;i< 999; i++)
			array[i] = i;
		
		if (count % 10 == 0)
			System.out.println((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1024 / 1024 + "MB");
		if (count >= 10000000) {
			System.exit(0);
		}
		ods.put("local", "num", array);
		count++;
		try {
			wait(100);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		new PutCodeSegment().execute();
	}
	

}