Java Doc for MetricsPlugin.java in  » Science » Cougaar12_4 » org » cougaar » tools » csmart » runtime » plugin » 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.tools.csmart.runtime.plugin 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.cougaar.tools.csmart.runtime.plugin.CSMARTPlugin
   org.cougaar.tools.csmart.runtime.plugin.MetricsPlugin

MetricsPlugin
public class MetricsPlugin extends CSMARTPlugin implements MetricsConstants(Code)
Collect statistics on Agent operation.
This Plugin should be included in each Agent for which you want to collect statistics.
Note that some statistics are per-Node however.

This plugin is driven by control tasks, sent from a single instance of the MetricsInitializerPlugin.
Statistics are written to the standard log file, and also written, one line per sample, to a separate statistics results file.
The file written is named _results.txt.
If provided, the first parameter indicates the directory in which to write the file. By default, it is written in the working directory.
The following statistics are always written:
Sample length in seconds
CPU seconds used by Node during sample
(NOTE: This CPU statistic required the separate CpuClock shared library, included with the this module. If you do not compile and install this library, you will see a warning exception, which can be ignored.

x1 Memory used by Node in Megabytes
Total memory allocated to the Node in megabytes

Then come some statistics recorded only if the MessageStatisticsService was requested, which is the default setting:
Message Queue Length (a per-Node statistic)
MessageBytes Sent (per-Node)
Messages sent (per-Node)

Then this statistic is always written:
Count of non-Metrics related Tasks with an associated high-confidence AllocationResult

Optional argument, statistics: If a second optional parameter is given, the plugin will count the tasks with the given Verb that go by.
It will also count the time since the first task with that Verb went by.
For example, use this to count the Transport tasks, or to see how long after a DetermineRequirements Task things get busy.

So this optional argument results in 3 additional statistics:
Time since first Task with the Verb
Number of Tasks in this interval with the verb
Total Tasks seen with the verb

Other statistics are gathered from the various services which provide measurements.
These statistics can be turned on/off via additional optional 1/0 arguments.
By default however, only the basic set of statistics is gathered.
First, Blackboard statistics (off by default):
Count of Assets on this Agent's Blackboard
PlanElements on this Blackboard
Tasks on the Blackboard
Total Objects on this Blackboard

Prototype Registry (off by default):
Cached Prototypes
Property Providers
Prototype Providers

Node Metrics (off by default):
Active threads in the COUGAAR group (a per-Node stat)
Free memory (bytes) in this Node's allocation
Total memory (bytes) in this Node's allocation

Message Watcher (off by default):
Directives received by this Agent
Directives sent
Notifications received by this Agent
Notifications sent by this Agent

So the full usage is:
MetricsPlugin Usage: [[],[], [<1 or 0>], [<1 or 0>],[<1 or 0>],[<1 or 0>],[<1 or 0>]] -- where the [1/0] indicates turning on or off the following services for Metrics collection: BlackboardService, PrototypeRegistryService, NodeMetricsService, MessageStatsService, and MessageWatcherService. Default is to use only the MessageStatsService


See Also:   CSMARTPlugin
See Also:   MetricsConstants
See Also:   MetricsInitializerPlugin

Inner Class :class MessageWatcher implements MessageTransportWatcher

Field Summary
final public static  StringRESULTS_FILENAME_SUFFIX
    
protected  MessageWatcher_messageWatcher
    
static  NumberFormatmemoryFormat
    
public  UnaryPredicatemyTasksPredicate
    
 booleanstarted
    
static  NumberFormattimeFormat
    


Method Summary
public  voidexecute()
    
public  voidsetupSubscriptions()
    

Field Detail
RESULTS_FILENAME_SUFFIX
final public static String RESULTS_FILENAME_SUFFIX(Code)



_messageWatcher
protected MessageWatcher _messageWatcher(Code)



memoryFormat
static NumberFormat memoryFormat(Code)



myTasksPredicate
public UnaryPredicate myTasksPredicate(Code)



started
boolean started(Code)



timeFormat
static NumberFormat timeFormat(Code)





Method Detail
execute
public void execute()(Code)



setupSubscriptions
public void setupSubscriptions()(Code)



Fields inherited from org.cougaar.tools.csmart.runtime.plugin.CSMARTPlugin
protected LoggingService log(Code)(Java Doc)
protected PlanningFactory theLDMF(Code)(Java Doc)

Methods inherited from org.cougaar.tools.csmart.runtime.plugin.CSMARTPlugin
abstract protected void execute()(Code)(Java Doc)
public UID getUID()(Code)(Java Doc)
public void load() throws StateModelException(Code)(Java Doc)
final protected void publishAdd(Object o)(Code)(Java Doc)
final protected void publishAdd(Object o, UnaryPredicate pred)(Code)(Java Doc)
final protected void publishChange(Object o)(Code)(Java Doc)
final protected void publishChange(Object o, UnaryPredicate pred)(Code)(Java Doc)
final protected void publishRemove(Object o)(Code)(Java Doc)
final protected void publishRemove(Object o, UnaryPredicate pred)(Code)(Java Doc)
abstract protected void setupSubscriptions()(Code)(Java Doc)
protected Subscription subscribe(UnaryPredicate pred)(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.