Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pmx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Descartes Research
pmx
Commits
69945d94
Commit
69945d94
authored
8 years ago
by
Jürgen Walter
Browse files
Options
Downloads
Patches
Plain Diff
improvements to console
parent
e72d1123
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools.descartes.pmx.console/src/tools/descartes/pmx/console/PMXCommandLine.java
+16
-11
16 additions, 11 deletions
...nsole/src/tools/descartes/pmx/console/PMXCommandLine.java
with
16 additions
and
11 deletions
tools.descartes.pmx.console/src/tools/descartes/pmx/console/PMXCommandLine.java
+
16
−
11
View file @
69945d94
...
...
@@ -66,7 +66,7 @@ public class PMXCommandLine {
private
static
final
String
CMD_LONG_OPT_INPUT_DIR
=
"trace-file"
;
private
static
final
String
CMD_LONG_OPT_CONFIG_FILE
=
"pmx-config"
;
private
static
final
String
CMD_LONG_OPT_OUTPUT_DIR
=
"output-dir"
;
private
static
final
String
CMD_OPT_NUM_CORE
=
"
numC
ore"
;
private
static
final
String
CMD_OPT_NUM_CORE
=
"
c
ore
s
"
;
private
static
final
HelpFormatter
commandLineFormatter
=
new
HelpFormatter
();
private
static
final
String
toolName
=
"Performance Model eXtractor(PMX)"
;
...
...
@@ -122,13 +122,13 @@ public class PMXCommandLine {
Option
ignoreAfterOption
=
OptionBuilder
.
create
(
"a"
);
options
.
addOption
(
ignoreAfterOption
);
OptionBuilder
.
withArgName
(
"
long
"
);
OptionBuilder
.
hasArg
s
();
OptionBuilder
.
withArgName
(
"
cores
"
);
OptionBuilder
.
hasArg
();
OptionBuilder
.
withLongOpt
(
PMXCommandLine
.
CMD_OPT_NUM_CORE
);
OptionBuilder
.
isRequired
(
false
);
OptionBuilder
.
withDescription
(
"specifies number of cores for
a
host"
);
OptionBuilder
.
withDescription
(
"specifies number of
CPU
cores for host
s
"
);
OptionBuilder
.
withValueSeparator
(
' '
);
Option
numCoresOption
=
OptionBuilder
.
create
(
"
cores
"
);
Option
numCoresOption
=
OptionBuilder
.
create
(
"
n
"
);
options
.
addOption
(
numCoresOption
);
}
...
...
@@ -166,7 +166,7 @@ public class PMXCommandLine {
//--help is no error even if the required file path is missing
}
else
{
log
.
info
(
"Error parsing arguments:"
+
s
);
log
.
info
(
e
.
getMessage
());
//
log.info(e.getMessage());
}
PMXCommandLine
.
printUsage
();
}
...
...
@@ -198,11 +198,16 @@ public class PMXCommandLine {
return
controller
;
}
catch
(
NullPointerException
e
)
{
//PMXCommandLine.printUsage();
log
.
info
(
e
);
log
.
info
(
"Nullpointer in class "
+
e
.
getStackTrace
()[
0
].
getClass
()
+
", method "
+
e
.
getStackTrace
()[
0
].
getMethodName
()
+
", Line "
+
e
.
getStackTrace
()[
0
].
getLineNumber
());
}
catch
(
IllegalArgumentException
e
)
{
log
.
info
(
e
);
log
.
info
(
"IllegalArgumentException in class "
+
e
.
getStackTrace
()[
0
].
getClass
()
+
", method "
+
e
.
getStackTrace
()[
0
].
getMethodName
()
+
", Line "
+
e
.
getStackTrace
()[
0
].
getLineNumber
());
}
catch
(
IOException
e
)
{
log
.
info
(
e
);
log
.
info
(
"IOException in class "
+
e
.
getStackTrace
()[
0
].
getClass
()
+
", method "
+
e
.
getStackTrace
()[
0
].
getMethodName
()
+
", Line "
+
e
.
getStackTrace
()[
0
].
getLineNumber
());
}
return
null
;
...
...
@@ -284,7 +289,7 @@ public class PMXCommandLine {
ConsoleAppender
consoleAppender
=
new
ConsoleAppender
(
simpleLayout
);
BasicConfigurator
.
configure
(
consoleAppender
);
}
catch
(
Exception
ex
)
{
log
.
error
(
ex
);
log
.
error
(
"Error during inialization of logging"
);
}
}
...
...
@@ -296,7 +301,7 @@ public class PMXCommandLine {
FileAppender
fileAppender
=
new
FileAppender
(
layout
,
logFileName
,
false
);
BasicConfigurator
.
configure
(
fileAppender
);
}
catch
(
Exception
ex
)
{
log
.
error
(
ex
);
log
.
error
(
"Error during inialization of logging"
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment