Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moobench
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
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SustainKieker
moobench
Commits
9e416c51
Commit
9e416c51
authored
8 years ago
by
Christian Wulf
Browse files
Options
Downloads
Patches
Plain Diff
refactored r script
parent
64c48104
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/r/response-time-of-chunks-of-calls-30-November-2016.pdf
+0
-0
0 additions, 0 deletions
bin/r/response-time-of-chunks-of-calls-30-November-2016.pdf
bin/r/response-time-of-chunks-of-calls.r
+9
-5
9 additions, 5 deletions
bin/r/response-time-of-chunks-of-calls.r
with
9 additions
and
5 deletions
bin/r/response-time-of-chunks-of-calls-30-November-2016.pdf
+
0
−
0
View file @
9e416c51
No preview for this file type
This diff is collapsed.
Click to expand it.
bin/r/response-time-of-chunks-of-calls.r
+
9
−
5
View file @
9e416c51
...
@@ -7,14 +7,17 @@ numFirstValuesToIgnore = 10000000
...
@@ -7,14 +7,17 @@ numFirstValuesToIgnore = 10000000
chunkSize
=
10000
chunkSize
=
10000
colors
=
c
(
"red"
,
"blue"
,
"green"
,
"black"
)
colors
=
c
(
"red"
,
"blue"
,
"green"
,
"black"
)
yVerticals
=
c
(
NA
,
2
,
NA
,
2
)
# returns a data.table (by default)
# returns a data.table (by default)
## which enhances/extends a data.frame
## which enhances/extends a data.frame
### which in turn is a list of vectors.
### which in turn is a list of vectors.
#### Each vector in the list represents a row with its column values.
#### Each vector in the list represents a row with its column values.
csvTable
=
fread
(
filename
,
skip
=
numFirstValuesToIgnore
)
csvTable
=
fread
(
filename
,
skip
=
numFirstValuesToIgnore
)
# csvTable with an additional column "id" which contains the row numbers
rowCount
=
csvTable
[,
.N
]
cat
(
sprintf
(
"\nYour input file contains %d lines.\n\n"
,
rowCount
))
# csvTable with an additional column "id" which contains the row numbers (necessary for grouping; see below)
csvTable
[,
id
:=
1
:
.N
]
csvTable
[,
id
:=
1
:
.N
]
print
(
csvTable
)
print
(
csvTable
)
...
@@ -22,13 +25,14 @@ print(csvTable)
...
@@ -22,13 +25,14 @@ print(csvTable)
# default column name: "V" followed by the column number
# default column name: "V" followed by the column number
thread
<-
csvTable
[[
"V1"
]]
thread
<-
csvTable
[[
"V1"
]]
time
<-
csvTable
[[
"V2"
]]
time
<-
csvTable
[[
"V2"
]]
# groupedTime is a table with "id" and "V1"
memory
<-
csvTable
[[
"V3"
]]
gcActivity
<-
csvTable
[[
"V4"
]]
# grouped*Time is a table with "id" and "V1"
groupedMaxTime
<-
csvTable
[,
max
(
V2
),
by
=
.
((
id
-1
)
%/%
chunkSize
)]
groupedMaxTime
<-
csvTable
[,
max
(
V2
),
by
=
.
((
id
-1
)
%/%
chunkSize
)]
groupedMeanTime
<-
csvTable
[,
mean
(
V2
),
by
=
.
((
id
-1
)
%/%
chunkSize
)]
groupedMeanTime
<-
csvTable
[,
mean
(
V2
),
by
=
.
((
id
-1
)
%/%
chunkSize
)]
groupedMedianTime
<-
csvTable
[,
median
(
V2
),
by
=
.
((
id
-1
)
%/%
chunkSize
)]
groupedMedianTime
<-
csvTable
[,
median
(
V2
),
by
=
.
((
id
-1
)
%/%
chunkSize
)]
groupedMinTime
<-
csvTable
[,
min
(
V2
),
by
=
.
((
id
-1
)
%/%
chunkSize
)]
groupedMinTime
<-
csvTable
[,
min
(
V2
),
by
=
.
((
id
-1
)
%/%
chunkSize
)]
memory
<-
csvTable
[[
"V3"
]]
gcActivity
<-
csvTable
[[
"V4"
]]
maxTimes
<-
groupedMaxTime
[[
"V1"
]]
maxTimes
<-
groupedMaxTime
[[
"V1"
]]
meanTimes
<-
groupedMeanTime
[[
"V1"
]]
meanTimes
<-
groupedMeanTime
[[
"V1"
]]
...
...
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