Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDSTOR-12187 : PartitionUtilization Endpoint (multi volume version) #277

Merged
merged 1 commit into from
Jan 19, 2024
Merged

SDSTOR-12187 : PartitionUtilization Endpoint (multi volume version) #277

merged 1 commit into from
Jan 19, 2024

Conversation

shosseinimotlagh
Copy link
Contributor

Expose PartitionUtilization as volume used size divided by AM total size

Testing:

in one terminal, run
bin/test_volume --gtest_filter=VolTest.init_io_test --remove_file_on_shutdown=1 --delete_volume=1 --run_time=10000 --http_port=5000 --max_volume=1 --p_volume_size=100 --max_disk_capacity=1

in another terminal, run the below command to get the volume uuid:
nublox-tools/AM/hs_http_cli_tool.py get_object --name test_files/vol0

run the below API command:
curl http://localhost:5000/api/v1/utilization/[volumeUUID]
curl http://localhost:5000/api/v1/utilization

example output:

curl http://localhost:5000/api/v1/utilization | jq .

{
"14db582f-fd5d-4f0c-996c-3e12d9978867": "0.000000",
"2b4d26f0-e6a6-49c7-8cb5-55d2048c34f7": "0.000000",
"3b229301-7c6f-4ef0-bd9b-9439c76b20af": "0.000001",
"7780c654-5633-4dcd-ad68-4afd1accb15e": "0.000037"
}

curl http://localhost:5000/api/v1/utilization/7780c654-5633-4dcd-ad68-4afd1accb15e | jq .

{
"7780c654-5633-4dcd-ad68-4afd1accb15e": "0.000037"
}

curl http://localhost:5000/api/v1/utilization/[volumeUUID]
curl http://localhost:5000/api/v1/utilization
@codecov-commenter
Copy link

Codecov Report

Attention: 23 lines in your changes are missing coverage. Please review.

Comparison is base (e0712d5) 45.35% compared to head (5aeb262) 45.33%.

Files Patch % Lines
src/homeblks/homeblks_http_server.cpp 14.28% 12 Missing ⚠️
src/homeblks/home_blks.cpp 0.00% 11 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@               Coverage Diff               @@
##           stable/v3.x     #277      +/-   ##
===============================================
- Coverage        45.35%   45.33%   -0.03%     
===============================================
  Files              126      126              
  Lines            16374    16385      +11     
  Branches          1943     1945       +2     
===============================================
+ Hits              7427     7428       +1     
- Misses            8244     8256      +12     
+ Partials           703      701       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@raakella1 raakella1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG!

@shosseinimotlagh shosseinimotlagh merged commit a86d6c6 into eBay:stable/v3.x Jan 19, 2024
16 checks passed
@shosseinimotlagh shosseinimotlagh deleted the utilization_volumes branch January 19, 2024 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants