From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20402 invoked by alias); 18 Mar 2008 14:43:55 -0000 Received: (qmail 19995 invoked by uid 9561); 18 Mar 2008 14:43:51 -0000 Date: Tue, 18 Mar 2008 14:43:00 -0000 Message-ID: <20080318144351.19980.qmail@sourceware.org> From: swagiaal@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: swagiaal: StressTestJGMemory.java TestJGMemory.java; added files to git. X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: dce689bb1f007f71609d223f8640332591297c8d X-Git-Newrev: fda123e05e42be8f63e0cd344f42d4e4ce83ce72 Mailing-List: contact frysk-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-cvs-owner@sourceware.org Reply-To: frysk@sourceware.org X-SW-Source: 2008-q1/txt/msg00397.txt.bz2 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 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