public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
From: swagiaal@sourceware.org
To: frysk-cvs@sourceware.org
Subject: [SCM]  master: swagiaal: StressTestJGMemory.java TestJGMemory.java; added files to git.
Date: Tue, 18 Mar 2008 14:43:00 -0000	[thread overview]
Message-ID: <20080318144351.19980.qmail@sourceware.org> (raw)

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


                 reply	other threads:[~2008-03-18 14:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080318144351.19980.qmail@sourceware.org \
    --to=swagiaal@sourceware.org \
    --cc=frysk-cvs@sourceware.org \
    --cc=frysk@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).