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

FIX improve statistics API #4254

Merged
merged 6 commits into from
Dec 21, 2022
Merged

Conversation

fgalan
Copy link
Member

@fgalan fgalan commented Dec 20, 2022

  • versionRequests counter removal (already covered by GET /versions counter)
  • "getAll counters" GET /statistics option
  • check docu (not sure if some change would be required)

@fgalan fgalan changed the title FIX improve statistics API [WIP] FIX improve statistics API Dec 20, 2022
@fgalan fgalan changed the title [WIP] FIX improve statistics API FIX improve statistics API Dec 21, 2022
@fgalan fgalan requested a review from mapedraza December 21, 2022 15:49
@fgalan
Copy link
Member Author

fgalan commented Dec 21, 2022

@fisuda this PR does some small modifications to one .md file. It would be great if you could sync the Japanese translation. Thanks!

(If PR #4254 is still un-merged when you do that, you can do a PR using hardening/improve-statistics-api as base branch or master as base branch. As you prefer)

Copy link
Collaborator

@mapedraza mapedraza left a comment

Choose a reason for hiding this comment

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

LGTM

@mapedraza mapedraza merged commit b4700de into master Dec 21, 2022
@fgalan fgalan deleted the hardening/improve-statistics-api branch December 21, 2022 17:43
fisuda added a commit to fisuda/fiware-orion that referenced this pull request Dec 21, 2022
@fisuda
Copy link
Contributor

fisuda commented Dec 21, 2022

I sent the PR #4257. Thanks.

fgalan added a commit that referenced this pull request Dec 21, 2022
(JP) ADD doc about statistics API (#4254)
@fgalan
Copy link
Member Author

fgalan commented Dec 22, 2022

I have done some "coverage analysis"

  • Get requests from the "routes map"
cat app/contextBroker/orionRestServices.cpp | grep Request | awk -F '{' '{print $2'} | awk -F ',' '{print $1}' | sed 's/\W//g' | sort -u > request_set1.txt
  • Get the requests covered by the statistics
cat lib/common/statistics.cpp | grep ' {\w' | awk -F '{' '{print $2'} | awk -F ',' '{print $1}' | sort -u > requets_set2.txt
  • Compare both (diff -u requets_set1.txt requets_set2.txt)
--- requets_set1.txt	2022-12-22 10:26:20.575685478 +0100
+++ requets_set2.txt	2022-12-22 10:28:14.706882935 +0100
@@ -25,7 +25,6 @@
 IndividualContextEntityAttribute
 IndividualContextEntityAttributes
 IndividualContextEntityAttributeWithTypeAndId
-InvalidRequest
 LeakRequest
 LogLevelRequest
 LogTraceRequest

Except for InvalidRequest (which is used in the badVerd logic only, thus is not an actual request) they are equal, so I think the statistic logs covers correctly the current requests.

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