-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/console mode #95
base: master
Are you sure you want to change the base?
Conversation
Added few unittests for this feature |
@Pitterling could you please let me know, what is needed for merging this functionality into repository? I need some feedback, thank you. |
@@ -156,8 +159,7 @@ public int parse(String line, String[] columns) { | |||
GraphConfig mygraphinfo = myosconfig.getGraphConfig(checkStat); | |||
if (mygraphinfo != null) { | |||
if ("unique".equals(mygraphinfo.getType())) { | |||
obj = new Graph(mysar, mygraphinfo, mygraphinfo.getTitle(), line, firstdatacolumn, | |||
mysar.graphtree); | |||
obj = new Graph(mysar, mygraphinfo, mygraphinfo.getTitle(), line, firstdatacolumn, mysar.graphtree); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please refrain from interleaving refactorings and feature commits in the same PR.
Refactoring is good, however it would be nice to have those separated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
side effect of auto formatting in IDE
@@ -20,6 +20,32 @@ | |||
|
|||
public abstract class AllParser { | |||
|
|||
protected String sarStartDate = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please refrain from moving things around in the same commit/PR as the feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved declarations back
static Config config = null; | ||
static GlobalOptions globaloptions = null; | ||
static ResourceBundle resource = ResourceBundle.getBundle("net/atomique/ksar/Language/Message"); | ||
|
||
public static void usage() { | ||
show_version(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have you removed this version info?
log.info("-outputPDF : location of output pdf file\n"); | ||
log.info("-outputIMG : prefix for output images\n"); | ||
log.info("-width : width for output png charts\n"); | ||
log.info("-heigth : heigth for output png charts"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
height
should be spelled as height
.
Of course naming is hard, however it looks odd to have width
and height
options dedicated to png
.
What if we require pdf page width/height?
I think imgWidth
would be better.
PS. Something like https://github.com/airlift/airline or https://github.com/tatsuhiro-t/argparse4j might make sense to parse the options
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was refering to previous version of kSar where console mode was working
It was following
-width : make JPG/PNG with specified width size (default: 800)
-height : make JPG/PNG with specified height size (default: 600)
BTW there is full output for help in older version
-version: show kSar version number
-help: show this help
-input : argument must be either ssh://user@host/command or cmd://command o
r file://path/to/file or just /path/to/file
-graph : space separated list of graph you want to be outputed
-showCPUstacked: will make the CPU used graph as stacked
-showMEMstacked: will make the Memory graph as stacked (linux only)
-cpuFixedAxis: will graph CPU used with fixed axis from 0% to 100%
-showIntrListstacked : will make the Interrupt List graph as stacked
-showTrigger: will show trigger on graph (disabled by default)
-noEmptyDisk: will not export disk with no data
-tile: will tile window
-userPrefs: will use the userPrefs for outputing graphs (last export of this hos
t)
-showOnlygraphName: will only print graph name available for that data (to be us
e for -graph)
-addHTML: will create an html page with PNG/JPG image
-outputPDF : output the pdf report to the pdf file
-outputPNG : output the graphs to PNG file using argument as bas
e filename
-outputJPG : output the graphs to JPG file using argument as bas
e filename
-outputCSV : output the CSV file
-width : make JPG/PNG with specified width size (default: 800)
-height : make JPG/PNG with specified height size (default: 600)
-startdate : will graph the range begining at that time
-enddate : will graph the range until that date
-solarisPagesize : will set solaris pagesize
-wizard: open with unified login popup
-replaceShortcut : replace all shortcut with those in the xml file
-addShortcut : add shortcut from the xml file
-startup: open window marked for opening at startup
@elkrieg @vlsi Please have a look to this implementation New command line arguments with PDF/CSV export@ppalucha/ksar2 should we consider using org.apache.commons.cli ? |
No description provided.