SlideShare una empresa de Scribd logo
1 de 9
Descargar para leer sin conexión
                                                                                            



                                         
 
 
 
 
 
 
 
 
                                                                                         
                                                                 TWaver Flex        ®

      

                                                        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 Flex Performance Report 
Test Environment: TWaver Flex 1.2, Adobe Flash Player 10.1.82.76, Windows XP Professional SP3, Intel Core i5 CPU M540 2.53GHz 
Test 1: Loads nodes with image and without links 




                                                                                                                                                                                                                                                     
                    IE 8.0.6001.18702                                                                     Firefox 3.6.9                                                                Chrome 5.0.375.125 
Test 2: Loads nodes with image and with 1/5 links 




                                                                                                                                                                                                                                                    
                      IE 8.0.6001.18702                                                                   Firefox 3.6.9                                                                         Chrome 5.0.375.125 

                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                           1 
Copyright © 2010 Serva Software All Rights Reserved 
                                                                                                                                                                                        TWaver Flex Performance Report 
Test 3: Loads nodes without image and without links 




                                                                                                                                                                                                                                                     
                    IE 8.0.6001.18702                                                                     Firefox 3.6.9                                                                             Chrome 5.0.375.125 
Test 4: Loads nodes without image and with 1/5 links 




                                                                                                                                                                                                                                                     
                      IE 8.0.6001.18702                                                                   Firefox 3.6.9                                                                             Chrome 5.0.375.125 
 

                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                           2 
Copyright © 2010 Serva Software All Rights Reserved 
                                                                                                                                                                                        TWaver Flex Performance Report 
Source Code: 
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
              xmlns:twaver="http://www.servasoftware.com/2009/twaver/flex"
              paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0"
              creationComplete="init();">


     <mx:Script>
           <![CDATA[
                import mx.collections.*;


                import twaver.*;


                [Bindable]
                private var memoryUsages:ArrayCollection = new ArrayCollection();
                [Bindable]
                private var timeUsages:ArrayCollection = new ArrayCollection();


                private var box:ElementBox = null;
                private var currentStep:int = 0;


                private function init():void{
                      box = network.elementBox;
                }


                private function test():void{
                      currentStep++;
                      var nodeCount:int = int(txtNodeCount.text) * currentStep;
                      var linkCount:int = this.withLink.selected ? nodeCount/5 : 0;

                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                           3 
Copyright © 2010 Serva Software All Rights Reserved 
                                                                                                                                                                                        TWaver Flex Performance Report 
                      var result:Object = loadNode(box, nodeCount, linkCount, withImage.selected, 1000, 1000);
                      var item:Object = new Object();
                      item.Count = nodeCount;
                      item.Memory = result[1];
                      memoryUsages.addItem(item);


                      item = new Object();
                      item.Count = nodeCount;
                      item.Time = result[0];
                      timeUsages.addItem(item);


                      trace(numberFormatter.format(result[0]) + 'ms,' + numberFormatter.format(result[1]) + 'KB');
                }


                private function reset():void{
                      box.clear();
                      System.gc();
                }


                private static function loadNode(box:ElementBox, nodeCount:int, linkCount:int, useIcon:Boolean, xLimit:int,
yLimit:int):Object{
                      Styles.setStyle(Styles.CONTENT_TYPE, useIcon ? Consts.CONTENT_TYPE_DEFAULT : Consts.CONTENT_TYPE_VECTOR);
                      Styles.setStyle(Styles.VECTOR_SHAPE, Consts.SHAPE_CIRCLE);
                      Styles.setStyle(Styles.VECTOR_FILL, true);
                      Styles.setStyle(Styles.VECTOR_FILL_COLOR, 0x00FF00);
                      Styles.setStyle(Styles.VECTOR_OUTLINE_WIDTH, 1);
                      Styles.setStyle(Styles.VECTOR_OUTLINE_COLOR, 0xFFFFFF);
                      Styles.setStyle(Styles.VECTOR_GRADIENT, Consts.GRADIENT_RADIAL_NORTHWEST);


                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                       4 
Copyright © 2010 Serva Software All Rights Reserved 
                                                                                                                                                                                        TWaver Flex Performance Report 
                      var memoryUsage:int = System.totalMemory / 1024;
                      var time:Number = new Date().getTime();
                      for (var nodeIndex:int = 0; nodeIndex < nodeCount; nodeIndex++) {
                           var node:Node = new Node();
                           if (!useIcon) {
                                 node.setSize(12, 12);
                           }


                           node.setLocation(Utils.randomInt(xLimit), Utils.randomInt(yLimit));
                           box.add(node);
                      }


                      var allNodes:ICollection = box.datas;
                      var links:Collection = new Collection();
                      for (var linkIndex:int = 0; linkIndex < linkCount; linkIndex++) {
                           var node1:Node = allNodes.getItemAt(Utils.randomInt(nodeCount));
                           var node2:Node = allNodes.getItemAt(Utils.randomInt(nodeCount));


                           var link:Link = new Link(node1, node2);
                           link.setStyle(Styles.LINK_WIDTH, 0);
                           link.setStyle(Styles.LINK_COLOR, 0xFFFF00);
                           link.setStyle(Styles.OUTER_WIDTH, 0);
                           link.setStyle(Styles.OUTER_COLOR, 0xFFFFFF);
                           links.addItem(link);
                      }
                      links.forEach(function(link:Link):void{box.add(link);});
                      return [new Date().getTime() - time, System.totalMemory / 1024 - memoryUsage];
                 }
           ]]>

                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                           5 
Copyright © 2010 Serva Software All Rights Reserved 
                                                                                                                                                                                        TWaver Flex Performance Report 
     </mx:Script>


     <mx:NumberFormatter id="numberFormatter"/>


     <mx:Stroke id = "s1" color="blue" weight="2"/>
     <mx:Stroke id = "s2" color="red" weight="2"/>


     <mx:VBox width="100%" height="100%" verticalGap="0" horizontalGap="0">
           <mx:HBox id="toolbar" top="0" left="0" horizontalGap="0">
                <mx:Label id="totalMemory" text="{'Memory:' + numberFormatter.format(System.totalMemory / 1024) + 'KB'}"
                              render="totalMemory.text = 'Memory:' + numberFormatter.format(System.totalMemory / 1024) + 'KB'"/>


                <mx:Label text="Node Count:"/>
                <mx:TextInput id="txtNodeCount" width="50" text="500"/>


                <mx:Label text="With Image:"/>
                <mx:CheckBox id="withImage" selected="true"/>


                <mx:Label text="With Link:"/>
                <mx:CheckBox id="withLink"/>


                <mx:Button id="btnClear" label="Reset" click="reset()"/>


                <mx:Button id="btnTest" label="Start Test" click="test()"/>
           </mx:HBox>


           <mx:HBox width="100%" height="90%" verticalGap="0" horizontalGap="0">
                <twaver:Network id="network" width="50%" height="100%"/>


                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                           6 
Copyright © 2010 Serva Software All Rights Reserved 
                                                                                                                                                                                        TWaver Flex Performance Report 
                <mx:VBox width="50%" height="100%" verticalGap="0" horizontalGap="0">
                      <mx:LineChart id="memoryChart" height="50%" width="100%"
                                            paddingLeft="0" paddingRight="10"
                                            showDataTips="true" dataProvider="{memoryUsages}">


                           <mx:horizontalAxis>
                                 <mx:CategoryAxis categoryField="Count" title="Memory Usage (KB)"/>
                           </mx:horizontalAxis>


                           <mx:series>
                                 <mx:LineSeries yField="Memory" form="curve" displayName="Memory Usage (KB)" lineStroke="{s1}"/>
                           </mx:series>
                      </mx:LineChart>


                      <mx:LineChart id="timeChart" height="50%" width="100%"
                                            paddingLeft="0" paddingRight="10"
                                            showDataTips="true" dataProvider="{timeUsages}">
                           <mx:horizontalAxis>
                                 <mx:CategoryAxis categoryField="Count" title="Time Usage (ms)"/>
                           </mx:horizontalAxis>


                           <mx:series>
                                 <mx:LineSeries yField="Time" form="curve" displayName="Time Usage (ms)" lineStroke="{s2}"/>
                           </mx:series>
                      </mx:LineChart>
                </mx:VBox>
           </mx:HBox>
     </mx:VBox>
</mx:Application>

                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                           7 
Copyright © 2010 Serva Software All Rights Reserved 

Más contenido relacionado

Destacado

Lean manufacturing concepts and tools and quality management1
Lean manufacturing concepts and tools and quality management1Lean manufacturing concepts and tools and quality management1
Lean manufacturing concepts and tools and quality management1
hgalinova
 

Destacado (8)

TWaver Java Performance Report
TWaver Java Performance ReportTWaver Java Performance Report
TWaver Java Performance Report
 
Bizenglish
BizenglishBizenglish
Bizenglish
 
Twaver图形界面之道(上)
Twaver图形界面之道(上)Twaver图形界面之道(上)
Twaver图形界面之道(上)
 
Free ERP 2BizBox Quick Start Tutorial
Free ERP 2BizBox Quick Start TutorialFree ERP 2BizBox Quick Start Tutorial
Free ERP 2BizBox Quick Start Tutorial
 
80+ Variabel Key performance indicators
80+ Variabel Key performance indicators80+ Variabel Key performance indicators
80+ Variabel Key performance indicators
 
Lean manufacturing concepts and tools and quality management1
Lean manufacturing concepts and tools and quality management1Lean manufacturing concepts and tools and quality management1
Lean manufacturing concepts and tools and quality management1
 
Contoh KPI Individu. Rapor Prestasi Kerja
Contoh KPI Individu. Rapor Prestasi KerjaContoh KPI Individu. Rapor Prestasi Kerja
Contoh KPI Individu. Rapor Prestasi Kerja
 
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 a TWaver Flex Performance Report

Internet browsers by Andres Haydar
Internet browsers by Andres HaydarInternet browsers by Andres Haydar
Internet browsers by Andres Haydar
AndresHaydar
 
Trabajo de jose
Trabajo de jose Trabajo de jose
Trabajo de jose
josemgg
 
Browsers .
Browsers .Browsers .
Browsers .
seripa3
 
夜宴42期《Gadgets》
夜宴42期《Gadgets》夜宴42期《Gadgets》
夜宴42期《Gadgets》
Koubei Banquet
 
Paper published on web application testing with sahi tool
Paper published on web application testing with sahi toolPaper published on web application testing with sahi tool
Paper published on web application testing with sahi tool
Lalit Choudhary
 

Similar a TWaver Flex Performance Report (20)

Internet browsers by Andres Haydar
Internet browsers by Andres HaydarInternet browsers by Andres Haydar
Internet browsers by Andres Haydar
 
Watir Presentation Sumanth Krishna. A
Watir Presentation   Sumanth Krishna. AWatir Presentation   Sumanth Krishna. A
Watir Presentation Sumanth Krishna. A
 
Firefox 3.5 Overview
Firefox 3.5 OverviewFirefox 3.5 Overview
Firefox 3.5 Overview
 
Trabajo de jose
Trabajo de jose Trabajo de jose
Trabajo de jose
 
Browsers .
Browsers .Browsers .
Browsers .
 
Browsers
BrowsersBrowsers
Browsers
 
Browsers
BrowsersBrowsers
Browsers
 
Browsers
BrowsersBrowsers
Browsers
 
Web browsers
Web browsersWeb browsers
Web browsers
 
GlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and FutureGlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and Future
 
What's New in AppFuse 2.0
What's New in AppFuse 2.0What's New in AppFuse 2.0
What's New in AppFuse 2.0
 
IRJET- Real Time Monitoring of Servers with Prometheus and Grafana for High A...
IRJET- Real Time Monitoring of Servers with Prometheus and Grafana for High A...IRJET- Real Time Monitoring of Servers with Prometheus and Grafana for High A...
IRJET- Real Time Monitoring of Servers with Prometheus and Grafana for High A...
 
夜宴42期《Gadgets》
夜宴42期《Gadgets》夜宴42期《Gadgets》
夜宴42期《Gadgets》
 
Banquet 42
Banquet 42Banquet 42
Banquet 42
 
TestComplete 7.50 New Features
TestComplete 7.50 New FeaturesTestComplete 7.50 New Features
TestComplete 7.50 New Features
 
TestComplete 7.50 New Features
TestComplete 7.50 New FeaturesTestComplete 7.50 New Features
TestComplete 7.50 New Features
 
What are the popular features of java?
What are the popular features of java?What are the popular features of java?
What are the popular features of java?
 
OWASP WebGoat and PANTERA Web Assessment Studio Project.
OWASP WebGoat and PANTERA Web Assessment Studio Project.OWASP WebGoat and PANTERA Web Assessment Studio Project.
OWASP WebGoat and PANTERA Web Assessment Studio Project.
 
Paper published on web application testing with sahi tool
Paper published on web application testing with sahi toolPaper published on web application testing with sahi tool
Paper published on web application testing with sahi tool
 
GlassFish OSGi Server
GlassFish OSGi ServerGlassFish OSGi Server
GlassFish OSGi Server
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

TWaver Flex Performance Report

  • 1.                                                                                                                  TWaver Flex ®        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 Flex Performance Report  Test Environment: TWaver Flex 1.2, Adobe Flash Player 10.1.82.76, Windows XP Professional SP3, Intel Core i5 CPU M540 2.53GHz  Test 1: Loads nodes with image and without links                                     IE 8.0.6001.18702                Firefox 3.6.9                                  Chrome 5.0.375.125  Test 2: Loads nodes with image and with 1/5 links                                     IE 8.0.6001.18702                Firefox 3.6.9                    Chrome 5.0.375.125    1  Copyright © 2010 Serva Software All Rights Reserved 
  • 4.                                                                                                                                                                                         TWaver Flex Performance Report  Test 3: Loads nodes without image and without links                                     IE 8.0.6001.18702                Firefox 3.6.9                  Chrome 5.0.375.125  Test 4: Loads nodes without image and with 1/5 links                                     IE 8.0.6001.18702                Firefox 3.6.9                  Chrome 5.0.375.125      2  Copyright © 2010 Serva Software All Rights Reserved 
  • 5.                                                                                                                                                                                         TWaver Flex Performance Report  Source Code:  <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:twaver="http://www.servasoftware.com/2009/twaver/flex" paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0" creationComplete="init();"> <mx:Script> <![CDATA[ import mx.collections.*; import twaver.*; [Bindable] private var memoryUsages:ArrayCollection = new ArrayCollection(); [Bindable] private var timeUsages:ArrayCollection = new ArrayCollection(); private var box:ElementBox = null; private var currentStep:int = 0; private function init():void{ box = network.elementBox; } private function test():void{ currentStep++; var nodeCount:int = int(txtNodeCount.text) * currentStep; var linkCount:int = this.withLink.selected ? nodeCount/5 : 0;   3  Copyright © 2010 Serva Software All Rights Reserved 
  • 6.                                                                                                                                                                                         TWaver Flex Performance Report  var result:Object = loadNode(box, nodeCount, linkCount, withImage.selected, 1000, 1000); var item:Object = new Object(); item.Count = nodeCount; item.Memory = result[1]; memoryUsages.addItem(item); item = new Object(); item.Count = nodeCount; item.Time = result[0]; timeUsages.addItem(item); trace(numberFormatter.format(result[0]) + 'ms,' + numberFormatter.format(result[1]) + 'KB'); } private function reset():void{ box.clear(); System.gc(); } private static function loadNode(box:ElementBox, nodeCount:int, linkCount:int, useIcon:Boolean, xLimit:int, yLimit:int):Object{ Styles.setStyle(Styles.CONTENT_TYPE, useIcon ? Consts.CONTENT_TYPE_DEFAULT : Consts.CONTENT_TYPE_VECTOR); Styles.setStyle(Styles.VECTOR_SHAPE, Consts.SHAPE_CIRCLE); Styles.setStyle(Styles.VECTOR_FILL, true); Styles.setStyle(Styles.VECTOR_FILL_COLOR, 0x00FF00); Styles.setStyle(Styles.VECTOR_OUTLINE_WIDTH, 1); Styles.setStyle(Styles.VECTOR_OUTLINE_COLOR, 0xFFFFFF); Styles.setStyle(Styles.VECTOR_GRADIENT, Consts.GRADIENT_RADIAL_NORTHWEST);   4  Copyright © 2010 Serva Software All Rights Reserved 
  • 7.                                                                                                                                                                                         TWaver Flex Performance Report  var memoryUsage:int = System.totalMemory / 1024; var time:Number = new Date().getTime(); for (var nodeIndex:int = 0; nodeIndex < nodeCount; nodeIndex++) { var node:Node = new Node(); if (!useIcon) { node.setSize(12, 12); } node.setLocation(Utils.randomInt(xLimit), Utils.randomInt(yLimit)); box.add(node); } var allNodes:ICollection = box.datas; var links:Collection = new Collection(); for (var linkIndex:int = 0; linkIndex < linkCount; linkIndex++) { var node1:Node = allNodes.getItemAt(Utils.randomInt(nodeCount)); var node2:Node = allNodes.getItemAt(Utils.randomInt(nodeCount)); var link:Link = new Link(node1, node2); link.setStyle(Styles.LINK_WIDTH, 0); link.setStyle(Styles.LINK_COLOR, 0xFFFF00); link.setStyle(Styles.OUTER_WIDTH, 0); link.setStyle(Styles.OUTER_COLOR, 0xFFFFFF); links.addItem(link); } links.forEach(function(link:Link):void{box.add(link);}); return [new Date().getTime() - time, System.totalMemory / 1024 - memoryUsage]; } ]]>   5  Copyright © 2010 Serva Software All Rights Reserved 
  • 8.                                                                                                                                                                                         TWaver Flex Performance Report  </mx:Script> <mx:NumberFormatter id="numberFormatter"/> <mx:Stroke id = "s1" color="blue" weight="2"/> <mx:Stroke id = "s2" color="red" weight="2"/> <mx:VBox width="100%" height="100%" verticalGap="0" horizontalGap="0"> <mx:HBox id="toolbar" top="0" left="0" horizontalGap="0"> <mx:Label id="totalMemory" text="{'Memory:' + numberFormatter.format(System.totalMemory / 1024) + 'KB'}" render="totalMemory.text = 'Memory:' + numberFormatter.format(System.totalMemory / 1024) + 'KB'"/> <mx:Label text="Node Count:"/> <mx:TextInput id="txtNodeCount" width="50" text="500"/> <mx:Label text="With Image:"/> <mx:CheckBox id="withImage" selected="true"/> <mx:Label text="With Link:"/> <mx:CheckBox id="withLink"/> <mx:Button id="btnClear" label="Reset" click="reset()"/> <mx:Button id="btnTest" label="Start Test" click="test()"/> </mx:HBox> <mx:HBox width="100%" height="90%" verticalGap="0" horizontalGap="0"> <twaver:Network id="network" width="50%" height="100%"/>   6  Copyright © 2010 Serva Software All Rights Reserved 
  • 9.                                                                                                                                                                                         TWaver Flex Performance Report  <mx:VBox width="50%" height="100%" verticalGap="0" horizontalGap="0"> <mx:LineChart id="memoryChart" height="50%" width="100%" paddingLeft="0" paddingRight="10" showDataTips="true" dataProvider="{memoryUsages}"> <mx:horizontalAxis> <mx:CategoryAxis categoryField="Count" title="Memory Usage (KB)"/> </mx:horizontalAxis> <mx:series> <mx:LineSeries yField="Memory" form="curve" displayName="Memory Usage (KB)" lineStroke="{s1}"/> </mx:series> </mx:LineChart> <mx:LineChart id="timeChart" height="50%" width="100%" paddingLeft="0" paddingRight="10" showDataTips="true" dataProvider="{timeUsages}"> <mx:horizontalAxis> <mx:CategoryAxis categoryField="Count" title="Time Usage (ms)"/> </mx:horizontalAxis> <mx:series> <mx:LineSeries yField="Time" form="curve" displayName="Time Usage (ms)" lineStroke="{s2}"/> </mx:series> </mx:LineChart> </mx:VBox> </mx:HBox> </mx:VBox> </mx:Application>   7  Copyright © 2010 Serva Software All Rights Reserved