Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_TIMING_UNITS
The default timing units.
|
static String |
EMPTY_DIRECTORY_SIZE
The size of an empty directory as reported by du -s
|
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,
float clnup_size,
float no_clnup_size)
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 maxTime,
float maxSpace)
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(SpaceUsage su,
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 EMPTY_DIRECTORY_SIZE
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)
initialize
in interface Plot
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(SpaceUsage su, char unit, String timeUnits) throws IOException
plot
in interface Plot
su
- the SpaceUsage.unit
- the unit in which we need to plot. (K,M,G)timeUnits
- the time unit.IOException
- in case of unable to write to the file.public void generateScriptFile(String name, String dataFile, String yUnits, float maxTime, float maxSpace) throws IOException
name
- the path to the script file.dataFile
- the path to corresponding data file.yUnits
- the units for the space value.maxTime
- the time in seconds.maxSpace
- the maximum space.IOException
protected 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, float clnup_size, float no_clnup_size)
job
- the name of the associated job.time
- the timeclnup_size
- the size with cleanupno_clnup_size
- the size without cleanupprivate 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.