Add @timed decorator around all storage.api.server endpoints.
Details
- Reviewers
douardda - Group Reviewers
Reviewers - Commits
- rDSTOCf734c4e4ded3: api.server: Remove unneeded stats.increment call
rDSTOC3c2dfc00232b: swh.storage.api.server: Add metrics to storage endpoints
rDSTOCc47f92a00344: storage: Add a timed decoration to count calls and time it
rDSTOC3a7f8a9b1393: Add @timed decorator around all api.server endpoints
R65:3c2dfc00232b: swh.storage.api.server: Add metrics to storage endpoints
R65:f734c4e4ded3: api.server: Remove unneeded stats.increment call
R65:c47f92a00344: storage: Add a timed decoration to count calls and time it
R65:3a7f8a9b1393: Add @timed decorator around all api.server endpoints
rDSTOf734c4e4ded3: api.server: Remove unneeded stats.increment call
rDSTO3a7f8a9b1393: Add @timed decorator around all api.server endpoints
rDSTO3c2dfc00232b: swh.storage.api.server: Add metrics to storage endpoints
rDSTOc47f92a00344: storage: Add a timed decoration to count calls and time it
from docker-dev:
Start storage server:
docker-compose down --volumes; SWH_SERVICE=swh-storage; docker-compose build $SWH_SERVICE; docker-compose up $SWH_SERVICE
Then in another shell:
docker-compose exec swh-storage bash -c 'ngrep -d lo udp and port 8125
Run some ingestion and check we see counters like the following:
U 127.0.0.1:39597 -> 127.0.0.1:8125 swh_storage_request_duration_seconds:0.003577995812520385|ms|#endpoint:get_storage # U 127.0.0.1:52223 -> 127.0.0.1:8125 swh_storage_request_count:1|c|#endpoint:snapshot_add # U 127.0.0.1:35545 -> 127.0.0.1:8125 swh_storage_request_duration_seconds:0.005665002390742302|ms|#endpoint:get_storage # U 127.0.0.1:39042 -> 127.0.0.1:8125 swh_storage_request_count:1|c|#endpoint:fetch_history_end # U 127.0.0.1:55143 -> 127.0.0.1:8125 swh_storage_request_duration_seconds:0.0034950062399730086|ms|#endpoint:get_storage # U 127.0.0.1:56208 -> 127.0.0.1:8125 swh_storage_request_count:1|c|#endpoint:origin_visit_update # U 127.0.0.1:58816 -> 127.0.0.1:8125 swh_storage_request_duration_seconds:0.003449007635936141|ms|#endpoint:get_storage (swh2)
Also tox is fine for non regression.
Diff Detail
- Repository
- rDSTO Storage manager
- Branch
- add-statsd
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 4905 Build 6556: tox-on-jenkins Jenkins Build 6555: arc lint + arc unit
Event Timeline
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tox/227/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tox/227/console
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tox/228/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tox/228/console
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tox/229/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tox/229/console
Build is green
See https://jenkins.softwareheritage.org/job/DSTO/job/tox/230/ for more details.
swh/storage/api/server.py | ||
---|---|---|
31 | I have to check whether that's still useful or not... |
Just remove the statsd.increment() and we should be good...
swh/storage/api/server.py | ||
---|---|---|
31 | the increment of the counter is not needed, as the backend (be it graphite or prometheus) will keep track of the number of timed messages. |
swh/storage/api/server.py | ||
---|---|---|
31 | Ack, thanks. |
Build is green
See https://jenkins.softwareheritage.org/job/DSTO/job/tox/231/ for more details.
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tox/232/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tox/232/console