public class Ploticus extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_TIMING_UNITS
The default timing units.
|
static String |
HOURS_TIMING_UNITS
The minutes unit for the x axis.
|
private String |
mBasename
The basename of the files.
|
private String |
mDirectory
The directory where the files are to be generated.
|
static String |
MINUTES_TIMING_UNITS
The minutes unit for the x axis.
|
private LogManager |
mLogger
The handle to the logging object.
|
private NumberFormat |
mNumFormatter
The number formatter to format the float entries.
|
private String |
mTimeUnits
The time units.
|
private boolean |
mUseStatInfo
A boolean indicating whether to use stat info or not.
|
| Constructor and Description |
|---|
Ploticus()
The default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
constructEntry(String job,
float time,
long measurement)
Returns an entry that needs to be plotted in the graph.
|
private float |
convertFromSecondsTo(long time,
String units)
Converts from seconds to one of the units specified.
|
void |
generateScriptFile(String name,
String dataFile,
String yUnits,
float maxX,
float maxY)
Generates the script file required to give as input to ploticus.
|
protected String |
getFilename(String site,
String suffix)
Returns the filename of the ploticus file to be generated.
|
void |
initialize(String directory,
String basename,
boolean useStatInfo)
Initializer method.
|
List |
plot(WorkflowMeasurements wm,
char unit,
String timeUnits)
Plot out the space usage.
|
private boolean |
validTimeUnits(String units)
Returns a boolean indicating if a valid time unit or not.
|
public static final String DEFAULT_TIMING_UNITS
public static final String MINUTES_TIMING_UNITS
public static final String HOURS_TIMING_UNITS
private String mDirectory
private String mBasename
private boolean mUseStatInfo
private LogManager mLogger
private NumberFormat mNumFormatter
private String mTimeUnits
public void initialize(String directory, String basename, boolean useStatInfo)
directory - the directory where the plots need to be generated.basename - the basename for the files that are generated.useStatInfo - boolean indicating whether to use stat info or not.public List plot(WorkflowMeasurements wm, char unit, String timeUnits) throws IOException
wm - the workflow measurements.unit - the unit in which we need to plot the number.timeUnits - units in which to plot time.IOException - in case of unable to write to the file.public void generateScriptFile(String name, String dataFile, String yUnits, float maxX, float maxY) throws IOException
name - the path to the script file.dataFile - the path to corresponding data file.yUnits - the units for the space value.maxX - the time in seconds.maxY - the maximum space.IOExceptionprotected String getFilename(String site, String suffix)
site - the site handle.suffix - the suffix to be applied to the file.protected String constructEntry(String job, float time, long measurement)
job - the name of the associated job.time - the timemeasurement - measurementprivate float convertFromSecondsTo(long time,
String units)
time - the time.units - the unitsprivate boolean validTimeUnits(String units)
units - the time unit.Copyright © 2011 The University of Southern California. All Rights Reserved.