-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[#10928] Add script to list active instructors within a period #10947
[#10928] Add script to list active instructors within a period #10947
Conversation
src/client/java/teammates/client/scripts/ListActiveInstructors.java
Outdated
Show resolved
Hide resolved
src/client/java/teammates/client/scripts/ListActiveInstructors.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I gave it a try. Took 22 minutes to finish, and produced 1.6k results. So, the approach is not very scalable. It might even time out when we have even more sessions. We have 66K sessions by the way. |
got it, I will try to prune it as you suggested |
You do not need to binary search after fetching ALL sessions. I believe you can do this with just one query that can filter by created time - like this (just an arbitrary example): ofy().load().type(CourseStudent.class)
.filter("createdAt >", queryEntitiesFrom)
.filter("createdAt <=", queryEntitiesTo) Furthermore, since the It will look something like - This will allow you to do just one query to fetch everything you need. This should be much faster as the database will help optimize for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor Change - do test the script locally before pushing in future :)
d75596e
to
c468a30
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - prof @damithc do see if this is faster when you have time.
This script finds the list of active instructors using the start time of the feedback sessions they have created. This is just a heuristic - I am not sure if we can find all active instructors using this.
This one takes about 4 minutes. Nice! |
Fix #10928
Solution outline: