Skip to content

report duration for file history cache updates #3438

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

Merged
merged 3 commits into from
Feb 27, 2021

Conversation

vladak
Copy link
Member

@vladak vladak commented Feb 27, 2021

This is to help identify the long history index times reported in #3434.

@vladak vladak added the indexer label Feb 27, 2021
@ahornace ahornace merged commit 924de7a into oracle:master Feb 27, 2021
@@ -138,6 +141,10 @@ private void doFileHistory(String filename, List<HistoryEntry> historyEntries,
}

storeFile(hist, file, repository, !renamed);

statRepoHist.report(LOGGER, Level.FINER,
String.format("Done storing history cache for '%s'", filename),
Copy link
Member Author

Choose a reason for hiding this comment

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

Here, the String.format() will be evaluated every time. Thinking of introducing static method Statistics.eligible(LogLevel level) that would do something like:

return (LOGGER.isLoggable(level) || Metrics.getRegistry());

@vladak vladak deleted the file_history_cache_report branch March 1, 2021 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants