You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Chronos
2
2
3
-
> Experiment & govern your threading layer with an iron-fist
3
+
> Measure, experiment with & govern your threading layer with an iron-fist
4
4
5
5
Chronos (named after Greek god of time) is a thread orchestration, experimentation, monitoring and governance library for Android applications that work for large scale mobile apps. It enables a teams of developers on multiple features to utilise threading in a safe and controllable way.
6
6
- Addresses the thread explosion problem for large teams with a centralised threadpool management system.
@@ -11,7 +11,7 @@ Chronos (named after Greek god of time) is a thread orchestration, experimentati
11
11
12
12
13
13
## Usage
14
-
1. Create a BaseExecutorConfig for threadpools that would contain all the threadpools. Centralising this will ensure governance of background work is possible. Each Executor is represented by an ExecutorSetting and the name should be passed to the get() APIs to ensure this is used.
14
+
**1.** Create a BaseExecutorConfig for threadpools that would contain all the threadpools. Centralising this will ensure governance of background work is possible. Each Executor is represented by an ExecutorSetting and the name should be passed to the get() APIs to ensure this is used.
15
15
Please check ExecutorSettings for possible values and their defaults.
16
16
17
17
For eg, you can follow a [GCD](https://developer.apple.com/documentation/dispatch/dispatchqos) based threadpool approach for creating your threadling layer to run work on based on it's priority to the user like in iOS.
2. Initialise an EventStream and register collectors to collect ExecutorEvent and ExecutionEvents from these threadpools. The EventStreamConfig will decide the monitoring related
52
-
settings we will be using for these events. For eg, we can decide to collect events only when the app is in debug mode or with apply backpressure to the collectors. Transformers can be applied to add more metadata to certain events or filter some out.
51
+
**2.** Initialise an EventStream and register collectors to collect ExecutorEvent and ExecutionEvents from these threadpools. The EventStreamConfig will decide the monitoring related settings we will be using for these events. For eg, we can decide to collect events only when the app is in debug mode or with apply backpressure to the collectors. Transformers can be applied to add more metadata to certain events or filter some out.
53
52
54
53
All events collected pass through all the transformers to the collectors.
55
54
@@ -70,28 +69,27 @@ All events collected pass through all the transformers to the collectors.
70
69
)
71
70
}
72
71
}
73
-
74
72
```
75
73
76
-
3. Initialise Executors class with EventStream and BaseExecutorConfig. Please check Experiments section to see how this BaseExecutorConfig can also be modified at runtime.
74
+
**3.** Initialise Executors class with EventStream and BaseExecutorConfig. Please check Experiments section to see how this BaseExecutorConfig can also be modified at runtime.
77
75
78
76
```kotlin
79
77
privateval executors =Executors(
80
78
getExecutorConfig(args),
81
79
getExecutorEventsConfig(args)
82
80
)
83
-
84
81
```
85
82
86
83
87
-
4.1. Use Executors class at all places to post work as coroutines in Kotlin
84
+
**4.** Use Executors class at all places to post work as coroutines in Kotlin
0 commit comments