Commit 1be5978
156895: kv, sql: Accumulate CPU time from KV BatchResponses r=alyshanjahani-crl a=alyshanjahani-crl
This commit implements a solution to recording kv cpu time on
every query execution - similar to other fields recorded in topLevelQueryStats.
This is done by including a new cpuTime field in the BatchResponse Header
from KV. The cpuTime field tracks the time reported in Replica.Send which
is representative of the "synchronous" work done by KV for the request, i.e.
it does not include other async replication related work.
GetKVCpuTime is added to the KVBatchFetcher interface.
GetKVResponseCpuTime is added to the KVReader interface.
kvCpuTime is added to the mutationPlanNode interface.
Epic: https://cockroachlabs.atlassian.net/browse/CRDB-55080
Part of: https://cockroachlabs.atlassian.net/browse/CRDB-55922
Release note: None
158175: mmaprototype: extract analyzeFunc r=wenyihu6 a=wenyihu6
Epic: CRDB-55052
Release note: none
---
**mmaprototype: extract analyzeFunc**
This commit moves analyzeFunc out of finishInit into its own helper improve
readability.
---
**mmaprototype: extract doneFunc**
This commit moves doneFunc out of analyzeFunc into its own helper function to
improve readability.
---
**mmaprototype: add more comments for finishInit**
This commit adds more comments for rangeAnalyzedConstraints.finishInit.
---
**mmaprototype: extract diversity score computation**
This commit moves diversity score computation out of analyzeFunc into its own
helper function to improve readability.
---
**mmaprototype: clean up diversityScore**
Previously, we were inefficiently invoking diversityFunc twice over voters X
voters diversity score calculation when refactoring the code. This change
reverts it back so diversity score is computed once and reused.
---
**mmaprototype: rename diversityFunc to diversityOfTwoStoreSets**
---
**mmaprototype: rename ac.analyzeFunc to ac.initialize**
This commit renames ac.analyzeFunc to ac.initialize and updates the
signature so constraints are passed directly to initialize, rather than
being populated by caller.
---
**mmaprototype: move isConstraintSatisfied to a closure**
This commit moves isConstraintSatisfied from a struct method to a helper closure
inside ac.initialize.
---
**mmaprototype: clean up comments**
Co-authored-by: alyshanjahani-crl <alyshan@cockroachlabs.com>
Co-authored-by: wenyihu6 <wenyi@cockroachlabs.com>
File tree
39 files changed
+529
-159
lines changed- pkg
- cli
- kv
- kvclient/kvstreamer
- kvpb
- kvserver
- allocator/mmaprototype
- sql
- colexecop
- colfetcher
- execinfrapb
- rowexec
- row
39 files changed
+529
-159
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
115 | | - | |
| 116 | + | |
| 117 | + | |
116 | 118 | | |
117 | 119 | | |
| 120 | + | |
118 | 121 | | |
119 | 122 | | |
120 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
310 | 313 | | |
311 | 314 | | |
312 | 315 | | |
| |||
381 | 384 | | |
382 | 385 | | |
383 | 386 | | |
| 387 | + | |
| 388 | + | |
384 | 389 | | |
385 | 390 | | |
386 | 391 | | |
| |||
393 | 398 | | |
394 | 399 | | |
395 | 400 | | |
| 401 | + | |
396 | 402 | | |
397 | 403 | | |
398 | 404 | | |
| |||
430 | 436 | | |
431 | 437 | | |
432 | 438 | | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
433 | 443 | | |
434 | 444 | | |
435 | 445 | | |
| |||
1452 | 1462 | | |
1453 | 1463 | | |
1454 | 1464 | | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
1455 | 1470 | | |
1456 | 1471 | | |
1457 | 1472 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| 135 | + | |
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
| 757 | + | |
757 | 758 | | |
758 | 759 | | |
759 | 760 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3207 | 3207 | | |
3208 | 3208 | | |
3209 | 3209 | | |
| 3210 | + | |
| 3211 | + | |
| 3212 | + | |
| 3213 | + | |
3210 | 3214 | | |
3211 | 3215 | | |
3212 | 3216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
705 | 705 | | |
706 | 706 | | |
707 | 707 | | |
708 | | - | |
| 708 | + | |
| 709 | + | |
709 | 710 | | |
710 | 711 | | |
711 | 712 | | |
| |||
714 | 715 | | |
715 | 716 | | |
716 | 717 | | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
717 | 721 | | |
718 | 722 | | |
719 | 723 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
703 | 703 | | |
704 | 704 | | |
705 | 705 | | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
706 | 711 | | |
707 | 712 | | |
708 | 713 | | |
| |||
0 commit comments