Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
opendht
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Analyze
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
savoirfairelinux
opendht
Commits
30ba6baf
Commit
30ba6baf
authored
9 years ago
by
Simon Désaulniers
Committed by
Simon Désaulniers
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
benchmark: add minor logs in 'get', 'put' requests
parent
53bea202
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
python/tools/dht/tests.py
+2
-4
2 additions, 4 deletions
python/tools/dht/tests.py
with
2 additions
and
4 deletions
python/tools/dht/tests.py
+
2
−
4
View file @
30ba6baf
...
@@ -211,7 +211,7 @@ class DhtFeatureTest(FeatureTest):
...
@@ -211,7 +211,7 @@ class DhtFeatureTest(FeatureTest):
for
val
in
values
:
for
val
in
values
:
with
FeatureTest
.
lock
:
with
FeatureTest
.
lock
:
vstr
=
val
.
__str__
()[:
100
]
vstr
=
val
.
__str__
()[:
100
]
DhtNetwork
.
log
(
'
[PUT]:
%s
'
%
vstr
+
(
"
...
"
if
len
(
vstr
)
>
100
else
""
))
DhtNetwork
.
log
(
'
[PUT]:
'
,
_hash
.
toString
(),
'
->
'
,
vstr
+
(
"
...
"
if
len
(
vstr
)
>
100
else
""
))
FeatureTest
.
done
+=
1
FeatureTest
.
done
+=
1
while
FeatureTest
.
done
>
0
:
while
FeatureTest
.
done
>
0
:
producer
.
put
(
_hash
,
val
,
DhtFeatureTest
.
putDoneCb
)
producer
.
put
(
_hash
,
val
,
DhtFeatureTest
.
putDoneCb
)
...
@@ -223,6 +223,7 @@ class DhtFeatureTest(FeatureTest):
...
@@ -223,6 +223,7 @@ class DhtFeatureTest(FeatureTest):
with
FeatureTest
.
lock
:
with
FeatureTest
.
lock
:
FeatureTest
.
done
+=
1
FeatureTest
.
done
+=
1
while
FeatureTest
.
done
>
0
:
while
FeatureTest
.
done
>
0
:
DhtNetwork
.
log
(
'
[GET]:
'
,
_hash
.
toString
())
consumer
.
get
(
_hash
,
DhtFeatureTest
.
getcb
,
DhtFeatureTest
.
getDoneCb
)
consumer
.
get
(
_hash
,
DhtFeatureTest
.
getcb
,
DhtFeatureTest
.
getDoneCb
)
FeatureTest
.
lock
.
wait
()
FeatureTest
.
lock
.
wait
()
...
@@ -454,9 +455,6 @@ class PersistenceTest(DhtFeatureTest):
...
@@ -454,9 +455,6 @@ class PersistenceTest(DhtFeatureTest):
for
node
in
DhtFeatureTest
.
foreignNodes
:
for
node
in
DhtFeatureTest
.
foreignNodes
:
DhtNetwork
.
log
(
node
)
DhtNetwork
.
log
(
node
)
#DhtNetwork.log("Waiting a minute for the network to settle down.")
#time.sleep(60)
for
_
in
range
(
max
(
1
,
int
(
self
.
_workbench
.
node_num
/
32
))):
for
_
in
range
(
max
(
1
,
int
(
self
.
_workbench
.
node_num
/
32
))):
DhtNetwork
.
log
(
'
Removing all nodes hosting target values...
'
)
DhtNetwork
.
log
(
'
Removing all nodes hosting target values...
'
)
cluster_ops_count
=
0
cluster_ops_count
=
0
...
...
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