Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vlkb-soda
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
ViaLactea
vlkb-soda
Commits
e797a57a
Commit
e797a57a
authored
9 months ago
by
Robert Butora
Browse files
Options
Downloads
Patches
Plain Diff
adds soda exec time meas (System.nanoTime() based)
parent
ffefc997
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
data-access/servlet/src/main/java/ops/cli/ExecCmd.java
+16
-0
16 additions, 0 deletions
data-access/servlet/src/main/java/ops/cli/ExecCmd.java
data-access/servlet/src/main/java/webapi/ServletCutout.java
+2
-0
2 additions, 0 deletions
data-access/servlet/src/main/java/webapi/ServletCutout.java
with
18 additions
and
0 deletions
data-access/servlet/src/main/java/ops/cli/ExecCmd.java
+
16
−
0
View file @
e797a57a
...
...
@@ -73,6 +73,8 @@ class ExecCmd
LOGGER
.
info
(
"CMD: "
+
Arrays
.
toString
(
cmd
));
long
start_nsec
=
System
.
nanoTime
();
Runtime
rt
=
Runtime
.
getRuntime
();
Process
proc
=
rt
.
exec
(
cmd
);
...
...
@@ -82,6 +84,8 @@ class ExecCmd
// any output?
StreamGobbler
outputGobbler
=
new
StreamGobbler
(
proc
.
getInputStream
(),
"OUTPUT"
,
outputStream
);
long
meas1_nsec
=
System
.
nanoTime
();
// kick them off
outputGobbler
.
start
();
errorGobbler
.
start
();
...
...
@@ -89,9 +93,21 @@ class ExecCmd
outputGobbler
.
join
();
errorGobbler
.
join
();
long
meas2_nsec
=
System
.
nanoTime
();
exitValue
=
proc
.
waitFor
();
long
meas3_nsec
=
System
.
nanoTime
();
outputStream
.
flush
();
long
meas4_nsec
=
System
.
nanoTime
();
LOGGER
.
info
(
"RUNTIME[nsec] ExecCmd::doRun(): "
+
String
.
valueOf
((
long
)
Math
.
round
(
(
meas1_nsec
-
start_nsec
)/
1.0e6
))
+
" "
+
String
.
valueOf
((
long
)
Math
.
round
(
(
meas2_nsec
-
start_nsec
)/
1.0e6
))
+
" "
+
String
.
valueOf
((
long
)
Math
.
round
(
(
meas3_nsec
-
start_nsec
)/
1.0e6
))
+
" "
+
String
.
valueOf
((
long
)
Math
.
round
(
(
meas4_nsec
-
start_nsec
)/
1.0e6
)));
}
...
...
This diff is collapsed.
Click to expand it.
data-access/servlet/src/main/java/webapi/ServletCutout.java
+
2
−
0
View file @
e797a57a
...
...
@@ -244,6 +244,7 @@ public class ServletCutout extends HttpServlet
{
boolean
showDuration
=
settings
.
defaults
.
showDuration
;
long
startTime_msec
=
System
.
currentTimeMillis
();
long
startTime_nsec
=
System
.
nanoTime
();
ServletOutputStream
respOutputStream
=
response
.
getOutputStream
();
...
...
@@ -338,6 +339,7 @@ public class ServletCutout extends HttpServlet
respOutputStream
.
close
();
}
LOGGER
.
info
(
"RUNTIME[nsec] Servlet::execRequest: "
+
String
.
valueOf
(
System
.
nanoTime
()
-
startTime_nsec
));
}
private
String
convertLocalPathnameToRemoteUrl
(
String
localPathname
,
...
...
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