Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fts_benchmarking_tool
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
santosh8
fts_benchmarking_tool
Commits
b17c9efe
Commit
b17c9efe
authored
2 years ago
by
Ubuntu
Browse files
Options
Downloads
Patches
Plain Diff
updating Graphs
parent
8ba97586
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Graphs.py
+8
-8
8 additions, 8 deletions
Graphs.py
fts_benchmarking_tool.py
+7
-5
7 additions, 5 deletions
fts_benchmarking_tool.py
with
15 additions
and
13 deletions
Graphs.py
100644 → 100755
+
8
−
8
View file @
b17c9efe
...
@@ -9,22 +9,23 @@ import os
...
@@ -9,22 +9,23 @@ import os
#get the list of files in the directory with .txt extension
#get the list of files in the directory with .txt extension
files
=
[
f
for
f
in
os
.
listdir
(
'
.
'
)
if
os
.
path
.
isfile
(
f
)]
files
=
[
f
for
f
in
os
.
listdir
(
'
.
'
)
if
os
.
path
.
isfile
(
f
)]
files
=
[
f
for
f
in
files
if
f
.
endswith
(
'
.txt
'
)]
files
=
[
f
for
f
in
files
if
f
.
endswith
(
'
.txt
'
)]
db_name
=
file
.
split
(
'
_
'
)[
0
]
db_name
=
file
s
[
0
]
.
split
(
'
_
'
)[
0
]
d
=
defaultdict
(
lambda
:[
0
,
0
])
d
=
defaultdict
(
lambda
:[
0
,
0
])
dr_latency
=
{
10
:[],
50
:[],
100
:[],
500
:[]}
dr_latency
=
{
10
:[],
50
:[],
100
:[],
500
:[]}
dr_latency_per_vm
=
defaultdict
(
lambda
:
0
)
dr_latency_per_vm
=
defaultdict
(
lambda
:
0
)
du_latency
=
{
10
:[],
50
:[],
100
:[],
500
:[]}
du_latency
=
{
10
:[],
50
:[],
100
:[],
500
:[]}
no_of_vms
=
0
for
file
in
files
:
for
file
in
files
:
if
(
'
load
'
in
file
):
if
(
'
load
'
in
file
):
continue
continue
#open the file
f
=
open
(
file
,
'
r
'
)
f
=
open
(
file
,
'
r
'
)
vm
=
file
.
split
(
'
_
'
)[
-
1
].
split
(
'
.
'
)[
0
]
vm
=
file
.
split
(
'
_
'
)[
-
1
].
split
(
'
.
'
)[
0
]
vm
=
int
(
vm
)
vm
=
int
(
vm
)
no_of_vms
=
max
(
no_of_vms
,
vm
)
thread_count
=
file
.
split
(
'
_
'
)[
-
2
]
thread_count
=
file
.
split
(
'
_
'
)[
-
2
]
thread_count
=
int
(
thread_count
)
thread_count
=
int
(
thread_count
)
...
@@ -107,15 +108,15 @@ tup=[]
...
@@ -107,15 +108,15 @@ tup=[]
for
i
in
d
:
for
i
in
d
:
tup
.
append
([
d
[
i
][
1
],
i
[
0
],
d
[
i
][
0
]])
tup
.
append
([
d
[
i
][
1
],
i
[
0
],
d
[
i
][
0
]])
tup
.
sort
(
key
=
lambda
x
:(
x
[
0
],
x
[
1
]))
tup
.
sort
(
key
=
lambda
x
:(
x
[
0
],
x
[
1
]))
for
i
in
tup
:
print
(
i
)
keys
=
[
10
,
50
,
100
,
500
]
keys
=
[
10
,
50
,
100
,
500
]
final_dict
=
{}
final_dict
=
{}
for
_
in
keys
:
for
_
in
keys
:
final_dict
[
_
]
=
[]
final_dict
[
_
]
=
[]
for
i
in
range
(
5
):
for
i
in
range
(
no_of_vms
):
if
len
(
tup
)
==
0
:
break
tmp
=
tup
.
pop
(
0
)
tmp
=
tup
.
pop
(
0
)
final_dict
[
_
].
append
([
tmp
[
1
],
tmp
[
2
]])
final_dict
[
_
].
append
([
tmp
[
1
],
tmp
[
2
]])
final_dict
[
_
].
sort
()
final_dict
[
_
].
sort
()
...
@@ -133,7 +134,6 @@ for threads in final_dict:
...
@@ -133,7 +134,6 @@ for threads in final_dict:
data
=
final_dict2
data
=
final_dict2
threads
=
sorted
(
data
[
'
Threads
'
].
keys
())
threads
=
sorted
(
data
[
'
Threads
'
].
keys
())
vms
=
sorted
(
set
(
data
[
'
Threads
'
][
threads
[
0
]][
'
VMs
'
]))
vms
=
sorted
(
set
(
data
[
'
Threads
'
][
threads
[
0
]][
'
VMs
'
]))
throughputs
=
{
vm
:
[
data
[
'
Threads
'
][
thread
][
'
Throughput
'
][
vm
-
1
]
for
thread
in
threads
]
for
vm
in
vms
}
throughputs
=
{
vm
:
[
data
[
'
Threads
'
][
thread
][
'
Throughput
'
][
vm
-
1
]
for
thread
in
threads
]
for
vm
in
vms
}
...
...
This diff is collapsed.
Click to expand it.
fts_benchmarking_tool.py
100644 → 100755
+
7
−
5
View file @
b17c9efe
...
@@ -20,11 +20,11 @@ workload = args.workload
...
@@ -20,11 +20,11 @@ workload = args.workload
def
get_load_command
(
db
,
load
,
vm
):
def
get_load_command
(
db
,
load
,
vm
):
ret
=
[]
ret
=
[]
if
db
==
"
redis
"
:
if
db
==
"
redis
"
:
for
thread
in
[
10
]:
for
thread
in
[
10
,
50
,
100
,
500
]:
threads
=
thread
//
vm
threads
=
thread
//
vm
ret
.
append
(
"
./bin/ycsb load redis -p recordcount={} -p redis.host=
'
{}
'
-p redis.port=6379 -P workloads/workload{} -p redis.cluster=true > /tmp/redis_load_out_{}_{}.txt
"
.
format
(
load
//
vm
,
endpoint
,
workload
,
threads
,
vm
))
ret
.
append
(
"
./bin/ycsb load redis -p recordcount={} -p redis.host=
'
{}
'
-p redis.port=6379 -P workloads/workload{} -p redis.cluster=true > /tmp/redis_load_out_{}_{}.txt
"
.
format
(
load
//
vm
,
endpoint
,
workload
,
threads
,
vm
))
elif
db
==
"
memcached
"
:
elif
db
==
"
memcached
"
:
for
thread
in
[
10
]:
for
thread
in
[
10
,
50
,
100
,
500
]:
threads
=
thread
//
vm
threads
=
thread
//
vm
ret
.
append
(
"
./bin/ycsb load memcached -p recordcount={} -P workloads/workload{} -p memcached.hosts={}:11211> /tmp/memcached_load_out_{}_{}.txt
"
.
format
(
load
//
vm
,
workload
,
endpoint
,
threads
,
vm
))
ret
.
append
(
"
./bin/ycsb load memcached -p recordcount={} -P workloads/workload{} -p memcached.hosts={}:11211> /tmp/memcached_load_out_{}_{}.txt
"
.
format
(
load
//
vm
,
workload
,
endpoint
,
threads
,
vm
))
return
ret
[
0
]
return
ret
[
0
]
...
@@ -32,11 +32,11 @@ def get_load_command(db, load, vm):
...
@@ -32,11 +32,11 @@ def get_load_command(db, load, vm):
def
get_run_command
(
db
,
load
,
vm
):
def
get_run_command
(
db
,
load
,
vm
):
ret
=
[]
ret
=
[]
if
db
==
"
redis
"
:
if
db
==
"
redis
"
:
for
thread
in
[
10
,
50
,
100
,
500
]:
for
thread
in
[
10
,
50
,
100
,
500
]:
threads
=
thread
//
vm
threads
=
thread
//
vm
ret
.
append
(
"
./bin/ycsb run redis -p operationcount={} -p redis.host=
'
{}
'
-p redis.port=6379 -P workloads/workload{} -p redis.cluster=true> /tmp/redis_run_out_{}_{}.txt
"
.
format
(
load
//
vm
,
endpoint
,
workload
,
threads
,
vm
))
ret
.
append
(
"
./bin/ycsb run redis -p operationcount={} -p redis.host=
'
{}
'
-p redis.port=6379 -P workloads/workload{} -p redis.cluster=true> /tmp/redis_run_out_{}_{}.txt
"
.
format
(
load
//
vm
,
endpoint
,
workload
,
threads
,
vm
))
elif
db
==
"
memcached
"
:
elif
db
==
"
memcached
"
:
for
thread
in
[
10
,
50
,
100
,
500
]:
for
thread
in
[
10
,
50
,
100
,
500
]:
threads
=
thread
//
vm
threads
=
thread
//
vm
ret
.
append
(
"
./bin/ycsb run memcached -p operationcount={} -P workloads/workload{} -p memcached.hosts={}:11211> /tmp/memcached_run_out_{}_{}.txt
"
.
format
(
load
//
vm
,
workload
,
endpoint
,
threads
,
vm
))
ret
.
append
(
"
./bin/ycsb run memcached -p operationcount={} -P workloads/workload{} -p memcached.hosts={}:11211> /tmp/memcached_run_out_{}_{}.txt
"
.
format
(
load
//
vm
,
workload
,
endpoint
,
threads
,
vm
))
return
ret
return
ret
...
@@ -56,4 +56,6 @@ for vm in range(1,max_vms+1):
...
@@ -56,4 +56,6 @@ for vm in range(1,max_vms+1):
if
thread
==
10
//
vm
:
if
thread
==
10
//
vm
:
os
.
system
(
"
sudo scp -o StrictHostKeyChecking=no -i cca.pem ec2-user@{}:/tmp/{}_load_out_{}_{}.txt ./{}_load_out_{}_{}_{}.txt
"
.
format
(
ip
,
db
,
threads
,
vm
,
db
,
rep_ip
,
threads
,
vm
))
os
.
system
(
"
sudo scp -o StrictHostKeyChecking=no -i cca.pem ec2-user@{}:/tmp/{}_load_out_{}_{}.txt ./{}_load_out_{}_{}_{}.txt
"
.
format
(
ip
,
db
,
threads
,
vm
,
db
,
rep_ip
,
threads
,
vm
))
os
.
system
(
"
sudo scp -o StrictHostKeyChecking=no -i cca.pem ec2-user@{}:/tmp/{}_run_out_{}_{}.txt ./{}_run_out_{}_{}_{}.txt
"
.
format
(
ip
,
db
,
threads
,
vm
,
db
,
rep_ip
,
threads
,
vm
))
os
.
system
(
"
sudo scp -o StrictHostKeyChecking=no -i cca.pem ec2-user@{}:/tmp/{}_run_out_{}_{}.txt ./{}_run_out_{}_{}_{}.txt
"
.
format
(
ip
,
db
,
threads
,
vm
,
db
,
rep_ip
,
threads
,
vm
))
os
.
system
(
"
sudo terraform destroy -var=
'
instance_count={}
'
-var=
'
runcmd1={}
'
-var=
'
runcmd2={}
'
-var=
'
runcmd3={}
'
-var=
'
runcmd4={}
'
-var=
'
loadcmd={}
'
-auto-approve
"
.
format
(
vm
,
run_commands
[
0
],
run_commands
[
1
],
run_commands
[
2
],
run_commands
[
3
],
get_load_command
(
db
,
load
,
vm
)))
os
.
system
(
"
sudo terraform destroy -var=
'
instance_count={}
'
-var=
'
runcmd1={}
'
-var=
'
runcmd2={}
'
-var=
'
runcmd3={}
'
-var=
'
runcmd4={}
'
-var=
'
loadcmd={}
'
-auto-approve
"
.
format
(
vm
,
run_commands
[
0
],
run_commands
[
1
],
run_commands
[
2
],
run_commands
[
3
],
get_load_command
(
db
,
load
,
vm
)))
\ No newline at end of file
os
.
system
(
"
sudo python3 Graphs.py
"
)
\ No newline at end of file
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