Closed alexander-kuruvilla closed 1 month ago
The main change involved in this update is the reduction of logging verbosity within various scheduler classes by altering the logging level from info
to debug
. This adjustment is aimed at optimizing performance by reducing the number of log entries generated during execution, especially within loops.
File Path | Change Summary |
---|---|
src/main/java/ai/elimu/tasks/LetterSoundCorrespondenceUsageCountScheduler.java |
Changed logging level of word.getText() from info to debug . |
src/main/java/ai/elimu/tasks/LetterUsageCountScheduler.java |
Changed logging level of StoryBook title within a loop from info to debug . |
src/main/java/ai/elimu/tasks/ParagraphWordScheduler.java |
Changed logging level for messages related to wordInOriginalText and word from info to debug . |
src/main/java/ai/elimu/tasks/SyllableUsageCountScheduler.java |
Changed logging level of storyBook.getTitle() from info to debug . |
src/main/java/ai/elimu/tasks/WordUsageCountScheduler.java |
Changed logging level of StoryBook title within a loop from info to debug . |
Objective | Addressed | Explanation |
---|---|---|
Reduce log level within loops (#1726) | ✅ |
Attention: Patch coverage is 0%
with 11 lines
in your changes missing coverage. Please review.
Project coverage is 15.26%. Comparing base (
cbd78c2
) to head (0efe05a
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thank you, @alexander-kuruvilla 🙂
Would you mind checking if it makes sense to make similar changes in any of the other
*Scheduler.java
files in the sameai.elimu.tasks
package?FYI, the daily log file size is around 200MB now, so with your changes we should be able to reduce this to make the webapp more lightweight.
ls -ash ~/.elimu-ai/lang-HIN/logs/
4.0K . 24M webapp.log 166M webapp.log.2024-07-10 189M webapp.log.2024-07-12 198M webapp.log.2024-07-14 0 .. 884K webapp.log.2024-07-09 190M webapp.log.2024-07-11 197M webapp.log.2024-07-13
Sure @jo-elimu , I'll check the other loops in the scheduler classes and reduce to debug if viable.
I'll commit changes if any to this PR.
@alexander-kuruvilla Your changes helped reduce the size of the log files by 10X. Thank you!
198M -rw-r--r-- 1 root root 198M Jul 14 23:00 webapp.log.2024-07-14
184M -rw-r--r-- 1 root root 184M Jul 15 23:28 webapp.log.2024-07-15
18M -rw-r--r-- 1 root root 18M Jul 16 23:01 webapp.log.2024-07-16
Closes #1726
Changes: Reduced logger level from info to debug