diff 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 (2014-04-16)
parents
children aefbe41fcf12
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/java/alice/test/codesegment/api/PutCodeSegment.java	Wed Apr 16 18:26:07 2014 +0900
@@ -0,0 +1,32 @@
+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();
+	}
+	
+
+}