1 package org.objectweb.modfact.jmi.ps; 2 3 import javax.jmi.reflect.*; 4 import java.util.*; 5 6 7 12 public class TestMemoryLoad{ 13 14 public static void main(String [] args) throws Exception { 15 16 PersistantService pms = new PersistantService(); 17 18 Vector p = new Vector(); 19 RefPackage p2, p3, p4 = null; 20 int maxModels = 10; 21 22 PersistantHelper.printFreeMemory("before programm"); 23 24 25 31 32 33 PersistantHelper ph = new PersistantHelper(); 34 35 pms.load("THEXMLMODEL"); 37 PersistantHelper.printFreeMemory("after loadind the XML etamodel"); 38 39 for (int i = 0; i < maxModels; i++) { 41 pms.load("SIMPLE_TRL"); 42 PersistantHelper.printFreeMemory("after loadind the SIMPLE TRL metamodel " + i); 43 } 44 45 for (int i = 0; i < maxModels; i++) { 47 48 pms.store("SIMPLE_TRL"); 49 PersistantHelper.printFreeMemory("after writing the metamodel SIMPLE TRL " + i); 50 } 51 52 pms.store( "THEXMLMODE"); 54 PersistantHelper.printFreeMemory("after writing the metamodel XML MODEL"); 55 56 } 57 } 58 | Popular Tags |