Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(functions): converting all aggregates to use arrow arrays #532

Merged
merged 1 commit into from
Dec 19, 2018

Conversation

jsternberg
Copy link
Contributor

@jsternberg jsternberg commented Dec 14, 2018

All aggregates will now use the arrow interface. They do not support nil
at the moment.

Fixes #491, #525, #511, #520, and #522.

This also implements part of #513. The other part uses the selector interface which is not included in this change.

@jsternberg jsternberg force-pushed the feat/arrow-aggregates branch from a656db9 to fa05d78 Compare December 14, 2018 19:18
@nathanielc
Copy link
Contributor

@jsternberg Can you make sure that Flux tests exist for each one of the aggregates this fixes? As well as confirm that the spec is up to date? Since we have to touch every transformation the plan is to take the time to make sure they all have tests and are documentation.

func (a *SumIntAgg) DoInt(vs []int64) {
for _, v := range vs {
func (a *SumIntAgg) DoInt(vs *array.Int64) {
for _, v := range vs.Int64Values() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The arrow arrays have special methods for computing the sum. Can you use those methods here? Those methods are written using SIMD instructions.

@jsternberg jsternberg force-pushed the feat/arrow-aggregates branch 2 times, most recently from 6ecb419 to 11a06a8 Compare December 18, 2018 22:25
@jsternberg
Copy link
Contributor Author

@nathanielc there is at least one test for each of the aggregates that are touched and each of the tests uses all of the possible data types for full test coverage.

At the moment, using an incompatible data type fails the entire query rather than a specific table so I skipped invalid data types. In the future, we should test those too.

Copy link
Contributor

@nathanielc nathanielc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with one small change to Mean to also use the Sum functions.

Also each of the aggregates already have benchmarks written. Can you post the results to the PR before merging so we have a record of the improvement?

for _, v := range vs {
func (a *MeanAgg) DoInt(vs *array.Int64) {
a.count += float64(vs.Len())
for _, v := range vs.Int64Values() {
//TODO handle overflow
a.sum += float64(v)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also use the math.Sum functions.

@jsternberg jsternberg force-pushed the feat/arrow-aggregates branch from 11a06a8 to b323c67 Compare December 19, 2018 17:40
All aggregates will now use the arrow interface. They do not support nil
at the moment.
@jsternberg
Copy link
Contributor Author

I might be doing something wrong (or my hardware can't be consistent enough), but I'm not seeing a huge difference.

benchmark                                                      old ns/op      new ns/op      delta
BenchmarkCount-12                                              299            308            +3.01%
BenchmarkFirst-12                                              390            414            +6.15%
BenchmarkLast-12                                               24358515       24443051       +0.35%
BenchmarkMax-12                                                26627664       26522729       -0.39%
BenchmarkMin-12                                                25825030       25964603       +0.54%
BenchmarkSample-12                                             173622         168401         -3.01%
Benchmark_QueryEndToEnd/aggregate_window.flux-12               6096529        5705963        -6.41%
Benchmark_QueryEndToEnd/derivative.flux-12                     4861718        4440814        -8.66%
Benchmark_QueryEndToEnd/derivative_nonnegative.flux-12         4960126        4751617        -4.20%
Benchmark_QueryEndToEnd/difference.flux-12                     4557824        4480866        -1.69%
Benchmark_QueryEndToEnd/difference_one_value.flux-12           4444671        4376162        -1.54%
Benchmark_QueryEndToEnd/difference_panic.flux-12               8102767        8236249        +1.65%
Benchmark_QueryEndToEnd/distinct.flux-12                       5242532        5058229        -3.52%
Benchmark_QueryEndToEnd/drop_after_rename.flux-12              5905355        5819781        -1.45%
Benchmark_QueryEndToEnd/drop_newname_after.flux-12             5841888        5496010        -5.92%
Benchmark_QueryEndToEnd/drop_newname_before.flux-12            5781593        5830370        +0.84%
Benchmark_QueryEndToEnd/drop_unused.flux-12                    8815937        8535313        -3.18%
Benchmark_QueryEndToEnd/duplicate.flux-12                      4788151        5034555        +5.15%
Benchmark_QueryEndToEnd/filter_by_regex.flux-12                12646172       13242785       +4.72%
Benchmark_QueryEndToEnd/filter_by_regex_function.flux-12       9284144        9106073        -1.92%
Benchmark_QueryEndToEnd/filter_by_tags.flux-12                 12791397       12983752       +1.50%
Benchmark_QueryEndToEnd/group.flux-12                          15335798       14832382       -3.28%
Benchmark_QueryEndToEnd/group_by_field.flux-12                 5172118        5081580        -1.75%
Benchmark_QueryEndToEnd/group_by_irregular.flux-12             11186200       11920449       +6.56%
Benchmark_QueryEndToEnd/group_except.flux-12                   5493249        5529193        +0.65%
Benchmark_QueryEndToEnd/group_ungroup.flux-12                  10025128       9647920        -3.76%
Benchmark_QueryEndToEnd/highestAverage.flux-12                 4686340        4681161        -0.11%
Benchmark_QueryEndToEnd/highestCurrent.flux-12                 5139468        5510307        +7.22%
Benchmark_QueryEndToEnd/highestMax.flux-12                     4562761        4832739        +5.92%
Benchmark_QueryEndToEnd/histogram.flux-12                      4641052        4440404        -4.32%
Benchmark_QueryEndToEnd/histogram_quantile.flux-12             4855003        4746516        -2.23%
Benchmark_QueryEndToEnd/increase.flux-12                       4866515        4672236        -3.99%
Benchmark_QueryEndToEnd/influxFieldsAsCols.flux-12             5438738        5483550        +0.82%
Benchmark_QueryEndToEnd/join.flux-12                           20900610       21683995       +3.75%
Benchmark_QueryEndToEnd/join_across_measurements.flux-12       4678755083     4561001247     -2.52%
Benchmark_QueryEndToEnd/keep.flux-12                           5475521        4831230        -11.77%
Benchmark_QueryEndToEnd/keep_fn.flux-12                        11356151       12416107       +9.33%
Benchmark_QueryEndToEnd/keys.flux-12                           10835230       11247548       +3.81%
Benchmark_QueryEndToEnd/last.flux-12                           4256475        5318142        +24.94%
Benchmark_QueryEndToEnd/lowestAverage.flux-12                  5310368        6082435        +14.54%
Benchmark_QueryEndToEnd/lowestCurrent.flux-12                  5590192        5618330        +0.50%
Benchmark_QueryEndToEnd/lowestMin.flux-12                      5717622        5453022        -4.63%
Benchmark_QueryEndToEnd/mean.flux-12                           10682260       4977054        -53.41%
Benchmark_QueryEndToEnd/meta_query_fields.flux-12              9787813        10283772       +5.07%
Benchmark_QueryEndToEnd/meta_query_measurements.flux-12        5800209        5862437        +1.07%
Benchmark_QueryEndToEnd/multiple_range.flux-12                 4711351        4930705        +4.66%
Benchmark_QueryEndToEnd/parse_regex.flux-12                    8776606        8537676        -2.72%
Benchmark_QueryEndToEnd/percentile.flux-12                     10233206       10538959       +2.99%
Benchmark_QueryEndToEnd/pivot.flux-12                          6039618        5928549        -1.84%
Benchmark_QueryEndToEnd/pivot_fields.flux-12                   5813087        5769527        -0.75%
Benchmark_QueryEndToEnd/pivot_mean.flux-12                     7655504        7207902        -5.85%
Benchmark_QueryEndToEnd/pivot_task_test.flux-12                10208917       10387107       +1.75%
Benchmark_QueryEndToEnd/range.flux-12                          4353781        4225309        -2.95%
Benchmark_QueryEndToEnd/rename.flux-12                         5920960        5912140        -0.15%
Benchmark_QueryEndToEnd/rename_fn.flux-12                      11323471       11302393       -0.19%
Benchmark_QueryEndToEnd/rename_multiple.flux-12                5927302        5823263        -1.76%
Benchmark_QueryEndToEnd/select_measurement.flux-12             13933860       13878730       -0.40%
Benchmark_QueryEndToEnd/select_measurement_field.flux-12       14400439       13934988       -3.23%
Benchmark_QueryEndToEnd/selector_preserve_time.flux-12         5593016        5568518        -0.44%
Benchmark_QueryEndToEnd/show_all_tag_keys.flux-12              34354708       32751749       -4.67%
Benchmark_QueryEndToEnd/simple_max.flux-12                     9562341        9355821        -2.16%
Benchmark_QueryEndToEnd/sort.flux-12                           5350750        5241809        -2.04%
Benchmark_QueryEndToEnd/state_count.flux-12                    7506127        7897833        +5.22%
Benchmark_QueryEndToEnd/state_duration.flux-12                 8098396        7906718        -2.37%
Benchmark_QueryEndToEnd/string_sort.flux-12                    4865195        4771124        -1.93%
Benchmark_QueryEndToEnd/task_per_line.flux-12                  25725006       26091304       +1.42%
Benchmark_QueryEndToEnd/top.flux-12                            4889126        4853439        -0.73%
Benchmark_QueryEndToEnd/union.flux-12                          21650052       20800627       -3.92%
Benchmark_QueryEndToEnd/union_heterogeneous.flux-12            27811623       28348906       +1.93%
Benchmark_QueryEndToEnd/window.flux-12                         13902147       13741009       -1.16%
Benchmark_QueryEndToEnd/window_default_start_align.flux-12     5432266        5235253        -3.63%
Benchmark_QueryEndToEnd/window_generate_empty.flux-12          5943723        6023432        +1.34%
Benchmark_QueryEndToEnd/window_group_mean_ungroup.flux-12      6946770        6999504        +0.76%
Benchmark_QueryEndToEnd/window_offset.flux-12                  13890000       13814743       -0.54%
Benchmark_QueryEndToEnd/window_start_bound.flux-12             5288037        5124869        -3.09%

benchmark                                                      old allocs     new allocs     delta
Benchmark_QueryEndToEnd/aggregate_window.flux-12               42437          42391          -0.11%
Benchmark_QueryEndToEnd/derivative.flux-12                     30496          30593          +0.32%
Benchmark_QueryEndToEnd/derivative_nonnegative.flux-12         31462          31548          +0.27%
Benchmark_QueryEndToEnd/difference.flux-12                     29372          29363          -0.03%
Benchmark_QueryEndToEnd/difference_one_value.flux-12           29710          29747          +0.12%
Benchmark_QueryEndToEnd/difference_panic.flux-12               53208          53219          +0.02%
Benchmark_QueryEndToEnd/distinct.flux-12                       34710          34804          +0.27%
Benchmark_QueryEndToEnd/drop_after_rename.flux-12              41430          41466          +0.09%
Benchmark_QueryEndToEnd/drop_newname_after.flux-12             41062          41174          +0.27%
Benchmark_QueryEndToEnd/drop_newname_before.flux-12            41252          41580          +0.80%
Benchmark_QueryEndToEnd/drop_unused.flux-12                    58378          58632          +0.44%
Benchmark_QueryEndToEnd/duplicate.flux-12                      32445          32560          +0.35%
Benchmark_QueryEndToEnd/filter_by_regex.flux-12                97161          97580          +0.43%
Benchmark_QueryEndToEnd/filter_by_regex_function.flux-12       64760          64656          -0.16%
Benchmark_QueryEndToEnd/filter_by_tags.flux-12                 95348          95147          -0.21%
Benchmark_QueryEndToEnd/group.flux-12                          111196         111035         -0.14%
Benchmark_QueryEndToEnd/group_by_field.flux-12                 34555          34692          +0.40%
Benchmark_QueryEndToEnd/group_by_irregular.flux-12             88243          88361          +0.13%
Benchmark_QueryEndToEnd/group_except.flux-12                   38764          38855          +0.23%
Benchmark_QueryEndToEnd/group_ungroup.flux-12                  70869          71044          +0.25%
Benchmark_QueryEndToEnd/highestAverage.flux-12                 29040          29126          +0.30%
Benchmark_QueryEndToEnd/highestCurrent.flux-12                 37281          37415          +0.36%
Benchmark_QueryEndToEnd/highestMax.flux-12                     30070          30234          +0.55%
Benchmark_QueryEndToEnd/histogram.flux-12                      27917          27972          +0.20%
Benchmark_QueryEndToEnd/histogram_quantile.flux-12             31873          31823          -0.16%
Benchmark_QueryEndToEnd/increase.flux-12                       30660          30823          +0.53%
Benchmark_QueryEndToEnd/influxFieldsAsCols.flux-12             36717          36696          -0.06%
Benchmark_QueryEndToEnd/join.flux-12                           176666         176921         +0.14%
Benchmark_QueryEndToEnd/join_across_measurements.flux-12       864241         864843         +0.07%
Benchmark_QueryEndToEnd/keep.flux-12                           33928          33996          +0.20%
Benchmark_QueryEndToEnd/keep_fn.flux-12                        77471          77667          +0.25%
Benchmark_QueryEndToEnd/keys.flux-12                           79583          79350          -0.29%
Benchmark_QueryEndToEnd/last.flux-12                           26617          26695          +0.29%
Benchmark_QueryEndToEnd/lowestAverage.flux-12                  36285          36305          +0.06%
Benchmark_QueryEndToEnd/lowestCurrent.flux-12                  37291          37426          +0.36%
Benchmark_QueryEndToEnd/lowestMin.flux-12                      37308          37478          +0.46%
Benchmark_QueryEndToEnd/mean.flux-12                           77570          32148          -58.56%
Benchmark_QueryEndToEnd/meta_query_fields.flux-12              70371          70913          +0.77%
Benchmark_QueryEndToEnd/meta_query_measurements.flux-12        41574          41446          -0.31%
Benchmark_QueryEndToEnd/multiple_range.flux-12                 33014          33136          +0.37%
Benchmark_QueryEndToEnd/parse_regex.flux-12                    56487          56630          +0.25%
Benchmark_QueryEndToEnd/percentile.flux-12                     75958          75846          -0.15%
Benchmark_QueryEndToEnd/pivot.flux-12                          41976          42173          +0.47%
Benchmark_QueryEndToEnd/pivot_fields.flux-12                   41724          41892          +0.40%
Benchmark_QueryEndToEnd/pivot_mean.flux-12                     56545          56562          +0.03%
Benchmark_QueryEndToEnd/pivot_task_test.flux-12                69771          69499          -0.39%
Benchmark_QueryEndToEnd/range.flux-12                          27109          26943          -0.61%
Benchmark_QueryEndToEnd/rename.flux-12                         41564          41679          +0.28%
Benchmark_QueryEndToEnd/rename_fn.flux-12                      76296          76303          +0.01%
Benchmark_QueryEndToEnd/rename_multiple.flux-12                41279          41377          +0.24%
Benchmark_QueryEndToEnd/select_measurement.flux-12             97216          97011          -0.21%
Benchmark_QueryEndToEnd/select_measurement_field.flux-12       103456         103713         +0.25%
Benchmark_QueryEndToEnd/selector_preserve_time.flux-12         38997          39047          +0.13%
Benchmark_QueryEndToEnd/show_all_tag_keys.flux-12              159457         159658         +0.13%
Benchmark_QueryEndToEnd/simple_max.flux-12                     65533          65759          +0.34%
Benchmark_QueryEndToEnd/sort.flux-12                           34626          34754          +0.37%
Benchmark_QueryEndToEnd/state_count.flux-12                    50040          50087          +0.09%
Benchmark_QueryEndToEnd/state_duration.flux-12                 49854          50201          +0.70%
Benchmark_QueryEndToEnd/string_sort.flux-12                    29175          29428          +0.87%
Benchmark_QueryEndToEnd/task_per_line.flux-12                  226317         225757         -0.25%
Benchmark_QueryEndToEnd/top.flux-12                            30822          30744          -0.25%
Benchmark_QueryEndToEnd/union.flux-12                          174397         174285         -0.06%
Benchmark_QueryEndToEnd/union_heterogeneous.flux-12            236421         236374         -0.02%
Benchmark_QueryEndToEnd/window.flux-12                         106464         106344         -0.11%
Benchmark_QueryEndToEnd/window_default_start_align.flux-12     34310          34563          +0.74%
Benchmark_QueryEndToEnd/window_generate_empty.flux-12          41574          41633          +0.14%
Benchmark_QueryEndToEnd/window_group_mean_ungroup.flux-12      50803          50807          +0.01%
Benchmark_QueryEndToEnd/window_offset.flux-12                  109685         109920         +0.21%
Benchmark_QueryEndToEnd/window_start_bound.flux-12             34438          34535          +0.28%

benchmark                                                      old bytes     new bytes     delta
Benchmark_QueryEndToEnd/aggregate_window.flux-12               2971113       2967949       -0.11%
Benchmark_QueryEndToEnd/derivative.flux-12                     2104936       2107853       +0.14%
Benchmark_QueryEndToEnd/derivative_nonnegative.flux-12         2154519       2162736       +0.38%
Benchmark_QueryEndToEnd/difference.flux-12                     2035806       2031878       -0.19%
Benchmark_QueryEndToEnd/difference_one_value.flux-12           2047924       2050146       +0.11%
Benchmark_QueryEndToEnd/difference_panic.flux-12               3577033       3579712       +0.07%
Benchmark_QueryEndToEnd/distinct.flux-12                       2450168       2459468       +0.38%
Benchmark_QueryEndToEnd/drop_after_rename.flux-12              2880156       2885480       +0.18%
Benchmark_QueryEndToEnd/drop_newname_after.flux-12             2850144       2862000       +0.42%
Benchmark_QueryEndToEnd/drop_newname_before.flux-12            2869089       2888337       +0.67%
Benchmark_QueryEndToEnd/drop_unused.flux-12                    3910930       3924314       +0.34%
Benchmark_QueryEndToEnd/duplicate.flux-12                      2240600       2251855       +0.50%
Benchmark_QueryEndToEnd/filter_by_regex.flux-12                6521051       6548586       +0.42%
Benchmark_QueryEndToEnd/filter_by_regex_function.flux-12       4342475       4328933       -0.31%
Benchmark_QueryEndToEnd/filter_by_tags.flux-12                 6393253       6368249       -0.39%
Benchmark_QueryEndToEnd/group.flux-12                          7425362       7414814       -0.14%
Benchmark_QueryEndToEnd/group_by_field.flux-12                 2366483       2376890       +0.44%
Benchmark_QueryEndToEnd/group_by_irregular.flux-12             5817445       5833257       +0.27%
Benchmark_QueryEndToEnd/group_except.flux-12                   2649146       2659409       +0.39%
Benchmark_QueryEndToEnd/group_ungroup.flux-12                  4796018       4812859       +0.35%
Benchmark_QueryEndToEnd/highestAverage.flux-12                 1885698       1893877       +0.43%
Benchmark_QueryEndToEnd/highestCurrent.flux-12                 2470053       2479339       +0.38%
Benchmark_QueryEndToEnd/highestMax.flux-12                     1958422       1969266       +0.55%
Benchmark_QueryEndToEnd/histogram.flux-12                      1880019       1880899       +0.05%
Benchmark_QueryEndToEnd/histogram_quantile.flux-12             2174970       2170328       -0.21%
Benchmark_QueryEndToEnd/increase.flux-12                       2138716       2150279       +0.54%
Benchmark_QueryEndToEnd/influxFieldsAsCols.flux-12             2592367       2591858       -0.02%
Benchmark_QueryEndToEnd/join.flux-12                           11470493      11480089      +0.08%
Benchmark_QueryEndToEnd/join_across_measurements.flux-12       81749800      81830408      +0.10%
Benchmark_QueryEndToEnd/keep.flux-12                           2317761       2323151       +0.23%
Benchmark_QueryEndToEnd/keep_fn.flux-12                        5062618       5066708       +0.08%
Benchmark_QueryEndToEnd/keys.flux-12                           5456271       5441538       -0.27%
Benchmark_QueryEndToEnd/last.flux-12                           1853163       1852154       -0.05%
Benchmark_QueryEndToEnd/lowestAverage.flux-12                  2400590       2402220       +0.07%
Benchmark_QueryEndToEnd/lowestCurrent.flux-12                  2473799       2477349       +0.14%
Benchmark_QueryEndToEnd/lowestMin.flux-12                      2473435       2481768       +0.34%
Benchmark_QueryEndToEnd/mean.flux-12                           5345294       2203433       -58.78%
Benchmark_QueryEndToEnd/meta_query_fields.flux-12              4765549       4807680       +0.88%
Benchmark_QueryEndToEnd/meta_query_measurements.flux-12        2897394       2884868       -0.43%
Benchmark_QueryEndToEnd/multiple_range.flux-12                 2240106       2249808       +0.43%
Benchmark_QueryEndToEnd/parse_regex.flux-12                    3841945       3852210       +0.27%
Benchmark_QueryEndToEnd/percentile.flux-12                     5102743       5097631       -0.10%
Benchmark_QueryEndToEnd/pivot.flux-12                          2836741       2855361       +0.66%
Benchmark_QueryEndToEnd/pivot_fields.flux-12                   2835940       2846653       +0.38%
Benchmark_QueryEndToEnd/pivot_mean.flux-12                     3838944       3833639       -0.14%
Benchmark_QueryEndToEnd/pivot_task_test.flux-12                4525395       4502644       -0.50%
Benchmark_QueryEndToEnd/range.flux-12                          1865786       1850042       -0.84%
Benchmark_QueryEndToEnd/rename.flux-12                         2876682       2881495       +0.17%
Benchmark_QueryEndToEnd/rename_fn.flux-12                      5033870       5038620       +0.09%
Benchmark_QueryEndToEnd/rename_multiple.flux-12                2894927       2894869       -0.00%
Benchmark_QueryEndToEnd/select_measurement.flux-12             6489387       6474020       -0.24%
Benchmark_QueryEndToEnd/select_measurement_field.flux-12       6831777       6843409       +0.17%
Benchmark_QueryEndToEnd/selector_preserve_time.flux-12         2664335       2663784       -0.02%
Benchmark_QueryEndToEnd/show_all_tag_keys.flux-12              11441206      11461550      +0.18%
Benchmark_QueryEndToEnd/simple_max.flux-12                     4378941       4388303       +0.21%
Benchmark_QueryEndToEnd/sort.flux-12                           2390202       2402302       +0.51%
Benchmark_QueryEndToEnd/state_count.flux-12                    3339547       3340968       +0.04%
Benchmark_QueryEndToEnd/state_duration.flux-12                 3322479       3346397       +0.72%
Benchmark_QueryEndToEnd/string_sort.flux-12                    2018640       2036325       +0.88%
Benchmark_QueryEndToEnd/task_per_line.flux-12                  13832113      13791490      -0.29%
Benchmark_QueryEndToEnd/top.flux-12                            2084568       2077590       -0.33%
Benchmark_QueryEndToEnd/union.flux-12                          11399873      11405366      +0.05%
Benchmark_QueryEndToEnd/union_heterogeneous.flux-12            15486388      15469102      -0.11%
Benchmark_QueryEndToEnd/window.flux-12                         7310105       7299291       -0.15%
Benchmark_QueryEndToEnd/window_default_start_align.flux-12     2346337       2360374       +0.60%
Benchmark_QueryEndToEnd/window_generate_empty.flux-12          2824740       2826313       +0.06%
Benchmark_QueryEndToEnd/window_group_mean_ungroup.flux-12      3539735       3534325       -0.15%
Benchmark_QueryEndToEnd/window_offset.flux-12                  7492964       7523603       +0.41%
Benchmark_QueryEndToEnd/window_start_bound.flux-12             2356269       2362747       +0.27%

@jsternberg jsternberg force-pushed the feat/arrow-aggregates branch from b323c67 to ba7c765 Compare December 19, 2018 17:46
@jsternberg
Copy link
Contributor Author

I pushed the updated benchmark code and fixed an issue with Sum on empty arrays.

@nathanielc
Copy link
Contributor

@jsternberg This biggest perf advantage is when we use the special math.* functions. Only the Sum and Mean aggregates do that currently. I do see a strong improvement for Benchmark_QueryEndToEnd/mean.flux

Although I do not see benchmarks for BenchmarkSum or BenchmarkMean which do exist. Can you add those benchmarks? Also Benchmark_QueryEndToEnd/sum.flux seems to be missing too.

@jsternberg
Copy link
Contributor Author

The reason why sum.flux is missing is because it was added. I'll do a little gitfu to get it in there. I am not sure why BenchmarkSum is missing as I can see it too.

@jsternberg
Copy link
Contributor Author

benchmark                                                      old ns/op      new ns/op      delta
BenchmarkCount-12                                              279            281            +0.72%
BenchmarkFirst-12                                              456            387            -15.13%
BenchmarkLast-12                                               22594469       23912221       +5.83%
BenchmarkMax-12                                                25810216       27118480       +5.07%
BenchmarkMean-12                                               2482660        197466         -92.05%
BenchmarkMin-12                                                25287934       24608762       -2.69%
BenchmarkPercentile-12                                         226099080      224117180      -0.88%
BenchmarkSample-12                                             172467         165771         -3.88%
BenchmarkSkew-12                                               7328041        7555804        +3.11%
BenchmarkSpread-12                                             1179546        1086457        -7.89%
BenchmarkStddev-12                                             7157824        7221730        +0.89%
BenchmarkSum-12                                                2541518        199284         -92.16%
Benchmark_QueryEndToEnd/aggregate_window.flux-12               5546143        5811779        +4.79%
Benchmark_QueryEndToEnd/count.flux-12                          4642830        4845652        +4.37%
Benchmark_QueryEndToEnd/derivative.flux-12                     4458013        4480545        +0.51%
Benchmark_QueryEndToEnd/derivative_nonnegative.flux-12         4978163        4477635        -10.05%
Benchmark_QueryEndToEnd/difference.flux-12                     4546127        4459633        -1.90%
Benchmark_QueryEndToEnd/difference_one_value.flux-12           4460184        4457720        -0.06%
Benchmark_QueryEndToEnd/difference_panic.flux-12               7835953        7766849        -0.88%
Benchmark_QueryEndToEnd/distinct.flux-12                       5003326        4978893        -0.49%
Benchmark_QueryEndToEnd/drop_after_rename.flux-12              5509958        5520002        +0.18%
Benchmark_QueryEndToEnd/drop_newname_after.flux-12             5706553        5703967        -0.05%
Benchmark_QueryEndToEnd/drop_newname_before.flux-12            5478223        5621301        +2.61%
Benchmark_QueryEndToEnd/drop_unused.flux-12                    8541011        8500710        -0.47%
Benchmark_QueryEndToEnd/duplicate.flux-12                      5077353        4982981        -1.86%
Benchmark_QueryEndToEnd/filter_by_regex.flux-12                12661594       12822846       +1.27%
Benchmark_QueryEndToEnd/filter_by_regex_function.flux-12       9346111        9329178        -0.18%
Benchmark_QueryEndToEnd/filter_by_tags.flux-12                 12486776       12493603       +0.05%
Benchmark_QueryEndToEnd/group.flux-12                          14832384       14783579       -0.33%
Benchmark_QueryEndToEnd/group_by_field.flux-12                 5033265        4892145        -2.80%
Benchmark_QueryEndToEnd/group_by_irregular.flux-12             11576177       11456286       -1.04%
Benchmark_QueryEndToEnd/group_except.flux-12                   5494178        5579007        +1.54%
Benchmark_QueryEndToEnd/group_ungroup.flux-12                  9830041        9951326        +1.23%
Benchmark_QueryEndToEnd/highestAverage.flux-12                 4637825        4660949        +0.50%
Benchmark_QueryEndToEnd/highestCurrent.flux-12                 5307078        5553025        +4.63%
Benchmark_QueryEndToEnd/highestMax.flux-12                     4702385        4807674        +2.24%
Benchmark_QueryEndToEnd/histogram.flux-12                      4722512        4437317        -6.04%
Benchmark_QueryEndToEnd/histogram_quantile.flux-12             4872396        4777001        -1.96%
Benchmark_QueryEndToEnd/increase.flux-12                       4884355        4592290        -5.98%
Benchmark_QueryEndToEnd/influxFieldsAsCols.flux-12             5564785        5400789        -2.95%
Benchmark_QueryEndToEnd/join.flux-12                           20189834       20868754       +3.36%
Benchmark_QueryEndToEnd/join_across_measurements.flux-12       4407708914     4528464453     +2.74%
Benchmark_QueryEndToEnd/keep.flux-12                           4975885        5131054        +3.12%
Benchmark_QueryEndToEnd/keep_fn.flux-12                        11787714       11501857       -2.43%
Benchmark_QueryEndToEnd/keys.flux-12                           10271732       10661956       +3.80%
Benchmark_QueryEndToEnd/last.flux-12                           4121727        4167590        +1.11%
Benchmark_QueryEndToEnd/lowestAverage.flux-12                  5252367        5080373        -3.27%
Benchmark_QueryEndToEnd/lowestCurrent.flux-12                  6717357        5208933        -22.46%
Benchmark_QueryEndToEnd/lowestMin.flux-12                      6305192        5329567        -15.47%
Benchmark_QueryEndToEnd/mean.flux-12                           5103404        4939628        -3.21%
Benchmark_QueryEndToEnd/meta_query_fields.flux-12              10022065       9937632        -0.84%
Benchmark_QueryEndToEnd/meta_query_measurements.flux-12        5901771        5863696        -0.65%
Benchmark_QueryEndToEnd/multiple_range.flux-12                 5002648        5017405        +0.29%
Benchmark_QueryEndToEnd/parse_regex.flux-12                    8623096        8150083        -5.49%
Benchmark_QueryEndToEnd/percentile.flux-12                     10540526       10457327       -0.79%
Benchmark_QueryEndToEnd/percentile_aggregate.flux-12           4942040        4889448        -1.06%
Benchmark_QueryEndToEnd/percentile_tdigest.flux-12             5805826        4805210        -17.23%
Benchmark_QueryEndToEnd/pivot.flux-12                          6458285        5647144        -12.56%
Benchmark_QueryEndToEnd/pivot_fields.flux-12                   6081287        5777374        -5.00%
Benchmark_QueryEndToEnd/pivot_mean.flux-12                     7557659        7109271        -5.93%
Benchmark_QueryEndToEnd/pivot_task_test.flux-12                11533544       9798788        -15.04%
Benchmark_QueryEndToEnd/range.flux-12                          4718354        4349567        -7.82%
Benchmark_QueryEndToEnd/rename.flux-12                         6325051        5922185        -6.37%
Benchmark_QueryEndToEnd/rename_fn.flux-12                      12402341       11149033       -10.11%
Benchmark_QueryEndToEnd/rename_multiple.flux-12                6298254        5821373        -7.57%
Benchmark_QueryEndToEnd/select_measurement.flux-12             14903921       13420803       -9.95%
Benchmark_QueryEndToEnd/select_measurement_field.flux-12       14524539       14439369       -0.59%
Benchmark_QueryEndToEnd/selector_preserve_time.flux-12         5706452        5508530        -3.47%
Benchmark_QueryEndToEnd/show_all_tag_keys.flux-12              35828927       32772272       -8.53%
Benchmark_QueryEndToEnd/simple_max.flux-12                     10274472       9133607        -11.10%
Benchmark_QueryEndToEnd/skew.flux-12                           5144012        4986115        -3.07%
Benchmark_QueryEndToEnd/sort.flux-12                           5507523        5437311        -1.27%
Benchmark_QueryEndToEnd/spread.flux-12                         5406129        5088207        -5.88%
Benchmark_QueryEndToEnd/state_count.flux-12                    7644951        7773958        +1.69%
Benchmark_QueryEndToEnd/state_duration.flux-12                 8668487        7445368        -14.11%
Benchmark_QueryEndToEnd/stddev.flux-12                         5040920        4661560        -7.53%
Benchmark_QueryEndToEnd/string_sort.flux-12                    4908385        4599212        -6.30%
Benchmark_QueryEndToEnd/sum.flux-12                            5318304        4752362        -10.64%
Benchmark_QueryEndToEnd/task_per_line.flux-12                  25130254       26298784       +4.65%
Benchmark_QueryEndToEnd/top.flux-12                            4780262        4727097        -1.11%
Benchmark_QueryEndToEnd/union.flux-12                          23362937       21533049       -7.83%
Benchmark_QueryEndToEnd/union_heterogeneous.flux-12            29618702       27571112       -6.91%
Benchmark_QueryEndToEnd/window.flux-12                         14912874       13337735       -10.56%
Benchmark_QueryEndToEnd/window_default_start_align.flux-12     5287564        4997195        -5.49%
Benchmark_QueryEndToEnd/window_generate_empty.flux-12          6274829        5891727        -6.11%
Benchmark_QueryEndToEnd/window_group_mean_ungroup.flux-12      6713673        6897646        +2.74%
Benchmark_QueryEndToEnd/window_offset.flux-12                  14697581       14704467       +0.05%
Benchmark_QueryEndToEnd/window_start_bound.flux-12             5736938        5198402        -9.39%

benchmark                                                      old allocs     new allocs     delta
Benchmark_QueryEndToEnd/aggregate_window.flux-12               42227          42248          +0.05%
Benchmark_QueryEndToEnd/count.flux-12                          33223          33138          -0.26%
Benchmark_QueryEndToEnd/derivative.flux-12                     30574          30357          -0.71%
Benchmark_QueryEndToEnd/derivative_nonnegative.flux-12         31408          31342          -0.21%
Benchmark_QueryEndToEnd/difference.flux-12                     29171          29136          -0.12%
Benchmark_QueryEndToEnd/difference_one_value.flux-12           29622          29646          +0.08%
Benchmark_QueryEndToEnd/difference_panic.flux-12               53173          53321          +0.28%
Benchmark_QueryEndToEnd/distinct.flux-12                       34680          34539          -0.41%
Benchmark_QueryEndToEnd/drop_after_rename.flux-12              41440          41273          -0.40%
Benchmark_QueryEndToEnd/drop_newname_after.flux-12             41148          40969          -0.44%
Benchmark_QueryEndToEnd/drop_newname_before.flux-12            41303          41316          +0.03%
Benchmark_QueryEndToEnd/drop_unused.flux-12                    58289          58366          +0.13%
Benchmark_QueryEndToEnd/duplicate.flux-12                      32480          32366          -0.35%
Benchmark_QueryEndToEnd/filter_by_regex.flux-12                97110          97179          +0.07%
Benchmark_QueryEndToEnd/filter_by_regex_function.flux-12       64551          64503          -0.07%
Benchmark_QueryEndToEnd/filter_by_tags.flux-12                 95126          95009          -0.12%
Benchmark_QueryEndToEnd/group.flux-12                          111091         111166         +0.07%
Benchmark_QueryEndToEnd/group_by_field.flux-12                 34557          34540          -0.05%
Benchmark_QueryEndToEnd/group_by_irregular.flux-12             88167          88140          -0.03%
Benchmark_QueryEndToEnd/group_except.flux-12                   38681          38544          -0.35%
Benchmark_QueryEndToEnd/group_ungroup.flux-12                  70867          70666          -0.28%
Benchmark_QueryEndToEnd/highestAverage.flux-12                 29011          28980          -0.11%
Benchmark_QueryEndToEnd/highestCurrent.flux-12                 37277          37301          +0.06%
Benchmark_QueryEndToEnd/highestMax.flux-12                     30164          30024          -0.46%
Benchmark_QueryEndToEnd/histogram.flux-12                      27821          27781          -0.14%
Benchmark_QueryEndToEnd/histogram_quantile.flux-12             31744          31755          +0.03%
Benchmark_QueryEndToEnd/increase.flux-12                       30608          30591          -0.06%
Benchmark_QueryEndToEnd/influxFieldsAsCols.flux-12             36540          36581          +0.11%
Benchmark_QueryEndToEnd/join.flux-12                           176762         176453         -0.17%
Benchmark_QueryEndToEnd/join_across_measurements.flux-12       865079         864230         -0.10%
Benchmark_QueryEndToEnd/keep.flux-12                           33902          33785          -0.35%
Benchmark_QueryEndToEnd/keep_fn.flux-12                        77732          77474          -0.33%
Benchmark_QueryEndToEnd/keys.flux-12                           79291          79182          -0.14%
Benchmark_QueryEndToEnd/last.flux-12                           26548          26330          -0.82%
Benchmark_QueryEndToEnd/lowestAverage.flux-12                  36162          36055          -0.30%
Benchmark_QueryEndToEnd/lowestCurrent.flux-12                  37311          37200          -0.30%
Benchmark_QueryEndToEnd/lowestMin.flux-12                      37176          37211          +0.09%
Benchmark_QueryEndToEnd/mean.flux-12                           32008          31967          -0.13%
Benchmark_QueryEndToEnd/meta_query_fields.flux-12              70692          70505          -0.26%
Benchmark_QueryEndToEnd/meta_query_measurements.flux-12        41337          41288          -0.12%
Benchmark_QueryEndToEnd/multiple_range.flux-12                 33014          32959          -0.17%
Benchmark_QueryEndToEnd/parse_regex.flux-12                    56303          56387          +0.15%
Benchmark_QueryEndToEnd/percentile.flux-12                     76126          75921          -0.27%
Benchmark_QueryEndToEnd/percentile_aggregate.flux-12           33442          33349          -0.28%
Benchmark_QueryEndToEnd/percentile_tdigest.flux-12             33420          33388          -0.10%
Benchmark_QueryEndToEnd/pivot.flux-12                          41963          41977          +0.03%
Benchmark_QueryEndToEnd/pivot_fields.flux-12                   41704          41608          -0.23%
Benchmark_QueryEndToEnd/pivot_mean.flux-12                     56423          56436          +0.02%
Benchmark_QueryEndToEnd/pivot_task_test.flux-12                69678          69511          -0.24%
Benchmark_QueryEndToEnd/range.flux-12                          26870          26854          -0.06%
Benchmark_QueryEndToEnd/rename.flux-12                         41578          41469          -0.26%
Benchmark_QueryEndToEnd/rename_fn.flux-12                      75872          75784          -0.12%
Benchmark_QueryEndToEnd/rename_multiple.flux-12                41207          41105          -0.25%
Benchmark_QueryEndToEnd/select_measurement.flux-12             97133          96764          -0.38%
Benchmark_QueryEndToEnd/select_measurement_field.flux-12       103306         103641         +0.32%
Benchmark_QueryEndToEnd/selector_preserve_time.flux-12         38853          38807          -0.12%
Benchmark_QueryEndToEnd/show_all_tag_keys.flux-12              159507         159213         -0.18%
Benchmark_QueryEndToEnd/simple_max.flux-12                     65575          65551          -0.04%
Benchmark_QueryEndToEnd/skew.flux-12                           32040          31896          -0.45%
Benchmark_QueryEndToEnd/sort.flux-12                           34624          34645          +0.06%
Benchmark_QueryEndToEnd/spread.flux-12                         32017          31989          -0.09%
Benchmark_QueryEndToEnd/state_count.flux-12                    49726          49863          +0.28%
Benchmark_QueryEndToEnd/state_duration.flux-12                 50140          50057          -0.17%
Benchmark_QueryEndToEnd/stddev.flux-12                         31908          31930          +0.07%
Benchmark_QueryEndToEnd/string_sort.flux-12                    29245          29166          -0.27%
Benchmark_QueryEndToEnd/sum.flux-12                            32004          31984          -0.06%
Benchmark_QueryEndToEnd/task_per_line.flux-12                  225535         225417         -0.05%
Benchmark_QueryEndToEnd/top.flux-12                            30598          30661          +0.21%
Benchmark_QueryEndToEnd/union.flux-12                          173920         174132         +0.12%
Benchmark_QueryEndToEnd/union_heterogeneous.flux-12            236015         236493         +0.20%
Benchmark_QueryEndToEnd/window.flux-12                         106495         106088         -0.38%
Benchmark_QueryEndToEnd/window_default_start_align.flux-12     34365          34300          -0.19%
Benchmark_QueryEndToEnd/window_generate_empty.flux-12          41539          41417          -0.29%
Benchmark_QueryEndToEnd/window_group_mean_ungroup.flux-12      50562          50489          -0.14%
Benchmark_QueryEndToEnd/window_offset.flux-12                  109956         109725         -0.21%
Benchmark_QueryEndToEnd/window_start_bound.flux-12             34448          34359          -0.26%

benchmark                                                      old bytes     new bytes     delta
Benchmark_QueryEndToEnd/aggregate_window.flux-12               2953640       2955773       +0.07%
Benchmark_QueryEndToEnd/count.flux-12                          2272460       2266391       -0.27%
Benchmark_QueryEndToEnd/derivative.flux-12                     2101652       2087467       -0.67%
Benchmark_QueryEndToEnd/derivative_nonnegative.flux-12         2148707       2144349       -0.20%
Benchmark_QueryEndToEnd/difference.flux-12                     2017038       2015387       -0.08%
Benchmark_QueryEndToEnd/difference_one_value.flux-12           2038939       2039609       +0.03%
Benchmark_QueryEndToEnd/difference_panic.flux-12               3571285       3580286       +0.25%
Benchmark_QueryEndToEnd/distinct.flux-12                       2444899       2435801       -0.37%
Benchmark_QueryEndToEnd/drop_after_rename.flux-12              2878360       2868020       -0.36%
Benchmark_QueryEndToEnd/drop_newname_after.flux-12             2854142       2843826       -0.36%
Benchmark_QueryEndToEnd/drop_newname_before.flux-12            2866977       2872279       +0.18%
Benchmark_QueryEndToEnd/drop_unused.flux-12                    3896566       3900365       +0.10%
Benchmark_QueryEndToEnd/duplicate.flux-12                      2240564       2234684       -0.26%
Benchmark_QueryEndToEnd/filter_by_regex.flux-12                6516683       6522958       +0.10%
Benchmark_QueryEndToEnd/filter_by_regex_function.flux-12       4323513       4322405       -0.03%
Benchmark_QueryEndToEnd/filter_by_tags.flux-12                 6362639       6355438       -0.11%
Benchmark_QueryEndToEnd/group.flux-12                          7401226       7421095       +0.27%
Benchmark_QueryEndToEnd/group_by_field.flux-12                 2363306       2364935       +0.07%
Benchmark_QueryEndToEnd/group_by_irregular.flux-12             5809236       5818440       +0.16%
Benchmark_QueryEndToEnd/group_except.flux-12                   2642756       2634056       -0.33%
Benchmark_QueryEndToEnd/group_ungroup.flux-12                  4793273       4782292       -0.23%
Benchmark_QueryEndToEnd/highestAverage.flux-12                 1878534       1879858       +0.07%
Benchmark_QueryEndToEnd/highestCurrent.flux-12                 2465899       2471993       +0.25%
Benchmark_QueryEndToEnd/highestMax.flux-12                     1959827       1951783       -0.41%
Benchmark_QueryEndToEnd/histogram.flux-12                      1869029       1866423       -0.14%
Benchmark_QueryEndToEnd/histogram_quantile.flux-12             2159908       2161747       +0.09%
Benchmark_QueryEndToEnd/increase.flux-12                       2133093       2133505       +0.02%
Benchmark_QueryEndToEnd/influxFieldsAsCols.flux-12             2577245       2581372       +0.16%
Benchmark_QueryEndToEnd/join.flux-12                           11478174      11453707      -0.21%
Benchmark_QueryEndToEnd/join_across_measurements.flux-12       81792008      81765960      -0.03%
Benchmark_QueryEndToEnd/keep.flux-12                           2314505       2306023       -0.37%
Benchmark_QueryEndToEnd/keep_fn.flux-12                        5066746       5054534       -0.24%
Benchmark_QueryEndToEnd/keys.flux-12                           5427679       5421504       -0.11%
Benchmark_QueryEndToEnd/last.flux-12                           1841926       1827782       -0.77%
Benchmark_QueryEndToEnd/lowestAverage.flux-12                  2388130       2380371       -0.32%
Benchmark_QueryEndToEnd/lowestCurrent.flux-12                  2469102       2461847       -0.29%
Benchmark_QueryEndToEnd/lowestMin.flux-12                      2458687       2461376       +0.11%
Benchmark_QueryEndToEnd/mean.flux-12                           2192392       2187937       -0.20%
Benchmark_QueryEndToEnd/meta_query_fields.flux-12              4781858       4772853       -0.19%
Benchmark_QueryEndToEnd/meta_query_measurements.flux-12        2874411       2870582       -0.13%
Benchmark_QueryEndToEnd/multiple_range.flux-12                 2243453       2238849       -0.21%
Benchmark_QueryEndToEnd/parse_regex.flux-12                    3824755       3829789       +0.13%
Benchmark_QueryEndToEnd/percentile.flux-12                     5111974       5099276       -0.25%
Benchmark_QueryEndToEnd/percentile_aggregate.flux-12           2252938       2247543       -0.24%
Benchmark_QueryEndToEnd/percentile_tdigest.flux-12             2415562       2414563       -0.04%
Benchmark_QueryEndToEnd/pivot.flux-12                          2840005       2840818       +0.03%
Benchmark_QueryEndToEnd/pivot_fields.flux-12                   2829044       2820285       -0.31%
Benchmark_QueryEndToEnd/pivot_mean.flux-12                     3820120       3823387       +0.09%
Benchmark_QueryEndToEnd/pivot_task_test.flux-12                4508042       4497400       -0.24%
Benchmark_QueryEndToEnd/range.flux-12                          1841925       1841125       -0.04%
Benchmark_QueryEndToEnd/rename.flux-12                         2874661       2867403       -0.25%
Benchmark_QueryEndToEnd/rename_fn.flux-12                      4999903       4990762       -0.18%
Benchmark_QueryEndToEnd/rename_multiple.flux-12                2881385       2874103       -0.25%
Benchmark_QueryEndToEnd/select_measurement.flux-12             6487627       6460666       -0.42%
Benchmark_QueryEndToEnd/select_measurement_field.flux-12       6808382       6827486       +0.28%
Benchmark_QueryEndToEnd/selector_preserve_time.flux-12         2647267       2645283       -0.07%
Benchmark_QueryEndToEnd/show_all_tag_keys.flux-12              11443706      11420728      -0.20%
Benchmark_QueryEndToEnd/simple_max.flux-12                     4372717       4369854       -0.07%
Benchmark_QueryEndToEnd/skew.flux-12                           2191258       2186413       -0.22%
Benchmark_QueryEndToEnd/sort.flux-12                           2392497       2393919       +0.06%
Benchmark_QueryEndToEnd/spread.flux-12                         2193446       2191530       -0.09%
Benchmark_QueryEndToEnd/state_count.flux-12                    3318245       3326541       +0.25%
Benchmark_QueryEndToEnd/state_duration.flux-12                 3342248       3334122       -0.24%
Benchmark_QueryEndToEnd/stddev.flux-12                         2185999       2184240       -0.08%
Benchmark_QueryEndToEnd/string_sort.flux-12                    2025169       2018648       -0.32%
Benchmark_QueryEndToEnd/sum.flux-12                            2189119       2189896       +0.04%
Benchmark_QueryEndToEnd/task_per_line.flux-12                  13748744      13755720      +0.05%
Benchmark_QueryEndToEnd/top.flux-12                            2063752       2069868       +0.30%
Benchmark_QueryEndToEnd/union.flux-12                          11370137      11374442      +0.04%
Benchmark_QueryEndToEnd/union_heterogeneous.flux-12            15442745      15472838      +0.19%
Benchmark_QueryEndToEnd/window.flux-12                         7305888       7278736       -0.37%
Benchmark_QueryEndToEnd/window_default_start_align.flux-12     2345458       2344352       -0.05%
Benchmark_QueryEndToEnd/window_generate_empty.flux-12          2815364       2809690       -0.20%
Benchmark_QueryEndToEnd/window_group_mean_ungroup.flux-12      3513293       3507719       -0.16%
Benchmark_QueryEndToEnd/window_offset.flux-12                  7511753       7500692       -0.15%
Benchmark_QueryEndToEnd/window_start_bound.flux-12             2354661       2350657       -0.17%

@jsternberg
Copy link
Contributor Author

The speedup is now there and the PR is approved so I'm going to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants