SlideShare a Scribd company logo
TWaver® Java

                  Performance Report




Nov 2010
Serva Software
info@servasoftware.com
http://www.servasoftware.com
PO Box 8143, Wichita Falls, Texas, USA 76307
For more information about Serva Software and TWaver please visit the web site at:
    http://www.servasoftware.com
Or send e-mail to:
    info@servasoftware.com

Nov, 2010

Notice:
This document contains proprietary information of Serva Software. Possession and use of
this document shall be strictly in accordance with a license agreement between the user
and Serva Software, and receipt or possession of this document does not convey any rights
to reproduce or disclose its contents, or to manufacture, use, or sell anything it may
describe. It may not be reproduced, disclosed, or used by others without specific written
authorization of Serva Software.

TWaver, servasoft, Serva Software and the logo are registered trademarks of Serva
Software. Java and all Java-based marks are trademarks or registered trademarks of Sun
Microsystems, Inc. in the U.S.A. and other countries. Other company, brand, or product
names are trademarks or registered trademarks of their respective holders. The
information contained in this document is subject to change without notice at the
discretion of Serva Software.

Copyright © 2010 Serva Software LLC
All Rights Reserved
                                                                        TWaver Java P
                                                                                                            Performance Re
                                                                                                                         eport 
 
High
   h Performanc
              ce is a key be  enefit of TW      Waver. Here is           s a simple test of TWaver's performa            ance. 

In th
    his test, a number of Nod
                            des and Links
                                        s are created
                                                    d randomly a
                                                               and added in
                                                                          nto the DataB
                                                                                      Box to 
disp
   play on a Net twork compoonent. 

Test
   t Environment 

             TWaver Java 3.6 
                   M) SE Runtime
             Java(TM             e Environme
                                           ent (build 1.6
                                                        6.0_22‐b04‐3
                                                                   307‐10M326
                                                                            61) 
             Mac OSXX 10.6.4 
             2.26 GHz Intel Core 2 Duo 

Test
   t 1 

             Node: crreate Node e
                                element with
                                           hout image
             Link: no Link elemen
                                nt 




                                                                                                                                         

 

   t 2 
Test

             Node: crreate Node e
                                element with
                                           hout image
             Link: number of Nod
                               de number of Link = 5:1




                                                                                                                                         


                                                                                                                                       1 
Copy
   yright © 2010 Serva Software A              rved                                                                                 
                                All Rights Reser
                                                                        TWaver Java P
                                                                                                                            Performance Re
                                                                                                                                         eport 
 
Test
   t 3 

             Node: crreate Node e
                                element with
                                           h image 
             Link: no Link elemen
                                nt 




                                                                                                                                                    

 

   t 4 
Test

             Node: crreate Node e
                                element with
                                           h image 
             Link: number of Nod
                               de number of Link = 5:1




                                                                                                                                                    

 

Source Code: 

   kage model.d
pack          databox; 

 

import java.awt.BorderLayout; 

import java.awt.Color; 

import java.awt.Dimension; 

                                                                                                                                                  2 
Copy
   yright © 2010 Serva Software A              rved                                                                                 
                                All Rights Reser
                                                                        TWaver Java P
                                                                                                           Performance Re
                                                                                                                        eport 
 
import java.awt.Graphics; 

import java.awt.GridLayout; 

import java.awt.event.ActionEvent; 

import java.awt.event.ActionListener; 

import java.util.A
                 ArrayList; 

import java.util.List; 

 

import javax.swing.JButton; 

import javax.swing.JCheckBo
                          ox; 

import javax.swing.JCompon
                         nent; 

import javax.swing.JFrame; 

import javax.swing.JLabel; 

import javax.swing.JPanel; 

import javax.swing.JTextField; 

                          ilities; 
import javax.swing.SwingUti

 

              Link; 
import twaver.L

              Node; 
import twaver.N

import twaver.R
              ResizableNod
                         de; 

import twaver.T
              TDataBox; 

              TUIManager; 
import twaver.T

import twaver.T
              TWaverConst
                        t; 

import twaver.T
              TWaverUtil; 

import twaver.chart.BarChart; 

              network.Canv
import twaver.n          vasPaintAdapter; 



                                                                                                                                       3 
Copy
   yright © 2010 Serva Software A              rved                                                                                 
                                All Rights Reser
                                                                        TWaver Java P
                                                                                                          Performance Re
                                                                                                                       eport 
 
import twaver.n
              network.TNetwork; 

 

public class Perf
                formanceTes
                          st extends JPanel implem
                                                 ments ActionL
                                                             Listener{ 

 

    vate int stepC
 priv            Count = 5; 

 priv
    vate int unitN
                 Number = 10
                           000; 

  

    vate int curre
 priv            entStep = 0; 

 priv
    vate long startTime = ‐1; 

 priv
    vate TDataBo
               ox box = new
                          w TDataBox()
                                     ); 

 priv
    vate Node bo
               oxLoad = new
                          w Node(); 

 priv
    vate Node ne
               etworkLoad =
                          = new Node(); 

 priv
    vate TDataBo
               ox report = n
                           new TDataBo
                                     ox(); 

 priv
    vate BarChar
               rt chart = new
                            w BarChart(r
                                       report); 

  

    vate JCheckB
 priv          Box withLink = new JChec
                                      ckBox("with link"); 

 priv
    vate JCheckB
               Box widthIma
                          age = new JC
                                     CheckBox("w
                                               with image");

 priv
    vate JTextFie
                eld stepCountField = new
                                       w JTextField(s
                                                    stepCount + ""); 

 priv
    vate JTextFie
                eld unitNumb
                           berField = ne
                                       ew JTextField
                                                   d(unitNumbe
                                                             er + ""); 

 priv
    vate JButton button = new JButton("P
                                       Press to Star
                                                   rt Loading..."
                                                                "); 

 priv
    vate TNetwork network =
                          = new TNetw
                                    work(box); 

  

    vate void afte
 priv            erPaintProce
                            ess(){ 

  if(s
     startTime > 0
                 0){ 

   lon
     ng time = Sys
                 stem.current
                            tTimeMillis()
                                        ) ‐ startTime;
                                                     ; 



                                                                                                                                       4 
Copy
   yright © 2010 Serva Software A              rved                                                                                 
                                All Rights Reser
                                                                        TWaver Java P
                                                                                                           Performance Re
                                                                                                                        eport 
 
   ne
    etworkLoad.a
               addChartValue(time); 

    

   currentStep‐‐; 

     artTime = ‐1;
   sta           ; 

    

      currentStep > 0){ 
   if(c

     wingUtilities.invokeLater
    Sw                       r(new Runnable(){ 

     p
     public void ru
                  un() { 

      s
      step(); 

     } 

      ; 
    });

   }el
     lse{ 

    bu
     utton.setEna
                abled(true); 

    st
     tepCountField.setEnabled
                            d(true); 

    un
     nitNumberFi
               ield.setEnabled(true); 

   } 

  } 

 } 

  

   blic Performa
 pub           anceTest(){ 

  sup
    per(new Bord
               derLayout())
                          ); 

  net
    twork.addCa
              anvasPaintLis
                          stener(new C
                                     CanvasPaintA
                                                Adapter(){ 

   pu
    ublic void afterPaint(Grap
                             phics g) { 

    af
     fterPaintProc
                 cess(); 

   } 



                                                                                                                                       5 
Copy
   yright © 2010 Serva Software A              rved                                                                                 
                                All Rights Reser
                                                                        TWaver Java P
                                                                                                                            Performance Re
                                                                                                                                         eport 
 
  }); 

   

    port.addElem
  rep          ment(this.box
                           xLoad); 

  rep
    port.addElem
               ment(this.net
                           tworkLoad);

   

    xLoad.setName("DataBo
  box                   ox Loading Time"); 

  net
    tworkLoad.setName("Ne
                        etwork Loadi
                                   ing Time"); 

  box
    xLoad.putCh
              hartColor(Col
                          lor.BLUE.dar
                                     rker()); 

  net
    tworkLoad.p
              putChartColo
                         or(Color.GREEN.darker()); 

 

                Text("Time Consuming (m
    art.setYAxisT
  cha                                 ms)"); 

  cha
    art.setTitle("TWaver Perf
                            formance Re
                                      eport"); 

  cha
    art.setValueT
                TextFont(TUIManager.ge
                                     etDefaultFon
                                                nt().deriveFont(9f)); 

  cha
    art.setShado
               owOffset(0); 

  cha
    art.setSelectedOffset(0); 

  cha
    art.setBarTyp
                pe(TWaverConst.BAR_TY
                                    YPE_GROUP)
                                             ); 

//  c
    chart.setXSca
                aleTextOrientation(TWav
                                      verConst.LAB
                                                 BEL_ORIENTA
                                                           ATION_RIGH
                                                                    HT); 

  cha
    art.setXScale
                eTextColor(Color.RED); 

  cha
    art.setLazyPu
                ublishMode(
                          (true); 

  cha
    art.setXAxisT
                Text("Numbe
                          ers of Elemen
                                      nt"); 

   

  but
    tton.addActi
               ionListener(t
                           this); 

  but
    tton.setBack
               kground(Colo
                          or.ORANGE);
                                    ; 

   

    epCountField
  ste          d.setPreferre
                           edSize(new D
                                      Dimension(80
                                                 0, 20)); 



                                                                                                                                                  6 
Copy
   yright © 2010 Serva Software A              rved                                                                                 
                                All Rights Reser
                                                                        TWaver Java P
                                                                                                            Performance Re
                                                                                                                         eport 
 
  uni
    itNumberFie
              eld.setPreferredSize(new           w Dimension(           (80, 20)); 

  JPa
    anel controlP
                Pane = new JPanel(); 

  con
    ntrolPane.ad
               dd(widthImag
                          ge); 

  con
    ntrolPane.ad
               dd(withLink);
                           ; 

  con
    ntrolPane.ad
               dd(new JLabe
                          el("step coun
                                      nt")); 

  con
    ntrolPane.ad
               dd(stepCount
                          tField); 

  con
    ntrolPane.ad
               dd(new JLabe
                          el("node cou
                                     unt")); 

  con
    ntrolPane.ad
               dd(unitNumb
                         berField); 

  con
    ntrolPane.ad
               dd(button); 

   

                 = new JPanel(new GridLa
      Panel pane =
     JP                                ayout(2, 1));

     p
     pane.add(net
                twork); 

     p
     pane.add(cha
                art); 

  this
     s.add(pane, BorderLayou
                           ut.CENTER);

  this
     s.add(contro
                olPane, BorderLayout.SO
                                      OUTH); 

  

 } 

 

   blic void actio
 pub             onPerformed
                           d(ActionEven
                                      nt e) { 

  but
    tton.setEnab
               bled(false); 

  ste
    epCountField
               d.setEnabled(false); 

  uni
    itNumberFie
              eld.setEnable
                          ed(false); 

   

  try{ 

                t = Integer.pa
   this.stepCount            arseInt(this.s
                                          stepCountFie
                                                     eld.getText()
                                                                 )); 



                                                                                                                                       7 
Copy
   yright © 2010 Serva Software A              rved                                                                                 
                                All Rights Reser
                                                                        TWaver Java P
                                                                                                                            Performance Re
                                                                                                                                         eport 
 
  }ca
    atch(Exceptio
                on ex){ 

   this.stepCount
                tField.setTex
                            xt(this.stepCo
                                         ount + ""); 

  } 

  try{ 

                            .parseInt(this.unitNumbe
   this.unitNumber = Integer.                      erField.getTe
                                                               ext()); 

    atch(Exceptio
  }ca           on ex){ 

   this.unitNumberField.setTe
                            ext(this.unitNumber + ""
                                                   "); 

  } 

   

     s.currentStep = stepCoun
  this                      nt; 

  this
     s.chart.setXS
                 ScaleTextList
                             t(null); 

  this
     s.boxLoad.se
                etChartValue
                           es(null); 

  this
     s.networkLo
               oad.setChartV
                           Values(null); 

 

     s.step(); 
  this

 } 

  

    vate void step(){ 
 priv

  this
     s.box.clear(); 

  this
     s.startTime =
                 = System.cur
                            rrentTimeMi
                                      illis(); 

  int sum=getSum
               m(stepCount
                         t‐currentStep
                                     p, unitNumb
                                               ber); 

  int linkCount = withLink.isSelected() ? (int)(sum*0.2
                                                      2) : 0; 

    ng time = loadNode(box, sum, linkCou
  lon                                  unt, widthIm
                                                  mage.isSelect
                                                              ted(), 1000, 1
                                                                           1000); 

  if(li
      inkCount>0){ 

   this.chart.addX
                 XScaleText("<html>"+sum
                                       m + " Nodes <br>"+linkCount+" Links
                                                                         s</html>"); 



                                                                                                                                                  8 
Copy
   yright © 2010 Serva Software A              rved                                                                                 
                                All Rights Reser
                                                                        TWaver Java P
                                                                                                                            Performance Re
                                                                                                                                         eport 
 
  }els
     se{ 

   this.chart.addX
                 XScaleText(sum + " Node
                                       es"); 

  } 

     s.boxLoad.ad
  this          ddChartValue(time); 

 } 

  

                etSum(int currentStep,int unitNumbe
 protected int ge                                 er){ 

    turn (int)(uni
  ret            itNumber*(M
                           Math.pow(2,currentStep))); 

 } 

   blic static void main(Strin
 pub                         ng[] args) { 

  sho
    owFrame("DataBox Load
                        ding Test", ne
                                     ew Performa
                                               anceTest());

 } 

     ublic static lo
    pu             ong loadNod
                             de(TDataBox box,int node
                                                    eCount, int linkCount, bo
                                                                            oolean useIco
                                                                                        on, int 
xLimmit, int yLimitt){ 

        List allNode
                   es = new Arra
                               ayList(nodeC
                                          Count); 

         

                   = System.cur
        long time1 =          rrentTimeMi
                                        illis(); 

        for (int i = 0
                     0; i < nodeCount; i++) { 

            Node nod
                   de = null; 

            if (useIcon
                      n) { 

                node = new Node(); 

            } else { 

                                 bleNode(); 
                node = new Resizab

                       ableNode) no
                ((Resiza          ode).setSize(
                                              (12, 12); 

                node.putCustomDr
                               raw(true); 

                node.putCustomDr
                               rawShapeFac
                                         ctory(TWave
                                                   erConst.SHAP
                                                              PE_CIRCLE);


                                                                                                                                                  9 
Copy
   yright © 2010 Serva Software A              rved                                                                                 
                                All Rights Reser
                                                                        TWaver Java P
                                                                                                                 Performance Re
                                                                                                                              eport 
 
                node.putCustomDr  rawFillColor(Color.GREEN                   N); 

                node.putCustomDr
                               rawOutline(fa
                                           alse); 

                node.putBorderColor(Color.WH
                                           HITE); 

                               rawGradientFactory(TWa
                node.putCustomDr                    averConst.GR
                                                               RADIENT_RA
                                                                        ADIAL_NW); 

            } 

 

                     WaverUtil.get
            int x = TW           tRandomInt(
                                           (xLimit); 

            int y = TW
                     WaverUtil.get
                                 tRandomInt(
                                           (yLimit); 

 

            node.setL
                    Location(x, y
                                y); 

            box.addElement(node
                              e); 

            allNodes.add(node); 

        } 

 

                     0; i < linkCoun
        for (int i = 0             nt; i++) { 

            Node nod
                   de1 = (Node)
                              )allNodes.get
                                          t(TWaverUti
                                                    il.getRandom
                                                               mInt(nodeCount)); 

            Node nod
                   de2 = (Node)
                              )allNodes.get
                                          t(TWaverUti
                                                    il.getRandom
                                                               mInt(nodeCount)); 

             

                      = new Link(node1, node2
            Link link =                     2); 

            link.putLinkWidth(0); 

            link.putLinkOutlineWidth(0); 

                                 or.YELLOW);
            link.putLinkColor(Colo

            link.putBo          Color.WHITE); 
                     orderColor(C

            box.addElement(link); 

        } 



                                                                                                                                       10 
Copy
   yright © 2010 Serva Software A              rved                                                                                 
                                All Rights Reser
                                                                        TWaver Java P
                                                                                                               Performance Re
                                                                                                                            eport 
 
        return Syste
                   em.currentTi  imeMillis()‐time1; 

    } 

     

   blic static JFrame showFr
 pub                       rame(String t
                                       title, JCompo
                                                   onent compo
                                                             onent) { 

  JFrame frame =
               = new JFrame(); 

  frame.setTitle(t
                 title); 

  frame.getConte
               entPane().ad                    ayout.CENTER); 
                          dd(component, BorderLa

  frame.setSize(7
                700, 550); 

  frame.setDefau
               ultCloseOper
                          ration(JFram
                                     me.EXIT_ON_
                                               _CLOSE); 

   WaverUtil.cen
  TW           nterWindow(frame); 

  frame.setVisible(true); 

    turn frame; 
  ret

 } 

} 

 

 




                                                                                                                                       11 
Copy
   yright © 2010 Serva Software A              rved                                                                                 
                                All Rights Reser

More Related Content

What's hot

[01][gpu 컴퓨팅을 위한 언어, 도구 및 api] miller languages tools
[01][gpu 컴퓨팅을 위한 언어, 도구 및 api] miller languages tools[01][gpu 컴퓨팅을 위한 언어, 도구 및 api] miller languages tools
[01][gpu 컴퓨팅을 위한 언어, 도구 및 api] miller languages toolslaparuma
 
Xsl Tand X Path Quick Reference
Xsl Tand X Path Quick ReferenceXsl Tand X Path Quick Reference
Xsl Tand X Path Quick ReferenceLiquidHub
 
Summer Training In Dotnet
Summer Training In DotnetSummer Training In Dotnet
Summer Training In DotnetDUCC Systems
 
OOP Chapter 7 : More on Classes
OOP Chapter 7 : More on ClassesOOP Chapter 7 : More on Classes
OOP Chapter 7 : More on Classes
Atit Patumvan
 
Corejava Online 100
Corejava Online 100Corejava Online 100
Corejava Online 100reynolds
 
Python
PythonPython
CodeCity: Visual Exploration of Large-Scale Evolving Software
CodeCity: Visual Exploration of Large-Scale Evolving SoftwareCodeCity: Visual Exploration of Large-Scale Evolving Software
CodeCity: Visual Exploration of Large-Scale Evolving Software
Richard Wettel
 
Visual Exploration of Large-Scale System Evolution
Visual Exploration of Large-Scale System EvolutionVisual Exploration of Large-Scale System Evolution
Visual Exploration of Large-Scale System Evolution
Richard Wettel
 
Leveraging collaborativetaggingforwebitemdesign ajithajjarani
Leveraging collaborativetaggingforwebitemdesign ajithajjaraniLeveraging collaborativetaggingforwebitemdesign ajithajjarani
Leveraging collaborativetaggingforwebitemdesign ajithajjarani
Ajith Ajjarani
 
Using Domain Feature to handle Feature Interactions
Using Domain Feature to handle Feature InteractionsUsing Domain Feature to handle Feature Interactions
Using Domain Feature to handle Feature Interactions
Sébastien Mosser
 
Deuce STM - CMP'09
Deuce STM - CMP'09Deuce STM - CMP'09
Deuce STM - CMP'09
Guy Korland
 

What's hot (12)

[01][gpu 컴퓨팅을 위한 언어, 도구 및 api] miller languages tools
[01][gpu 컴퓨팅을 위한 언어, 도구 및 api] miller languages tools[01][gpu 컴퓨팅을 위한 언어, 도구 및 api] miller languages tools
[01][gpu 컴퓨팅을 위한 언어, 도구 및 api] miller languages tools
 
Xsl Tand X Path Quick Reference
Xsl Tand X Path Quick ReferenceXsl Tand X Path Quick Reference
Xsl Tand X Path Quick Reference
 
Summer Training In Dotnet
Summer Training In DotnetSummer Training In Dotnet
Summer Training In Dotnet
 
OOP Chapter 7 : More on Classes
OOP Chapter 7 : More on ClassesOOP Chapter 7 : More on Classes
OOP Chapter 7 : More on Classes
 
Corejava Online 100
Corejava Online 100Corejava Online 100
Corejava Online 100
 
Python
PythonPython
Python
 
CodeCity: Visual Exploration of Large-Scale Evolving Software
CodeCity: Visual Exploration of Large-Scale Evolving SoftwareCodeCity: Visual Exploration of Large-Scale Evolving Software
CodeCity: Visual Exploration of Large-Scale Evolving Software
 
Visual Exploration of Large-Scale System Evolution
Visual Exploration of Large-Scale System EvolutionVisual Exploration of Large-Scale System Evolution
Visual Exploration of Large-Scale System Evolution
 
Leveraging collaborativetaggingforwebitemdesign ajithajjarani
Leveraging collaborativetaggingforwebitemdesign ajithajjaraniLeveraging collaborativetaggingforwebitemdesign ajithajjarani
Leveraging collaborativetaggingforwebitemdesign ajithajjarani
 
Using Domain Feature to handle Feature Interactions
Using Domain Feature to handle Feature InteractionsUsing Domain Feature to handle Feature Interactions
Using Domain Feature to handle Feature Interactions
 
Deuce STM - CMP'09
Deuce STM - CMP'09Deuce STM - CMP'09
Deuce STM - CMP'09
 
ASE02.ppt
ASE02.pptASE02.ppt
ASE02.ppt
 

Viewers also liked

Va ppt
Va pptVa ppt
Va ppt
jessneff
 
TWaver presentation in JavaOne 2010
TWaver presentation in JavaOne 2010TWaver presentation in JavaOne 2010
TWaver presentation in JavaOne 2010
253725291
 
10120 안대식 윤동주 ‘서시’
10120 안대식 윤동주 ‘서시’10120 안대식 윤동주 ‘서시’
10120 안대식 윤동주 ‘서시’dkseotlr1
 
10120 안대식 봄은_고양이로소이다.
10120 안대식 봄은_고양이로소이다.10120 안대식 봄은_고양이로소이다.
10120 안대식 봄은_고양이로소이다.dkseotlr1
 
Towards a more holistic assessment and monitoring unesco efa wg
Towards a more holistic assessment and monitoring unesco efa wgTowards a more holistic assessment and monitoring unesco efa wg
Towards a more holistic assessment and monitoring unesco efa wg
dvndamme
 
TWaver Flex Performance Report
TWaver Flex Performance ReportTWaver Flex Performance Report
TWaver Flex Performance Report
253725291
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
LinkedIn
 

Viewers also liked (8)

Va ppt
Va pptVa ppt
Va ppt
 
TWaver presentation in JavaOne 2010
TWaver presentation in JavaOne 2010TWaver presentation in JavaOne 2010
TWaver presentation in JavaOne 2010
 
10120 안대식 윤동주 ‘서시’
10120 안대식 윤동주 ‘서시’10120 안대식 윤동주 ‘서시’
10120 안대식 윤동주 ‘서시’
 
10120 안대식 봄은_고양이로소이다.
10120 안대식 봄은_고양이로소이다.10120 안대식 봄은_고양이로소이다.
10120 안대식 봄은_고양이로소이다.
 
Towards a more holistic assessment and monitoring unesco efa wg
Towards a more holistic assessment and monitoring unesco efa wgTowards a more holistic assessment and monitoring unesco efa wg
Towards a more holistic assessment and monitoring unesco efa wg
 
Bizenglish
BizenglishBizenglish
Bizenglish
 
TWaver Flex Performance Report
TWaver Flex Performance ReportTWaver Flex Performance Report
TWaver Flex Performance Report
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Similar to TWaver Java Performance Report

TWaver Web Performance Report
TWaver Web Performance ReportTWaver Web Performance Report
TWaver Web Performance Report
253725291
 
Ns2
Ns2Ns2
Kuldeep presentation ppt
Kuldeep presentation pptKuldeep presentation ppt
Kuldeep presentation pptkuldeep khichar
 
Vaadin += GWT
Vaadin += GWTVaadin += GWT
Vaadin += GWT
Joonas Lehtinen
 
BeJUG JavaFx In Practice
BeJUG JavaFx In PracticeBeJUG JavaFx In Practice
BeJUG JavaFx In Practice
Pursuit Consulting
 
Multi tier-app-network-topology-neutron-final
Multi tier-app-network-topology-neutron-finalMulti tier-app-network-topology-neutron-final
Multi tier-app-network-topology-neutron-final
Sadique Puthen
 
Java%20 programming%20guide%20 %20quick%20reference
Java%20 programming%20guide%20 %20quick%20referenceJava%20 programming%20guide%20 %20quick%20reference
Java%20 programming%20guide%20 %20quick%20reference
Shalini Pillai
 
Java%20 programming%20guide%20 %20quick%20reference
Java%20 programming%20guide%20 %20quick%20referenceJava%20 programming%20guide%20 %20quick%20reference
Java%20 programming%20guide%20 %20quick%20reference
Shalini Pillai
 
Java programming guide - quick reference
Java programming guide -  quick referenceJava programming guide -  quick reference
Java programming guide - quick referenceTutorials Tips Tricks
 
Java%20 programming%20guide%20 %20quick%20reference
Java%20 programming%20guide%20 %20quick%20referenceJava%20 programming%20guide%20 %20quick%20reference
Java%20 programming%20guide%20 %20quick%20reference
Shalini Pillai
 
Deep Dive Into Quantum
Deep Dive Into QuantumDeep Dive Into Quantum
Deep Dive Into Quantum
OpenCity Community
 
Openflow勉強会 「OpenFlowコントローラを取り巻く状況とその実装」
Openflow勉強会 「OpenFlowコントローラを取り巻く状況とその実装」Openflow勉強会 「OpenFlowコントローラを取り巻く状況とその実装」
Openflow勉強会 「OpenFlowコントローラを取り巻く状況とその実装」
Sho Shimizu
 
Cocoa Design Patterns
Cocoa Design PatternsCocoa Design Patterns
Cocoa Design Patterns
sgleadow
 
(ATS3-DEV05) Coding up Pipeline Pilot Components
(ATS3-DEV05) Coding up Pipeline Pilot Components(ATS3-DEV05) Coding up Pipeline Pilot Components
(ATS3-DEV05) Coding up Pipeline Pilot Components
BIOVIA
 
The Advanced Mobile Application Testing Environment: Project Report
The Advanced Mobile Application Testing Environment: Project ReportThe Advanced Mobile Application Testing Environment: Project Report
The Advanced Mobile Application Testing Environment: Project Report
Bob Binder
 
Tempest scenariotests 20140512
Tempest scenariotests 20140512Tempest scenariotests 20140512
Tempest scenariotests 20140512Masayuki Igawa
 
Hummingbird - Open Source for Small Satellites - GSAW 2012
Hummingbird - Open Source for Small Satellites - GSAW 2012Hummingbird - Open Source for Small Satellites - GSAW 2012
Hummingbird - Open Source for Small Satellites - GSAW 2012
Logica_hummingbird
 
Table29 Data Validation 95
Table29 Data Validation 95Table29 Data Validation 95
Table29 Data Validation 95
Franky Lao
 

Similar to TWaver Java Performance Report (20)

TWaver Web Performance Report
TWaver Web Performance ReportTWaver Web Performance Report
TWaver Web Performance Report
 
Ns2
Ns2Ns2
Ns2
 
Kuldeep presentation ppt
Kuldeep presentation pptKuldeep presentation ppt
Kuldeep presentation ppt
 
Vaadin += GWT
Vaadin += GWTVaadin += GWT
Vaadin += GWT
 
BeJUG JavaFx In Practice
BeJUG JavaFx In PracticeBeJUG JavaFx In Practice
BeJUG JavaFx In Practice
 
ICPC08b.ppt
ICPC08b.pptICPC08b.ppt
ICPC08b.ppt
 
Multi tier-app-network-topology-neutron-final
Multi tier-app-network-topology-neutron-finalMulti tier-app-network-topology-neutron-final
Multi tier-app-network-topology-neutron-final
 
Java%20 programming%20guide%20 %20quick%20reference
Java%20 programming%20guide%20 %20quick%20referenceJava%20 programming%20guide%20 %20quick%20reference
Java%20 programming%20guide%20 %20quick%20reference
 
Java%20 programming%20guide%20 %20quick%20reference
Java%20 programming%20guide%20 %20quick%20referenceJava%20 programming%20guide%20 %20quick%20reference
Java%20 programming%20guide%20 %20quick%20reference
 
Java programming guide - quick reference
Java programming guide -  quick referenceJava programming guide -  quick reference
Java programming guide - quick reference
 
Java cheat sheet
Java cheat sheetJava cheat sheet
Java cheat sheet
 
Java%20 programming%20guide%20 %20quick%20reference
Java%20 programming%20guide%20 %20quick%20referenceJava%20 programming%20guide%20 %20quick%20reference
Java%20 programming%20guide%20 %20quick%20reference
 
Deep Dive Into Quantum
Deep Dive Into QuantumDeep Dive Into Quantum
Deep Dive Into Quantum
 
Openflow勉強会 「OpenFlowコントローラを取り巻く状況とその実装」
Openflow勉強会 「OpenFlowコントローラを取り巻く状況とその実装」Openflow勉強会 「OpenFlowコントローラを取り巻く状況とその実装」
Openflow勉強会 「OpenFlowコントローラを取り巻く状況とその実装」
 
Cocoa Design Patterns
Cocoa Design PatternsCocoa Design Patterns
Cocoa Design Patterns
 
(ATS3-DEV05) Coding up Pipeline Pilot Components
(ATS3-DEV05) Coding up Pipeline Pilot Components(ATS3-DEV05) Coding up Pipeline Pilot Components
(ATS3-DEV05) Coding up Pipeline Pilot Components
 
The Advanced Mobile Application Testing Environment: Project Report
The Advanced Mobile Application Testing Environment: Project ReportThe Advanced Mobile Application Testing Environment: Project Report
The Advanced Mobile Application Testing Environment: Project Report
 
Tempest scenariotests 20140512
Tempest scenariotests 20140512Tempest scenariotests 20140512
Tempest scenariotests 20140512
 
Hummingbird - Open Source for Small Satellites - GSAW 2012
Hummingbird - Open Source for Small Satellites - GSAW 2012Hummingbird - Open Source for Small Satellites - GSAW 2012
Hummingbird - Open Source for Small Satellites - GSAW 2012
 
Table29 Data Validation 95
Table29 Data Validation 95Table29 Data Validation 95
Table29 Data Validation 95
 

Recently uploaded

Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 

Recently uploaded (20)

Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 

TWaver Java Performance Report

  • 1. TWaver® Java Performance Report Nov 2010 Serva Software info@servasoftware.com http://www.servasoftware.com PO Box 8143, Wichita Falls, Texas, USA 76307
  • 2. For more information about Serva Software and TWaver please visit the web site at: http://www.servasoftware.com Or send e-mail to: info@servasoftware.com Nov, 2010 Notice: This document contains proprietary information of Serva Software. Possession and use of this document shall be strictly in accordance with a license agreement between the user and Serva Software, and receipt or possession of this document does not convey any rights to reproduce or disclose its contents, or to manufacture, use, or sell anything it may describe. It may not be reproduced, disclosed, or used by others without specific written authorization of Serva Software. TWaver, servasoft, Serva Software and the logo are registered trademarks of Serva Software. Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S.A. and other countries. Other company, brand, or product names are trademarks or registered trademarks of their respective holders. The information contained in this document is subject to change without notice at the discretion of Serva Software. Copyright © 2010 Serva Software LLC All Rights Reserved
  • 3.                                                                         TWaver Java P Performance Re eport    High h Performanc ce is a key be enefit of TW Waver. Here is s a simple test of TWaver's performa ance.  In th his test, a number of Nod des and Links s are created d randomly a and added in nto the DataB Box to  disp play on a Net twork compoonent.  Test t Environment  TWaver Java 3.6  M) SE Runtime Java(TM e Environme ent (build 1.6 6.0_22‐b04‐3 307‐10M326 61)  Mac OSXX 10.6.4  2.26 GHz Intel Core 2 Duo  Test t 1  Node: crreate Node e element with hout image Link: no Link elemen nt      t 2  Test Node: crreate Node e element with hout image Link: number of Nod de number of Link = 5:1   1  Copy yright © 2010 Serva Software A rved                                                                                  All Rights Reser
  • 4.                                                                         TWaver Java P Performance Re eport    Test t 3  Node: crreate Node e element with h image  Link: no Link elemen nt      t 4  Test Node: crreate Node e element with h image  Link: number of Nod de number of Link = 5:1     Source Code:  kage model.d pack databox;    import java.awt.BorderLayout;  import java.awt.Color;  import java.awt.Dimension;  2  Copy yright © 2010 Serva Software A rved                                                                                  All Rights Reser
  • 5.                                                                         TWaver Java P Performance Re eport    import java.awt.Graphics;  import java.awt.GridLayout;  import java.awt.event.ActionEvent;  import java.awt.event.ActionListener;  import java.util.A ArrayList;  import java.util.List;    import javax.swing.JButton;  import javax.swing.JCheckBo ox;  import javax.swing.JCompon nent;  import javax.swing.JFrame;  import javax.swing.JLabel;  import javax.swing.JPanel;  import javax.swing.JTextField;  ilities;  import javax.swing.SwingUti   Link;  import twaver.L Node;  import twaver.N import twaver.R ResizableNod de;  import twaver.T TDataBox;  TUIManager;  import twaver.T import twaver.T TWaverConst t;  import twaver.T TWaverUtil;  import twaver.chart.BarChart;  network.Canv import twaver.n vasPaintAdapter;  3  Copy yright © 2010 Serva Software A rved                                                                                  All Rights Reser
  • 6.                                                                         TWaver Java P Performance Re eport    import twaver.n network.TNetwork;    public class Perf formanceTes st extends JPanel implem ments ActionL Listener{    vate int stepC  priv Count = 5;   priv vate int unitN Number = 10 000;     vate int curre  priv entStep = 0;   priv vate long startTime = ‐1;   priv vate TDataBo ox box = new w TDataBox() );   priv vate Node bo oxLoad = new w Node();   priv vate Node ne etworkLoad = = new Node();   priv vate TDataBo ox report = n new TDataBo ox();   priv vate BarChar rt chart = new w BarChart(r report);     vate JCheckB  priv Box withLink = new JChec ckBox("with link");   priv vate JCheckB Box widthIma age = new JC CheckBox("w with image");  priv vate JTextFie eld stepCountField = new w JTextField(s stepCount + "");   priv vate JTextFie eld unitNumb berField = ne ew JTextField d(unitNumbe er + "");   priv vate JButton button = new JButton("P Press to Star rt Loading..." ");   priv vate TNetwork network = = new TNetw work(box);     vate void afte  priv erPaintProce ess(){    if(s startTime > 0 0){     lon ng time = Sys stem.current tTimeMillis() ) ‐ startTime; ;  4  Copy yright © 2010 Serva Software A rved                                                                                  All Rights Reser
  • 7.                                                                         TWaver Java P Performance Re eport       ne etworkLoad.a addChartValue(time);          currentStep‐‐;  artTime = ‐1;    sta ;       currentStep > 0){     if(c wingUtilities.invokeLater     Sw r(new Runnable(){       p public void ru un() {        s step();       }  ;      });    }el lse{      bu utton.setEna abled(true);      st tepCountField.setEnabled d(true);      un nitNumberFi ield.setEnabled(true);     }    }   }     blic Performa  pub anceTest(){    sup per(new Bord derLayout()) );    net twork.addCa anvasPaintLis stener(new C CanvasPaintA Adapter(){     pu ublic void afterPaint(Grap phics g) {      af fterPaintProc cess();     }  5  Copy yright © 2010 Serva Software A rved                                                                                  All Rights Reser
  • 8.                                                                         TWaver Java P Performance Re eport      });      port.addElem   rep ment(this.box xLoad);    rep port.addElem ment(this.net tworkLoad);     xLoad.setName("DataBo   box ox Loading Time");    net tworkLoad.setName("Ne etwork Loadi ing Time");    box xLoad.putCh hartColor(Col lor.BLUE.dar rker());    net tworkLoad.p putChartColo or(Color.GREEN.darker());    Text("Time Consuming (m art.setYAxisT   cha ms)");    cha art.setTitle("TWaver Perf formance Re eport");    cha art.setValueT TextFont(TUIManager.ge etDefaultFon nt().deriveFont(9f));    cha art.setShado owOffset(0);    cha art.setSelectedOffset(0);    cha art.setBarTyp pe(TWaverConst.BAR_TY YPE_GROUP) );  //  c chart.setXSca aleTextOrientation(TWav verConst.LAB BEL_ORIENTA ATION_RIGH HT);    cha art.setXScale eTextColor(Color.RED);    cha art.setLazyPu ublishMode( (true);    cha art.setXAxisT Text("Numbe ers of Elemen nt");        but tton.addActi ionListener(t this);    but tton.setBack kground(Colo or.ORANGE); ;      epCountField   ste d.setPreferre edSize(new D Dimension(80 0, 20));  6  Copy yright © 2010 Serva Software A rved                                                                                  All Rights Reser
  • 9.                                                                         TWaver Java P Performance Re eport      uni itNumberFie eld.setPreferredSize(new w Dimension( (80, 20));    JPa anel controlP Pane = new JPanel();    con ntrolPane.ad dd(widthImag ge);    con ntrolPane.ad dd(withLink); ;    con ntrolPane.ad dd(new JLabe el("step coun nt"));    con ntrolPane.ad dd(stepCount tField);    con ntrolPane.ad dd(new JLabe el("node cou unt"));    con ntrolPane.ad dd(unitNumb berField);    con ntrolPane.ad dd(button);      = new JPanel(new GridLa Panel pane =      JP ayout(2, 1));      p pane.add(net twork);       p pane.add(cha art);    this s.add(pane, BorderLayou ut.CENTER);   this s.add(contro olPane, BorderLayout.SO OUTH);      }    blic void actio  pub onPerformed d(ActionEven nt e) {    but tton.setEnab bled(false);    ste epCountField d.setEnabled(false);    uni itNumberFie eld.setEnable ed(false);        try{  t = Integer.pa    this.stepCount arseInt(this.s stepCountFie eld.getText() ));  7  Copy yright © 2010 Serva Software A rved                                                                                  All Rights Reser
  • 10.                                                                         TWaver Java P Performance Re eport      }ca atch(Exceptio on ex){     this.stepCount tField.setTex xt(this.stepCo ount + "");    }    try{  .parseInt(this.unitNumbe    this.unitNumber = Integer. erField.getTe ext());  atch(Exceptio   }ca on ex){     this.unitNumberField.setTe ext(this.unitNumber + "" ");    }      s.currentStep = stepCoun   this nt;    this s.chart.setXS ScaleTextList t(null);    this s.boxLoad.se etChartValue es(null);    this s.networkLo oad.setChartV Values(null);    s.step();    this  }     vate void step(){   priv   this s.box.clear();    this s.startTime = = System.cur rrentTimeMi illis();    int sum=getSum m(stepCount t‐currentStep p, unitNumb ber);    int linkCount = withLink.isSelected() ? (int)(sum*0.2 2) : 0;  ng time = loadNode(box, sum, linkCou   lon unt, widthIm mage.isSelect ted(), 1000, 1 1000);    if(li inkCount>0){     this.chart.addX XScaleText("<html>"+sum m + " Nodes <br>"+linkCount+" Links s</html>");  8  Copy yright © 2010 Serva Software A rved                                                                                  All Rights Reser
  • 11.                                                                         TWaver Java P Performance Re eport      }els se{     this.chart.addX XScaleText(sum + " Node es");    }  s.boxLoad.ad   this ddChartValue(time);   }     etSum(int currentStep,int unitNumbe  protected int ge er){  turn (int)(uni   ret itNumber*(M Math.pow(2,currentStep)));   }  blic static void main(Strin  pub ng[] args) {    sho owFrame("DataBox Load ding Test", ne ew Performa anceTest());  }  ublic static lo     pu ong loadNod de(TDataBox box,int node eCount, int linkCount, bo oolean useIco on, int  xLimmit, int yLimitt){          List allNode es = new Arra ayList(nodeC Count);            = System.cur         long time1 = rrentTimeMi illis();          for (int i = 0 0; i < nodeCount; i++) {              Node nod de = null;              if (useIcon n) {                  node = new Node();              } else {  bleNode();                  node = new Resizab ableNode) no                 ((Resiza ode).setSize( (12, 12);                  node.putCustomDr raw(true);                  node.putCustomDr rawShapeFac ctory(TWave erConst.SHAP PE_CIRCLE); 9  Copy yright © 2010 Serva Software A rved                                                                                  All Rights Reser
  • 12.                                                                         TWaver Java P Performance Re eport                    node.putCustomDr rawFillColor(Color.GREEN N);                  node.putCustomDr rawOutline(fa alse);                  node.putBorderColor(Color.WH HITE);  rawGradientFactory(TWa                 node.putCustomDr averConst.GR RADIENT_RA ADIAL_NW);              }    WaverUtil.get             int x = TW tRandomInt( (xLimit);              int y = TW WaverUtil.get tRandomInt( (yLimit);                node.setL Location(x, y y);              box.addElement(node e);              allNodes.add(node);          }    0; i < linkCoun         for (int i = 0 nt; i++) {              Node nod de1 = (Node) )allNodes.get t(TWaverUti il.getRandom mInt(nodeCount));              Node nod de2 = (Node) )allNodes.get t(TWaverUti il.getRandom mInt(nodeCount));                = new Link(node1, node2             Link link = 2);              link.putLinkWidth(0);              link.putLinkOutlineWidth(0);  or.YELLOW);             link.putLinkColor(Colo             link.putBo Color.WHITE);  orderColor(C             box.addElement(link);          }  10  Copy yright © 2010 Serva Software A rved                                                                                  All Rights Reser
  • 13.                                                                         TWaver Java P Performance Re eport            return Syste em.currentTi imeMillis()‐time1;      }        blic static JFrame showFr  pub rame(String t title, JCompo onent compo onent) {    JFrame frame = = new JFrame();    frame.setTitle(t title);    frame.getConte entPane().ad ayout.CENTER);  dd(component, BorderLa   frame.setSize(7 700, 550);    frame.setDefau ultCloseOper ration(JFram me.EXIT_ON_ _CLOSE);  WaverUtil.cen   TW nterWindow(frame);    frame.setVisible(true);  turn frame;    ret  }  }      11  Copy yright © 2010 Serva Software A rved                                                                                  All Rights Reser