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

Create Upload Stats Service to build response for stats API #62

Merged
merged 2 commits into from
May 12, 2022

Conversation

VijayanB
Copy link
Member

@VijayanB VijayanB commented May 11, 2022

Description

Add upload stats service to build XContent for StatsNodesResponse. It generates following json as response body

        {
          "uploads": {
            "total": {
                request_count : #of request,
                "upload"       : sum of documents to upload across API,
                "success"     : sum of successfully uploaded documents across API,
                "failed"      : sum of failed to upload documents across API,
                "duration"    : sum of duration in milliseconds to ingest document across API
            },
            "metrics" : [
                {
                    "id"       : <metric-id>,
                    "node_id"  : node-id
                    "upload"   : # of documents to upload,
                    "success"  : # of successfully uploaded documents,
                    "failed"   : # of failed to upload documents,
                    "duration" : duration in milliseconds to ingest document
                }, ......
            ]
          }
        }

Issues Resolved

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@VijayanB VijayanB requested a review from a team May 11, 2022 02:11
@VijayanB VijayanB self-assigned this May 11, 2022
Create an entity that will be used to summarize all metrics.

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
@codecov-commenter
Copy link

codecov-commenter commented May 12, 2022

Codecov Report

Merging #62 (1605eb5) into main (cb1d95d) will increase coverage by 1.02%.
The diff coverage is 100.00%.

❗ Current head 1605eb5 differs from pull request most recent head 315ba7e. Consider uploading reports for the commit 315ba7e to get more accurate results

@@             Coverage Diff              @@
##               main      #62      +/-   ##
============================================
+ Coverage     89.44%   90.46%   +1.02%     
- Complexity      132      144      +12     
============================================
  Files            19       21       +2     
  Lines           483      535      +52     
  Branches         35       38       +3     
============================================
+ Hits            432      484      +52     
  Misses           47       47              
  Partials          4        4              
Impacted Files Coverage Δ
...arch/geospatial/stats/upload/TotalUploadStats.java 100.00% <100.00%> (ø)
...ch/geospatial/stats/upload/UploadStatsService.java 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cb1d95d...315ba7e. Read the comment docs.

"uploads": {
"total": {
request_count : # of request,
"uplod" : sum of documents to upload across API,

Choose a reason for hiding this comment

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

[nit] upload

Copy link
Member Author

Choose a reason for hiding this comment

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

Ack

This service will build final XContent for stats from upload API
across Nodes.

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
@VijayanB VijayanB force-pushed the add-total-upload-stats branch 2 times, most recently from 1605eb5 to 315ba7e Compare May 12, 2022 19:29
@VijayanB VijayanB merged commit 6e29f7e into opensearch-project:main May 12, 2022
@VijayanB VijayanB deleted the add-total-upload-stats branch May 12, 2022 20:46
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.

4 participants