mwalk Platform 0.3.0

mwalk.visitor
Class BasicMetricVisitor

java.lang.Object
  |
  +--mwalk.visitor.AbstractVisitor
        |
        +--mwalk.visitor.PrintVisitor
              |
              +--mwalk.visitor.MetricVisitor
                    |
                    +--mwalk.visitor.BasicMetricVisitor
Direct Known Subclasses:
GatewayMetricVisitor, UpathMetricVisitor

public class BasicMetricVisitor
extends MetricVisitor

A basic implementation of a visitor that gathers metric data and saves it out to a file.

Version:
1.0
Author:
Robert Chalmers

Field Summary
private static java.lang.String CFG_BASE
          Base of keys in configuration file
private static java.lang.String DEF_FILENAME
          Default file name if none supplied
protected  boolean optMulti
           
protected  boolean optRun
           
 
Fields inherited from class mwalk.visitor.MetricVisitor
CFG_BASE, DEF_FILENAME, offset, periods, time, timeval
 
Fields inherited from class mwalk.visitor.PrintVisitor
CFG_BASE, def_filename, filename, ps
 
Fields inherited from class mwalk.visitor.AbstractVisitor
CFG_BASE, eval, seen, verbose
 
Constructor Summary
BasicMetricVisitor()
          Default constructor.
BasicMetricVisitor(long periods)
          Constructor.
BasicMetricVisitor(java.lang.String filename)
          Constructor.
BasicMetricVisitor(java.lang.String filename, long periods)
          Constructor.
 
Method Summary
protected  MetricCount addLinks(MetricCount count, int mlinks)
           
 boolean again(Tree tree)
          Check whether the visitor wants another pass over the tree.
protected  MetricCount doVisit(Tree tree, TreeNode node, java.util.Vector list)
           
 java.lang.String getFilename()
          Retrieve the current filename.
 boolean init(Tree tree)
          Initialize the visitor state.
protected  void printHeader(Tree tree)
          Print visitor's header info at start of file.
protected  void process(Tree tree)
           
 
Methods inherited from class mwalk.visitor.MetricVisitor
getChildren, getTime, incTime, postfix, setTime, startTime, visitDown, visitDown
 
Methods inherited from class mwalk.visitor.PrintVisitor
printData, printData, setFilename
 
Methods inherited from class mwalk.visitor.AbstractVisitor
cfgBoolean, cfgInt, cfgString, cfgVisitor, evaluator, evaluator, getParents, getReceivers, haveSeen, haveVisited, markSeen, markVisited, nextReceiver, prefix, reset, verbose, visitUp, visitUp, walkDown, walkUp
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

CFG_BASE

private static final java.lang.String CFG_BASE
Base of keys in configuration file

DEF_FILENAME

private static final java.lang.String DEF_FILENAME
Default file name if none supplied

optRun

protected boolean optRun

optMulti

protected boolean optMulti
Constructor Detail

BasicMetricVisitor

public BasicMetricVisitor()
Default constructor.

BasicMetricVisitor

public BasicMetricVisitor(java.lang.String filename)
Constructor.
Parameters:
String - new default filename

BasicMetricVisitor

public BasicMetricVisitor(long periods)
Constructor.
Parameters:
long - number of periods to cover session

BasicMetricVisitor

public BasicMetricVisitor(java.lang.String filename,
                          long periods)
Constructor.
Parameters:
String - new default filename
long - number of periods to cover session
Method Detail

getFilename

public java.lang.String getFilename()
Retrieve the current filename.
Overrides:
getFilename in class PrintVisitor
Returns:
String current filename

printHeader

protected void printHeader(Tree tree)
Print visitor's header info at start of file.
Overrides:
printHeader in class PrintVisitor
Parameters:
Tree - current tree instance

init

public boolean init(Tree tree)
Initialize the visitor state.
Overrides:
init in class MetricVisitor
Parameters:
Tree - current tree instance

again

public boolean again(Tree tree)
Check whether the visitor wants another pass over the tree.
Overrides:
again in class MetricVisitor
Parameters:
Tree - vistited tree
Returns:
boolean whether to walk again

doVisit

protected MetricCount doVisit(Tree tree,
                              TreeNode node,
                              java.util.Vector list)
Overrides:
doVisit in class MetricVisitor

addLinks

protected MetricCount addLinks(MetricCount count,
                               int mlinks)

process

protected void process(Tree tree)
                throws VisitException
Overrides:
process in class MetricVisitor

mwalk Platform 0.3.0

Submit a bug or feature mwalk Platform API Specification 0.3.0
Sensitivity: {Public:Research}
Copyright(c) 2000, Robert Chalmers