Perforce JViews TGO Sample: Equipment Component - Performance
Description
This sample shows the performance of the Perforce JViews TGO Equipment component.
How to Use the Sample
How to Run the Sample as an Application
This sample can
be run as an application.
The installation directory contains
an executable JAR file,
equipment-performance.jar
,
that allows you to execute the sample with a double click from a
file browser. Note that if you are using Internet Explorer, you can
open the installation directory
and execute the JAR file from the browser. This
technique may not work in other Web browsers.
Alternatively, you
can run the sample application from the command line.
First check that the Ant utility is properly configured. If not, see the
instructions on how to configure Ant for Perforce JViews.
Then, go to the installation directory
of the sample and type:
ant run
Topics Covered
- Time to fill the data source
- Time to get a first display
- Total time from the start of the sample to the end of the display
- Time to update an attribute in all the objects and display the results
- Time to clear the data source and display the results
Detailed Description
This sample measures the performance of a JTGO Equipment component. The specific code of this sample is in the benchIt
method of performance.Main. It contains the following steps:
- Time to fill the data source
The data source is filled in thefillDataSource
method. By default, the data source is populated before the Equipment component is connected to it. You can change this behavior by changing thefillDataSourceFirst
boolean attribute.
By default, 10 shelves, each containing 100 cards, are created in the data source. You can modify these numbers by changing thenumberOfShelves
or thenumberOfCards
integer attributes. - Time to get a first display
The classDisplayTest
is used to mesure the time of the first display. This time is the time between the end of the data source filling and the display of the rows. - Total time from the start of the sample to the end of the display
This total time from the start of the sample to the end of the display is computed in theDisplayTest
class. - Time to update an attribute in all the objects and display the results
The object state of each object is set. - Time to clear the data source and display the results
Installation Directory
The Equipment Component - Performance sample is installed here.
Classes Involved
-
ilog.tgo.IltSystem
The class that initializes a JViews TGO application.
-
ilog.tgo.datasource.IltDefaultDataSource
The default datasource implementation.
-
ilog.cpl.IlpEquipment
The equipment component.
Source Files
-
performance.Main
The entry point of the sample.