fix: log total request duration instead of microseconds component - #286
Closed
eve-ci-cd[bot] wants to merge 1 commit into
Closed
eve-ci-cd[bot] wants to merge 1 commit into
eve-ci-cd[bot] wants to merge 1 commit into
Conversation
timedelta.microseconds is only the sub-second part (0-999999), so any request taking over one second was logged with a wrong, truncated time. Use total_seconds() and log it in seconds.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #286 +/- ##
=======================================
Coverage 90.21% 90.21%
=======================================
Files 82 82
Lines 11293 11293
=======================================
Hits 10188 10188
Misses 1105 1105
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problème
GitHostSession.requestloggaitresponse.elapsed.microseconds. Ce champ detimedeltane contient que la partie sub-seconde (0–999999) : une requête de 2,5 s était journalisée comme 500000, et une de 1 s comme 0. Les logs ne permettaient donc pas de repérer les appels lents aux API git host.Changement
elapsed.total_seconds(), affiché en secondes ({time:.3f}s).Non exécuté localement : la suite de tests (pytest et flake8 absents de l'environnement). La CI devra le confirmer.