-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Waad AlKhoury <walkhour@redhat.com>
- Loading branch information
Waad AlKhoury
committed
May 14, 2021
1 parent
0f5c912
commit 92abaed
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from pytest import approx | ||
import os | ||
|
||
def test_benchmark(): | ||
p = os.popen("ceph mgr api benchmark get osd_map 10 10") | ||
print(p.read()) | ||
p.close() | ||
|
||
def test_osd_number(): | ||
number_of_total_calls = 10 | ||
p = os.popen("ceph mgr api benchmark get osd_map {} 10".format(number_of_total_calls)) | ||
if(number_of_total_calls > 0): | ||
print(p.read()) | ||
p.close() | ||
else: | ||
assert 0 , "Number of total calls should be greater than 0" | ||
|
||
def test_osd_number(): | ||
threads = 10 | ||
p = os.popen("ceph mgr api benchmark get osd_map 10 {}".format(threads)) | ||
if(threads > 0): | ||
print(p.read()) | ||
p.close() | ||
else: | ||
assert 0 , "Threads should be greater than 0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,7 @@ commands = | |
insights/ \ | ||
pg_autoscaler/ \ | ||
progress/ \ | ||
cli_api/ \ | ||
snap_schedule} | ||
|
||
[testenv:mypy] | ||
|