Jim Roberson recently published a scaling test of Seaside on VW7.6
Now I wanted to show, that you can write a stress tester on your own in ObjectStudio.
For this, you don’t even need ObjectStudio8. We make use if an OLE objectcomponent ‘MSXML2.XMLHTTP’

Let’s assume we have a controller with 3 entry fields.

  • one for the URL
  • one for the number of iterations
  • one for the delay between the calls

During the openInitialization we instantiate the OLE object and get the dispatcher

http := (OLEObject newLongTypeName: 'MSXML2.XMLHTTP') dispatcher.

The interesting part is, how to call the methods. Well, ‘interesting’ is not the right word, since ObjectStudio does all the right things for you.

Here is the code:

 | resp url |
 url := efURL getValue.
 url isNilOrEmpty ifTrue: [ ^self ].
 http call: 'open' params: (Array with: 'GET' with: url with: false).
 http call: 'setRequestHeader' params: (Array with: 'If-None-Match' with: 'qwerty').
 call: 'setRequestHeader'
 params: (Array with: 'Cache-Control' with: 'no-cache,max-age=0').
 http call: 'setRequestHeader' params: (Array with: 'Pragma' with: 'no-cache').
 http call: 'send'.
 resp := http call: 'responseText'.

You can put all sorts of tests in there, measure the time, etc.
It just shows again, that you should know your platform and what’s available.
Sometimes it saves you a great deal of time and effort.

Quis Custodiet Ipsos Custodes?