Java Doc for Jips.java in  » Science » Cougaar12_4 » org » cougaar » qos » qrs » sysstat » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Science » Cougaar12_4 » org.cougaar.qos.qrs.sysstat 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.cougaar.qos.qrs.sysstat.SysStatHandler
      org.cougaar.qos.qrs.sysstat.Jips

Jips
public class Jips extends SysStatHandler implements Runnable(Code)
This is a JVM+Host microbenchmark facility designed to determine the CAPACITY of a specific Java Virtual machine running on a specific host. We have found that the version of JVM makes a big difference in the application performance, orders of magnitudes, as well as the MIPS of the host. This benchmark tries to unify the hosts BogoMIPS measures and JVM version. Obviously to be valid the benchmark must be run under the same JAVA VM as the application. The goal is to measure JVM+host Capacity. We need to remove all the possible sources of latency variation, such as clock granularity, OS scheduling, memory swapping, and garbage collection. Given Java's clock granularity of 1 msec, we should run the test for at least 100ms to get 1% accuracy. Unfortunately 100ms is longer than the OS scheduling increment, such as a Linux Jiffy which is 10ms. NOTE RUNNING FOR A LONGER TIME DOES NOT HELP, because OS scheduling other tasks, and garbage collection will then be "averaged" into the measurements. The scheme is: 1) Estimate the number of benchmark iterations that will run a test for around 100ms. 2) Run COUNT tests with a SLEEP of msec between the tests. The sleep is to help the benchmark process from being marked as greedy by the OS. Hence sleeping reduces the probability of being preempted during the test by some other job. 3) Pick the fastest time as best estimator for the maximum Capacity. Used to pick the second fastest because the fastest might be a bad measurement (the best seems fine) 4) Return JIPS (Java Instructions Per Second) Jips = (benchmarkIterations / BestTime) * INST_PER_ITER We have run benchmark on hosts with a load average of 10 and have got the same Jips as when run with a unloaded host. This work despite an under estimate of the number of iterations for 100ms. Jips comes with with 3 built in benchmarks, You are encouraged to experiment with others: 0 measures the overhead of the loop. 1 measures time to add two integers (Default) 2 measures time to add two floats Problems: What if the application excapes to C code, such as array copy, sockets, or compression?


Field Summary
final public static  intCOUNT
    
final public static  int[]INST_PER_ITER
    
final public static  intMEM_SIZE
    
final public static  intMEM_SIZE_MINUS_1
    
final public static  doublePERIOD
    
final public static  intSLEEP
    
final public static  intTYPE
    

Constructor Summary
public  Jips(int type)
    
public  Jips()
    

Method Summary
public  intestimateN(int n, double target)
    
 DataValuegetData()
    
public  voidgetData(Map<String, DataValue> map)
    
public  voidincD(double value)
    
public  voidincI(int value)
    
public  voidincM(int value)
    
public  voidinitialize(String host, int pid)
    
public static  voidmain(String args)
    
public  voidprintResults(double[] results)
    
public  voidrun()
    
public  doublerunTests(double target, int count, int sleepMsec)
    
public  doubletime(int n)
    

Field Detail
COUNT
final public static int COUNT(Code)



INST_PER_ITER
final public static int[] INST_PER_ITER(Code)



MEM_SIZE
final public static int MEM_SIZE(Code)



MEM_SIZE_MINUS_1
final public static int MEM_SIZE_MINUS_1(Code)



PERIOD
final public static double PERIOD(Code)



SLEEP
final public static int SLEEP(Code)



TYPE
final public static int TYPE(Code)




Constructor Detail
Jips
public Jips(int type)(Code)



Jips
public Jips()(Code)




Method Detail
estimateN
public int estimateN(int n, double target)(Code)



getData
DataValue getData()(Code)



getData
public void getData(Map<String, DataValue> map)(Code)



incD
public void incD(double value)(Code)



incI
public void incI(int value)(Code)



incM
public void incM(int value)(Code)



initialize
public void initialize(String host, int pid)(Code)



main
public static void main(String args)(Code)



printResults
public void printResults(double[] results)(Code)



run
public void run()(Code)



runTests
public double runTests(double target, int count, int sleepMsec)(Code)



time
public double time(int n)(Code)



Fields inherited from org.cougaar.qos.qrs.sysstat.SysStatHandler
final static String PROVENANCE(Code)(Java Doc)

Methods inherited from org.cougaar.qos.qrs.sysstat.SysStatHandler
abstract protected void getData(Map<String, DataValue> map)(Code)(Java Doc)
public static SysStatHandler getHandler(String kind, String host, int pid) throws NoSysStatHandler(Code)(Java Doc)
public Double getLoadAvgFromOS()(Code)(Java Doc)
abstract protected void initialize(String host, int pid)(Code)(Java Doc)
protected double parseValue(String string) throws NumberFormatException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.