-
Notifications
You must be signed in to change notification settings - Fork 471
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
metricwriter: compile regular expressions only on first use
Compile the regular expressions only on first use rather than implicitly as part of the `init()` function of the package. This prevents taking a speed hit on the initialization of the package regardless if this type is used and moves it to the time when a regular expression is first used. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
- Loading branch information
1 parent
e2f6808
commit 2810f20
Showing
1 changed file
with
33 additions
and
25 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