-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve performance of Tracer.invoke() function
Improve performance of `Tracer.invoke()`: - ~70% improvement if there are no trace event consumers - ~55% improvement if there are trace event consumers Changes: * Introduce caching of trace event method annotations in the `Tracer.invoke()` function. * Skip creation of a `TraceEvent` object if there are no event consumers. This saves us from performing an expensive `LocalDateTime.now()` call. * Skip retrieval of trace event method annotations for simple log function invocations, if there are no event consumers. * Remove string concatenations in `createLogMessage()` functions. Only use `StringBuilder` functions. * Change `toStringRegistry` to use `item::javaClass.name` as key, and use `item::class.toString()` only as fallback. * Skip reading `item.javaClass.getMethod("toString").declaringClass` in `convertToStringUsingRegistry()`: the `item.toString()` function of `Any` will anyway print the name of the class. * Fix execution of unit tests requiring mockk-jvm (`extensions` and `traceevents` modules): no unit test for these modules was being run anymore, after the 1.8.2 update. * Fix the `IfExtensionsTest` unit tests: these tests were broken by mockk 1.13.4 (due to mockk/mockk#1033).
- Loading branch information
1 parent
a332a59
commit 129dce8
Showing
10 changed files
with
260 additions
and
124 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
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
Oops, something went wrong.