Skip to content

Conversation

@chetanmeh
Copy link
Member

@chetanmeh chetanmeh commented Oct 14, 2019

To move forward with activation poll uqery optimization for CosmosDB (#4684) we need to collect some mertics. This PR collects 2 such metrics

Description

This PR adds 2 new metrics which are computed for the activation list query used in wsk activation poll command

  1. histogram_cosmosdb_query_resultDelta_seconds - Records the time delta between current time and the start time of the last activation entry in returned list of activations. This helps in determining how much recent activation results are being returned to end users for the poll command
  2. histogram_cosmosdb_query_sinceDelta_seconds - Records the time delta between current time and the since time specified in list query used by activation poll

Below are the stats as recorded for Prometheus

# TYPE histogram_cosmosdb_query_resultDelta_seconds histogram
histogram_cosmosdb_query_resultDelta_seconds_bucket{view="activations",collection="activations",le="0.005"} 0.0
histogram_cosmosdb_query_resultDelta_seconds_bucket{view="activations",collection="activations",le="0.01"} 0.0
histogram_cosmosdb_query_resultDelta_seconds_bucket{view="activations",collection="activations",le="0.025"} 0.0
histogram_cosmosdb_query_resultDelta_seconds_bucket{view="activations",collection="activations",le="0.05"} 0.0
histogram_cosmosdb_query_resultDelta_seconds_bucket{view="activations",collection="activations",le="0.075"} 0.0
histogram_cosmosdb_query_resultDelta_seconds_bucket{view="activations",collection="activations",le="0.1"} 0.0
histogram_cosmosdb_query_resultDelta_seconds_bucket{view="activations",collection="activations",le="0.25"} 0.0
histogram_cosmosdb_query_resultDelta_seconds_bucket{view="activations",collection="activations",le="0.5"} 0.0
histogram_cosmosdb_query_resultDelta_seconds_bucket{view="activations",collection="activations",le="0.75"} 0.0
histogram_cosmosdb_query_resultDelta_seconds_bucket{view="activations",collection="activations",le="1.0"} 0.0
histogram_cosmosdb_query_resultDelta_seconds_bucket{view="activations",collection="activations",le="2.5"} 0.0
histogram_cosmosdb_query_resultDelta_seconds_bucket{view="activations",collection="activations",le="5.0"} 2.0
histogram_cosmosdb_query_resultDelta_seconds_bucket{view="activations",collection="activations",le="7.5"} 3.0
histogram_cosmosdb_query_resultDelta_seconds_bucket{view="activations",collection="activations",le="10.0"} 4.0
histogram_cosmosdb_query_resultDelta_seconds_bucket{view="activations",collection="activations",le="+Inf"} 8.0
histogram_cosmosdb_query_resultDelta_seconds_count{view="activations",collection="activations"} 8.0
histogram_cosmosdb_query_resultDelta_seconds_sum{view="activations",collection="activations"} 259.744

# TYPE histogram_cosmosdb_query_sinceDelta_seconds histogram
histogram_cosmosdb_query_sinceDelta_seconds_bucket{view="activations",collection="activations",le="0.005"} 0.0
histogram_cosmosdb_query_sinceDelta_seconds_bucket{view="activations",collection="activations",le="0.01"} 0.0
histogram_cosmosdb_query_sinceDelta_seconds_bucket{view="activations",collection="activations",le="0.025"} 0.0
histogram_cosmosdb_query_sinceDelta_seconds_bucket{view="activations",collection="activations",le="0.05"} 0.0
histogram_cosmosdb_query_sinceDelta_seconds_bucket{view="activations",collection="activations",le="0.075"} 0.0
histogram_cosmosdb_query_sinceDelta_seconds_bucket{view="activations",collection="activations",le="0.1"} 0.0
histogram_cosmosdb_query_sinceDelta_seconds_bucket{view="activations",collection="activations",le="0.25"} 0.0
histogram_cosmosdb_query_sinceDelta_seconds_bucket{view="activations",collection="activations",le="0.5"} 0.0
histogram_cosmosdb_query_sinceDelta_seconds_bucket{view="activations",collection="activations",le="0.75"} 0.0
histogram_cosmosdb_query_sinceDelta_seconds_bucket{view="activations",collection="activations",le="1.0"} 0.0
histogram_cosmosdb_query_sinceDelta_seconds_bucket{view="activations",collection="activations",le="2.5"} 0.0
histogram_cosmosdb_query_sinceDelta_seconds_bucket{view="activations",collection="activations",le="5.0"} 0.0
histogram_cosmosdb_query_sinceDelta_seconds_bucket{view="activations",collection="activations",le="7.5"} 1.0
histogram_cosmosdb_query_sinceDelta_seconds_bucket{view="activations",collection="activations",le="10.0"} 2.0
histogram_cosmosdb_query_sinceDelta_seconds_bucket{view="activations",collection="activations",le="+Inf"} 8.0
histogram_cosmosdb_query_sinceDelta_seconds_count{view="activations",collection="activations"} 8.0
histogram_cosmosdb_query_sinceDelta_seconds_sum{view="activations",collection="activations"} 3126736462.304

Related issue and scope

  • I opened an issue to propose and discuss this change (#????)

My changes affect the following components

  • API
  • Controller
  • Message Bus (e.g., Kafka)
  • Loadbalancer
  • Invoker
  • Intrinsic actions (e.g., sequences, conductors)
  • Data stores (e.g., CouchDB)
  • Tests
  • Deployment
  • CLI
  • General tooling
  • Documentation

Types of changes

  • Bug fix (generally a non-breaking change which closes an issue).
  • Enhancement or new feature (adds new functionality).
  • Breaking change (a bug fix or enhancement which changes existing behavior).

Checklist:

  • I signed an Apache CLA.
  • I reviewed the style guides and followed the recommendations (Travis CI will check :).
  • I added tests to cover my changes.
  • My changes require further changes to the documentation.
  • I updated the documentation where necessary.

@codecov-io
Copy link

Codecov Report

Merging #4688 into master will decrease coverage by 6.17%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4688      +/-   ##
==========================================
- Coverage   84.42%   78.25%   -6.18%     
==========================================
  Files         193      193              
  Lines        8711     8736      +25     
  Branches      598      601       +3     
==========================================
- Hits         7354     6836     -518     
- Misses       1357     1900     +543
Impacted Files Coverage Δ
...sk/core/database/cosmosdb/CosmosDBViewMapper.scala 0% <0%> (-92.6%) ⬇️
...core/database/cosmosdb/CosmosDBArtifactStore.scala 0% <0%> (-96.17%) ⬇️
...core/database/cosmosdb/RxObservableImplicits.scala 0% <0%> (-100%) ⬇️
...ore/database/cosmosdb/cache/CacheInvalidator.scala 0% <0%> (-100%) ⬇️
...tabase/cosmosdb/cache/CacheInvalidatorConfig.scala 0% <0%> (-94.74%) ⬇️
...e/database/cosmosdb/cache/ChangeFeedListener.scala 0% <0%> (-86.67%) ⬇️
...e/database/cosmosdb/cache/KafkaEventProducer.scala 0% <0%> (-76.48%) ⬇️
...whisk/core/database/cosmosdb/CosmosDBSupport.scala 0% <0%> (-74.08%) ⬇️
... and 9 more

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 673d5c7...e56df68. Read the comment docs.

@chetanmeh chetanmeh requested a review from tysonnorris October 14, 2019 11:55
@chetanmeh
Copy link
Member Author

CosmosDB related tests passed on the CI build from fork https://travis-ci.org/chetanmeh/incubator-openwhisk/builds/597519929

Copy link
Contributor

@tysonnorris tysonnorris left a comment

Choose a reason for hiding this comment

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

LGTM

@chetanmeh chetanmeh merged commit 86618b5 into apache:master Oct 18, 2019
@chetanmeh chetanmeh deleted the cosmosdb-query-metrics branch October 18, 2019 04:24
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