-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow for lazy-evaluation of arguments in
LazyFormat
(#1669)
When creating a `LazyFormat` object, the keyword argument values may be constructed from expensive methods. Similar to allowing a function to be passed in for the `message` argument, this PR enables methods to be passed in for the keyword argument values so that they can be lazily evaluated. There were some logging calls that were found in performance profiling to be expensive because lazy-evaluation was not done, so this PR updates a few of those call sites as well. An alternative approach would have been to implement `MetricFlowPrettyFormattable` for those objects.
- Loading branch information
Showing
4 changed files
with
52 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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