public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: swagiaal: StressTestJGMemory.java TestJGMemory.java; added files to git.
@ 2008-03-18 14:43 swagiaal
  0 siblings, 0 replies; only message in thread
From: swagiaal @ 2008-03-18 14:43 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  fda123e05e42be8f63e0cd344f42d4e4ce83ce72 (commit)
      from  dce689bb1f007f71609d223f8640332591297c8d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit fda123e05e42be8f63e0cd344f42d4e4ce83ce72
Author: Sami Wagiaalla <swagiaal@redhat.com>
Date:   Tue Mar 18 10:43:23 2008 -0400

    swagiaal: StressTestJGMemory.java TestJGMemory.java; added files to git.

-----------------------------------------------------------------------

Summary of changes:
 .../StressTestJGMemory.java}                       |   62 ++++++++------------
 .../TestJGMemory.java}                             |   43 ++++++++-----
 2 files changed, 51 insertions(+), 54 deletions(-)
 copy frysk-gui/frysk/gui/{monitor/actions/GenericAction.java => test/StressTestJGMemory.java} (73%)
 copy frysk-gui/frysk/gui/{monitor/datamodels/DataModelManager.java => test/TestJGMemory.java} (74%)

First 500 lines of diff:
diff --git a/frysk-gui/frysk/gui/monitor/actions/GenericAction.java b/frysk-gui/frysk/gui/test/StressTestJGMemory.java
similarity index 73%
copy from frysk-gui/frysk/gui/monitor/actions/GenericAction.java
copy to frysk-gui/frysk/gui/test/StressTestJGMemory.java
index fe11ab7..da925c5 100644
--- a/frysk-gui/frysk/gui/monitor/actions/GenericAction.java
+++ b/frysk-gui/frysk/gui/test/StressTestJGMemory.java
@@ -37,51 +37,39 @@
 // version and license this file solely under the GPL without
 // exception.
 
+package frysk.gui.test;
 
-package frysk.gui.monitor.actions;
+import org.gnu.glib.GObject;
+import org.gnu.gtk.DataColumnObject;
+import org.gnu.gtk.Gtk;
+import org.gnu.gtk.TreeIter;
+import org.gnu.gtk.TreeStore;
 
-import frysk.gui.monitor.GuiObject;
-import frysk.gui.monitor.ObservableLinkedList;
-import frysk.gui.monitor.observers.ObserverRoot;
+import frysk.sys.GarbageCollect;
 
-public abstract class GenericAction
-    extends Action
-{
+public class StressTestJGMemory extends GuiTestCase {
+    protected void setUp() throws Exception {
+	super.setUp();
+	Gtk.init(new String[] {});
+    }
 
-  public GenericAction ()
-  {
-    super();
-  }
+    public void testGslice() {
 
-  public GenericAction (String name, String toolTip)
-  {
-    super(name, toolTip);
-  }
+	for (int i = 0; i < 10000; i++){
+	    
+	    DataColumnObject dataColumnObject = new DataColumnObject();
+	    TreeStore treeStore = new TreeStore(
+		    new DataColumnObject[] { dataColumnObject });
 
-  public GenericAction (GenericAction other)
-  {
-    super(other);
-  }
+	    TreeIter treeIter = treeStore.appendRow(null);
 
-  public abstract void execute (ObserverRoot observer);
+	    treeIter = treeStore.getIter(treeIter.toString());
 
-  public GuiObject getCopy ()
-  {
-    return null;
-  }
+	    treeIter = null;
 
-  public boolean setArgument (String argument)
-  {
-    return false;
-  }
+	    GarbageCollect.run();
+	    GObject.collect();
 
-  public String getArgument ()
-  {
-    return null;
-  }
-
-  public ObservableLinkedList getArgumentCompletionList ()
-  {
-    return null;
-  }
+	}
+    }
 }
diff --git a/frysk-gui/frysk/gui/monitor/datamodels/DataModelManager.java b/frysk-gui/frysk/gui/test/TestJGMemory.java
similarity index 74%
copy from frysk-gui/frysk/gui/monitor/datamodels/DataModelManager.java
copy to frysk-gui/frysk/gui/test/TestJGMemory.java
index 412b667..4f2695e 100644
--- a/frysk-gui/frysk/gui/monitor/datamodels/DataModelManager.java
+++ b/frysk-gui/frysk/gui/test/TestJGMemory.java
@@ -37,26 +37,35 @@
 // version and license this file solely under the GPL without
 // exception.
 
-package frysk.gui.monitor.datamodels;
+package frysk.gui.test;
 
-/**
- * To promote sharing of DataModels this manager will keep track of
- * all DataModels so that they can be retrieved by TreeViews when
- * needed.
- * 
- * This is only for complicated, computationally heavy dataModels. for
- * light weight, simple models it is better to use the
- * ListView,ObservableLinkedList combination.
- */
-public class DataModelManager {
+import org.gnu.glib.GObject;
+import org.gnu.gtk.DataColumnObject;
+import org.gnu.gtk.Gtk;
+import org.gnu.gtk.TreeIter;
+import org.gnu.gtk.TreeStore;
 
-	public static DataModelManager theManager = new DataModelManager();
-	
+import frysk.sys.GarbageCollect;
+
+public class TestJGMemory extends GuiTestCase {
+    protected void setUp() throws Exception {
+	      super.setUp();
+	      Gtk.init(new String[]{});
+    }
+    
+    public void testGslice(){
+	DataColumnObject dataColumnObject = new DataColumnObject();
+	TreeStore treeStore = new TreeStore(new DataColumnObject[]{dataColumnObject});
+	    
+	    
+	TreeIter treeIter = treeStore.appendRow(null);
 	
-	public CoreDebugDataModel coreDebugDataModel;
+	treeIter = treeStore.getIter(treeIter.toString());
 	
-	DataModelManager(){
-		this.coreDebugDataModel = new CoreDebugDataModel();
-	}
+	treeIter = null;
 	
+	GarbageCollect.run();
+	GObject.collect();
+	        
+    }
 }


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-03-18 14:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-18 14:43 [SCM] master: swagiaal: StressTestJGMemory.java TestJGMemory.java; added files to git swagiaal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).