-
-
Notifications
You must be signed in to change notification settings - Fork 719
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1972 from InsertKoinIO/rework_core
Clean up and optimise core internals core
- Loading branch information
Showing
52 changed files
with
752 additions
and
637 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
23 changes: 23 additions & 0 deletions
23
examples/android-perfs/src/main/java/org/koin/sample/android/main/MainApplication.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.koin.sample.android.main | ||
|
||
import android.app.Application | ||
import kotlinx.coroutines.runBlocking | ||
import org.koin.benchmark.PerfLimit | ||
import org.koin.benchmark.PerfResult | ||
import org.koin.benchmark.PerfRunner.runAll | ||
|
||
class MainApplication : Application() { | ||
override fun onCreate() { | ||
super.onCreate() | ||
|
||
runBlocking { | ||
results = runAll(useDebugLogs = false) | ||
results!!.applyLimits(limits) | ||
} | ||
} | ||
|
||
companion object { | ||
val limits = PerfLimit(27.0, 0.150) | ||
var results : PerfResult? = null | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Benchmark Mode Cnt Score Error Units | ||
BenchmarkClass.emptyStart avgt 10 ≈ 10⁻⁴ ms/op | ||
BenchmarkClass.flattenIterative avgt 10 0,544 ± 0,033 ms/op | ||
BenchmarkClass.flattenRecursive avgt 10 0,318 ± 0,009 ms/op | ||
BenchmarkClass.start400 avgt 10 0,219 ± 0,005 ms/op | ||
BenchmarkClass.start400AndInject avgt 10 0,221 ± 0,007 ms/op | ||
BenchmarkClass.flattenIterative avgt 10 0,533 ± 0,028 ms/op | ||
BenchmarkClass.flattenRecursive avgt 10 0,283 ± 0,049 ms/op | ||
BenchmarkClass.start400 avgt 10 0,206 ± 0,001 ms/op | ||
BenchmarkClass.start400AndInject avgt 10 0,205 ± 0,003 ms/op |
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
46 changes: 20 additions & 26 deletions
46
examples/jvm-perfs/src/main/kotlin/org/koin/benchmark/PerfRunner.kt
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.