Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ptaskTracer
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
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Forget Julien
ptaskTracer
Commits
8eadc374
Commit
8eadc374
authored
6 years ago
by
Lipari Giuseppe
Browse files
Options
Downloads
Patches
Plain Diff
added an option to specify program arguments
parent
32ed98fb
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ptaskTracer.sh
+13
-7
13 additions, 7 deletions
ptaskTracer.sh
with
13 additions
and
7 deletions
ptaskTracer.sh
+
13
−
7
View file @
8eadc374
...
@@ -22,6 +22,11 @@ while [[ $# -gt 0 ]]; do
...
@@ -22,6 +22,11 @@ while [[ $# -gt 0 ]]; do
shift
# past argument
shift
# past argument
shift
# past value
shift
# past value
;;
;;
-a
|
--args
)
ARGS
=
"
$2
"
shift
# past argument
shift
# past value
;;
-p
|
--path
)
-p
|
--path
)
APPPATH
=
"
$2
"
APPPATH
=
"
$2
"
shift
shift
...
@@ -95,8 +100,9 @@ if [[ "$HELP" = true ]]; then # showing help
...
@@ -95,8 +100,9 @@ if [[ "$HELP" = true ]]; then # showing help
echo
""
echo
""
echo
"With option --old no tracing is performed, the trace analysed will be build/[APP_NAME]_raw.txt"
echo
"With option --old no tracing is performed, the trace analysed will be build/[APP_NAME]_raw.txt"
echo
"These parameters are optional :"
echo
"These parameters are optional :"
echo
"<-o|--output OUTPUT> to specifie directory where all output in build/ is generated"
echo
"<-a|--args ARGS> arguments to the program"
echo
"<-i|--input INPUT> to specifie directory of old build/[APP_NAME]_raw.txt"
echo
"<-o|--output OUTPUT> to specify directory where all output in build/ is generated"
echo
"<-i|--input INPUT> to specify directory of old build/[APP_NAME]_raw.txt"
echo
"<-t|--time TRACING_TIME> for tracing time in second, must be unsigned double (default: 4s)"
echo
"<-t|--time TRACING_TIME> for tracing time in second, must be unsigned double (default: 4s)"
echo
"<-s|--scale PRINT_SCALE> for printing scale, must be unsigned double (default: 1000.0px/s)"
echo
"<-s|--scale PRINT_SCALE> for printing scale, must be unsigned double (default: 1000.0px/s)"
echo
"<-h|--theight TASK_HEIGTH> for printing task height in px, must be unsigned double (default: 20.0px)"
echo
"<-h|--theight TASK_HEIGTH> for printing task height in px, must be unsigned double (default: 20.0px)"
...
@@ -147,7 +153,7 @@ else # no svg option
...
@@ -147,7 +153,7 @@ else # no svg option
fi
fi
else
else
echo
"Unspecified application path -p or --path"
echo
"Unspecified application path -p or --path"
echo
"Using current dir
r
ecory"
echo
"Using current direc
t
ory"
APPPATH
=
"."
APPPATH
=
"."
fi
fi
if
[[
-n
"
$TIME
"
]]
;
then
if
[[
-n
"
$TIME
"
]]
;
then
...
@@ -218,13 +224,13 @@ if ! [[ -f "/usr/local/lib/w3c.jar" ]]; then # checking jar java libs
...
@@ -218,13 +224,13 @@ if ! [[ -f "/usr/local/lib/w3c.jar" ]]; then # checking jar java libs
echo
"Java jar lib w3c not found in /usr/local/lib, please run inslall.sh"
echo
"Java jar lib w3c not found in /usr/local/lib, please run inslall.sh"
exit
1
exit
1
elif
!
[[
-f
"/usr/local/lib/antlr-4.7.2-complete.jar"
]]
;
then
elif
!
[[
-f
"/usr/local/lib/antlr-4.7.2-complete.jar"
]]
;
then
echo
"Java jar lib antlr-4.7.2-complete not found in /usr/local/lib, please run ins
l
all.sh"
echo
"Java jar lib antlr-4.7.2-complete not found in /usr/local/lib, please run ins
t
all.sh"
exit
1
exit
1
elif
!
[[
-f
"/usr/local/lib/batik-1.10/lib/batik-all-1.10.jar"
]]
;
then
elif
!
[[
-f
"/usr/local/lib/batik-1.10/lib/batik-all-1.10.jar"
]]
;
then
echo
"Java jar lib batik-all-1.10 not found in /usr/local/lib/batik-1.10/lib, please run ins
l
all.sh"
echo
"Java jar lib batik-all-1.10 not found in /usr/local/lib/batik-1.10/lib, please run ins
t
all.sh"
exit
1
exit
1
elif
!
[[
-f
"/usr/local/lib/ptaskTracer-1.0.jar"
]]
;
then
elif
!
[[
-f
"/usr/local/lib/ptaskTracer-1.0.jar"
]]
;
then
echo
"Java jar lib ptaskTracer-1.0 not found in /usr/local/lib, please run ins
l
all.sh"
echo
"Java jar lib ptaskTracer-1.0 not found in /usr/local/lib, please run ins
t
all.sh"
exit
1
exit
1
fi
fi
echo
-e
"[
\0
33[0;32mOK
\0
33[0m]"
echo
-e
"[
\0
33[0;32mOK
\0
33[0m]"
...
@@ -277,7 +283,7 @@ if [[ -z "$OLD" ]]; then
...
@@ -277,7 +283,7 @@ if [[ -z "$OLD" ]]; then
if
[
$?
-eq
1
]
;
then
if
[
$?
-eq
1
]
;
then
echo
"lttng start error: session not started"
echo
"lttng start error: session not started"
fi
fi
sudo
sh
-c
"exec ./
${
APPPATH
}
/
${
APP
}
> /dev/null &"
sudo
sh
-c
"exec ./
${
APPPATH
}
/
${
APP
}
${
ARGS
}
> /dev/null &"
if
[
$?
-eq
1
]
;
then
if
[
$?
-eq
1
]
;
then
echo
"Application
$APP
not started"
echo
"Application
$APP
not started"
exit
1
exit
1
...
...
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