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

Qf logging #654

Merged
merged 9 commits into from
Nov 19, 2024
Merged

Qf logging #654

merged 9 commits into from
Nov 19, 2024

Conversation

axlewin
Copy link
Contributor

@axlewin axlewin commented Nov 11, 2024

Move question finder search logging from the app to the API.

Move question finder search logging from the app to the API.
Copy link

codecov bot commented Nov 11, 2024

Codecov Report

Attention: Patch coverage is 93.54839% with 2 lines in your changes missing coverage. Please review.

Project coverage is 34.44%. Comparing base (04a0452) to head (1b711f5).
Report is 44 commits behind head on master.

Files with missing lines Patch % Lines
...n/java/uk/ac/cam/cl/dtg/isaac/api/PagesFacade.java 93.10% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #654      +/-   ##
==========================================
+ Coverage   34.17%   34.44%   +0.26%     
==========================================
  Files         520      521       +1     
  Lines       23255    23417     +162     
  Branches     2850     2869      +19     
==========================================
+ Hits         7947     8065     +118     
- Misses      14507    14540      +33     
- Partials      801      812      +11     

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


🚨 Try these New Features:

src/main/java/uk/ac/cam/cl/dtg/segue/api/Constants.java Outdated Show resolved Hide resolved
src/main/java/uk/ac/cam/cl/dtg/isaac/api/PagesFacade.java Outdated Show resolved Hide resolved
@@ -364,6 +364,26 @@ public final Response getQuestionList(@Context final Request request,
limit = idsList.size();
}

int finalStartIndex = startIndex;
Copy link
Member

Choose a reason for hiding this comment

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

What is this for? Why not just use startIndex below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using startIndex causes an error ("Variable 'startIndex' is accessed from within inner class, needs to be final or effectively final").

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see.

Why not just make a hashmap and add things to it, rather than double-brace initialise it? That would save on making a new class every request, too!

The frontend QUESTION_FINDER_SEARCH values were in a different format,
which is easier to query inside Postgres.
Except QUESTION_STATUSES, which were stored as a map to boolean values,
but this is terrible to query, so move instead to a list of provided
statuses.
@jsharkey13 jsharkey13 merged commit 195149a into master Nov 19, 2024
3 checks passed
@jsharkey13 jsharkey13 deleted the qf-logging branch November 19, 2024 11:49
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.

2 participants