Commit 6964aea
committed
Fix measuring duration of processor and command
## Processor
Although the log outputs `Duration` of the processor activity, this is always zero. Its because `Duration` is not dynamic – it does not return real current duration. Its value is calculated and updated only when `Stop()` is called.
## Command base
Basically the same problem as in `Processor`, but from the other side. The activity is stopped immediately after it is started, so it reports zero duration at the end. Even when the telemetry is disabled, there is no need to not measure duration of the command. Because even wihout telemetry, we want to see duration in the log outputs. And `Stop()` basically does nothing just updates duration.1 parent 9a8779e commit 6964aea
File tree
2 files changed
+3
-6
lines changed- src
- MigrationTools.Host/Commands
- MigrationTools/Processors/Infrastructure
2 files changed
+3
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | 68 | | |
70 | 69 | | |
71 | 70 | | |
| |||
105 | 104 | | |
106 | 105 | | |
107 | 106 | | |
108 | | - | |
| 107 | + | |
109 | 108 | | |
110 | 109 | | |
111 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | | - | |
10 | 8 | | |
11 | | - | |
12 | 9 | | |
13 | 10 | | |
14 | 11 | | |
| |||
139 | 136 | | |
140 | 137 | | |
141 | 138 | | |
| 139 | + | |
142 | 140 | | |
143 | 141 | | |
144 | 142 | | |
| |||
172 | 170 | | |
173 | 171 | | |
174 | 172 | | |
175 | | - | |
| 173 | + | |
0 commit comments