Commit bf84cf5
workload: add mechanism to run changefeed alongside workloads
This allows a user to run a changefeed with any workload which listens for
writes to all tables. It adds a `--with-changefeed` flag to `workload <name>
run` commands and then outputs a time series which indicates the number of
rows and the difference in time between when the client sees the row and
its commit timestamp.
Note that using the commit timestamp may be controversial. That timestamp
will generally include all of the client latency. That's got some nice
properties. If the latency added no additional latency, then the duration
distribution would be exactly that of the client's writes.
Example:
```bash
./bin/workload run kv --concurrency 10 --with-changefeed=true
```
```
_elapsed___errors__ops/sec(inst)___ops/sec(cum)__p50(ms)__p95(ms)__p99(ms)_pMax(ms)
31.0s 0 15544.3 12910.1 3221.2 5905.6 6442.5 6710.9 changefeed
31.0s 0 7504.6 7405.3 1.2 2.0 9.4 17.8 write
32.0s 0 14963.0 12974.2 2952.8 5905.6 6174.0 6710.9 changefeed
32.0s 0 7408.5 7405.4 1.2 1.9 8.9 19.9 write
33.0s 0 14197.2 13011.3 2818.6 6174.0 6442.5 6979.3 changefeed
33.0s 0 7039.6 7394.3 1.2 2.2 7.6 37.7 write
34.0s 0 15786.2 13092.9 2550.1 5637.1 6174.0 6442.5 changefeed
34.0s 0 7162.6 7387.5 1.2 2.4 7.6 35.7 write
35.0s 0 10789.0 13027.1 2818.6 6174.0 6442.5 6710.9 changefeed
35.0s 0 3513.0 7276.8 1.2 2.5 7.6 352.3 write
36.0s 0 16003.6 13109.7 3221.2 6174.0 7247.8 7516.2 changefeed
36.0s 0 8260.3 7304.1 1.1 1.7 4.5 16.3 write
37.0s 0 15547.7 13175.6 3087.0 5100.3 6174.0 6710.9 changefeed
37.0s 0 8218.4 7328.8 1.0 1.5 5.8 18.9 write
38.0s 0 14046.1 13198.5 2684.4 6710.9 6979.3 7516.2 changefeed
38.0s 0 8062.1 7348.1 1.1 1.6 5.2 16.8 write
39.0s 0 12096.6 13170.3 1677.7 1879.0 2080.4 2147.5 changefeed
39.0s 0 8285.4 7372.1 1.1 1.5 4.7 17.8 write
40.0s 0 11868.9 13137.8 1208.0 1409.3 1409.3 1409.3 changefeed
40.0s 0 8661.9 7404.4 1.0 1.5 3.4 12.6 write
_elapsed___errors__ops/sec(inst)___ops/sec(cum)__p50(ms)__p95(ms)__p99(ms)_pMax(ms)
41.0s 0 8675.6 13028.9 838.9 1006.6 1006.6 1006.6 changefeed
41.0s 0 8846.6 7439.6 1.0 1.4 3.3 12.1 write
```
Epic: none
Release note (cli change): `cockroach workload <name> run` commands now offer
a `--with-changefeed` flag to additionally run a changefeed watching for
writes to the workload's tables.
Co-authored-by: Steven Danna <[email protected]>1 parent 4b80cd5 commit bf84cf5
File tree
5 files changed
+186
-4
lines changed- pkg
- workload
- changefeeds
- cli
5 files changed
+186
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2865 | 2865 | | |
2866 | 2866 | | |
2867 | 2867 | | |
| 2868 | + | |
2868 | 2869 | | |
2869 | 2870 | | |
2870 | 2871 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| 74 | + | |
| 75 | + | |
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
| |||
484 | 487 | | |
485 | 488 | | |
486 | 489 | | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
487 | 501 | | |
488 | 502 | | |
489 | 503 | | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | 504 | | |
495 | 505 | | |
496 | 506 | | |
| |||
0 commit comments