Investigating GemStone operation performance

This is a page that looks at measuring performance of GemStone operations .

Before running these setup the default session that you want to use, and run the next snippet to initialize it.

session := GtGemStoneSessionRegistry default defaultSession
  

Simple call

You can profile the snippet below to get an idea of the duration of a basic call

simpleObject := session evaluateAndWait: 'Object new'
  

This does 10 calls in a row and measures the time of each.

individualTimes := 10 timesCollect: [
	[ session evaluateAndWait: 'Object new' ] timeToRun ]
  

Inspecting objects

These are snippets for measuring the performance of inspecting objects. Here we work directly with a proxy to the object.

objectCodeToEvaluate := 'GtRemotePhlowDeclarativeTestInspectable new'
  
objectCodeToEvaluate := 'Object new'
  

First, we can make individual calls directly to the proxy object:

objectProxy := session evaluateAndWait: objectCodeToEvaluate
  

The views and the string are returned directly from the basic proxy object, which can result in several remote calls.

objectProxy declarativeViews
  
objectProxy gtInspectorTitleString
  

Second, we can group all calls made to show an inspector.

views := objectProxy declarativeViews.
objectProxy gtInspectorTitleString.
(views detect: [ :each | each methodSelector = #gtListFor:]) 
	retrieveItems: 1 fromIndex: 100
  

We can also get directly an inspector proxy and work with it.

inspectorProxy := objectProxy getInspectorProxyWithData
  
inspectorProxy getInspectorProxyWithData
  

Or we can just do the call to get data:

inspectorProxy getInspectorProxyRawData