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

date_microseconds FUTURE flag #6260

Merged
merged 14 commits into from
Dec 17, 2024

Conversation

trexfeathers
Copy link
Contributor

🚀 Pull Request

Description

#6256 proves that this protects our tests, and our users, against the new precision introduced in cf-units version 3.3. Unfortunately that PR is blocked by other dependency issues that will be addressed elsewhere, so I want to introduce these code changes onto main independently, which I have agreed with @stephenworsley.

I will run the benchmarks to check whether my change was also responsible for the performance shifts in #6256.


Consult Iris pull request check list


Add any of the below labels to trigger actions on this PR:

  • benchmark_this Request that this pull request be benchmarked to check if it introduces performance shifts

@trexfeathers trexfeathers added the benchmark_this Request that this pull request be benchmarked to check if it introduces performance shifts label Dec 17, 2024
Copy link
Contributor

⏱️ Performance Benchmark Report: 62e8baf

Performance shifts

Full benchmark results

Benchmarks that have stayed the same:

| Change   | Before [0fdedb46]    | After [62e8baf7]    | Ratio   | Benchmark (Parameter)                                                                       |
|----------|----------------------|---------------------|---------|---------------------------------------------------------------------------------------------|
|          | 59.8±0.8ms           | 60.0±1ms            | 1.00    | aggregate_collapse.Aggregation.time_aggregated_by_COUNT(False)                              |
|          | 60.5±0.6ms           | 60.7±1ms            | 1.00    | aggregate_collapse.Aggregation.time_aggregated_by_COUNT(True)                               |
|          | 213±6ms              | 215±3ms             | 1.01    | aggregate_collapse.Aggregation.time_aggregated_by_FAST_PERCENTILE(False)                    |
|          | 216±4ms              | 215±3ms             | 1.00    | aggregate_collapse.Aggregation.time_aggregated_by_FAST_PERCENTILE(True)                     |
|          | 39.1±0.5ms           | 39.1±0.4ms          | 1.00    | aggregate_collapse.Aggregation.time_aggregated_by_GMEAN(False)                              |
|          | 40.2±0.2ms           | 40.2±0.5ms          | 1.00    | aggregate_collapse.Aggregation.time_aggregated_by_GMEAN(True)                               |
|          | 39.7±0.4ms           | 39.5±0.4ms          | 1.00    | aggregate_collapse.Aggregation.time_aggregated_by_HMEAN(False)                              |
|          | 39.6±0.6ms           | 39.7±0.4ms          | 1.00    | aggregate_collapse.Aggregation.time_aggregated_by_HMEAN(True)                               |
|          | 52.2±1ms             | 52.1±0.7ms          | 1.00    | aggregate_collapse.Aggregation.time_aggregated_by_MAX(False)                                |
|          | 52.5±0.7ms           | 52.9±0.8ms          | 1.01    | aggregate_collapse.Aggregation.time_aggregated_by_MAX(True)                                 |
|          | 137±0.9ms            | 137±2ms             | 1.00    | aggregate_collapse.Aggregation.time_aggregated_by_MAX_RUN(False)                            |
|          | 139±1ms              | 137±0.8ms           | 0.99    | aggregate_collapse.Aggregation.time_aggregated_by_MAX_RUN(True)                             |
|          | 56.5±0.9ms           | 57.6±0.9ms          | 1.02    | aggregate_collapse.Aggregation.time_aggregated_by_MEAN(False)                               |
|          | 57.9±0.8ms           | 57.8±0.6ms          | 1.00    | aggregate_collapse.Aggregation.time_aggregated_by_MEAN(True)                                |
|          | 38.8±0.4ms           | 39.3±0.5ms          | 1.01    | aggregate_collapse.Aggregation.time_aggregated_by_MEDIAN(False)                             |
|          | 40.1±0.3ms           | 39.5±0.6ms          | 0.99    | aggregate_collapse.Aggregation.time_aggregated_by_MEDIAN(True)                              |
|          | 52.0±0.9ms           | 51.5±1ms            | 0.99    | aggregate_collapse.Aggregation.time_aggregated_by_MIN(False)                                |
|          | 52.9±0.9ms           | 52.5±0.8ms          | 0.99    | aggregate_collapse.Aggregation.time_aggregated_by_MIN(True)                                 |
|          | 1.09±0.01s           | 1.09±0.01s          | 1.00    | aggregate_collapse.Aggregation.time_aggregated_by_PEAK(False)                               |
|          | 1.09±0.01s           | 1.09±0s             | 0.99    | aggregate_collapse.Aggregation.time_aggregated_by_PEAK(True)                                |
|          | 501±20ms             | 499±20ms            | 1.00    | aggregate_collapse.Aggregation.time_aggregated_by_PERCENTILE(False)                         |
|          | 511±20ms             | 500±10ms            | 0.98    | aggregate_collapse.Aggregation.time_aggregated_by_PERCENTILE(True)                          |
|          | 37.6±0.4ms           | 37.1±0.5ms          | 0.99    | aggregate_collapse.Aggregation.time_aggregated_by_PROPORTION(False)                         |
|          | 38.3±0.7ms           | 38.5±0.3ms          | 1.00    | aggregate_collapse.Aggregation.time_aggregated_by_PROPORTION(True)                          |
|          | 69.9±0.9ms           | 69.1±0.7ms          | 0.99    | aggregate_collapse.Aggregation.time_aggregated_by_RMS(False)                                |
|          | 70.7±1ms             | 69.6±0.9ms          | 0.98    | aggregate_collapse.Aggregation.time_aggregated_by_RMS(True)                                 |
|          | 72.3±1ms             | 70.9±1ms            | 0.98    | aggregate_collapse.Aggregation.time_aggregated_by_STD_DEV(False)                            |
|          | 72.5±1ms             | 71.2±1ms            | 0.98    | aggregate_collapse.Aggregation.time_aggregated_by_STD_DEV(True)                             |
|          | 67.1±0.9ms           | 66.1±0.6ms          | 0.99    | aggregate_collapse.Aggregation.time_aggregated_by_VARIANCE(False)                           |
|          | 67.7±1ms             | 67.2±0.6ms          | 0.99    | aggregate_collapse.Aggregation.time_aggregated_by_VARIANCE(True)                            |
|          | 26.0±0.2ms           | 26.3±0.4ms          | 1.01    | aggregate_collapse.Aggregation.time_collapsed_by_COUNT(False)                               |
|          | 30.2±0.3ms           | 30.1±0.3ms          | 1.00    | aggregate_collapse.Aggregation.time_collapsed_by_COUNT(True)                                |
|          | 151±2ms              | 152±2ms             | 1.00    | aggregate_collapse.Aggregation.time_collapsed_by_FAST_PERCENTILE(False)                     |
|          | 167±2ms              | 165±2ms             | 0.98    | aggregate_collapse.Aggregation.time_collapsed_by_FAST_PERCENTILE(True)                      |
|          | 24.1±0.4ms           | 24.0±0.4ms          | 1.00    | aggregate_collapse.Aggregation.time_collapsed_by_GMEAN(False)                               |
|          | 28.4±0.2ms           | 28.1±0.4ms          | 0.99    | aggregate_collapse.Aggregation.time_collapsed_by_GMEAN(True)                                |
|          | 23.8±0.3ms           | 24.1±0.4ms          | 1.02    | aggregate_collapse.Aggregation.time_collapsed_by_HMEAN(False)                               |
|          | 28.3±0.2ms           | 28.3±0.3ms          | 1.00    | aggregate_collapse.Aggregation.time_collapsed_by_HMEAN(True)                                |
|          | 24.6±0.3ms           | 24.7±0.3ms          | 1.01    | aggregate_collapse.Aggregation.time_collapsed_by_MAX(False)                                 |
|          | 29.1±0.3ms           | 28.8±0.3ms          | 0.99    | aggregate_collapse.Aggregation.time_collapsed_by_MAX(True)                                  |
|          | 38.7±0.7ms           | 38.3±0.7ms          | 0.99    | aggregate_collapse.Aggregation.time_collapsed_by_MAX_RUN(False)                             |
|          | 43.2±0.6ms           | 42.9±0.8ms          | 0.99    | aggregate_collapse.Aggregation.time_collapsed_by_MAX_RUN(True)                              |
|          | 25.5±0.3ms           | 25.4±0.3ms          | 1.00    | aggregate_collapse.Aggregation.time_collapsed_by_MEAN(False)                                |
|          | 29.9±0.5ms           | 29.3±0.8ms          | 0.98    | aggregate_collapse.Aggregation.time_collapsed_by_MEAN(True)                                 |
|          | 25.2±0.5ms           | 25.4±0.5ms          | 1.01    | aggregate_collapse.Aggregation.time_collapsed_by_MEDIAN(False)                              |
|          | 29.3±0.4ms           | 29.4±0.6ms          | 1.00    | aggregate_collapse.Aggregation.time_collapsed_by_MEDIAN(True)                               |
|          | 24.7±0.4ms           | 24.7±0.2ms          | 1.00    | aggregate_collapse.Aggregation.time_collapsed_by_MIN(False)                                 |
|          | 28.9±0.3ms           | 28.9±0.5ms          | 1.00    | aggregate_collapse.Aggregation.time_collapsed_by_MIN(True)                                  |
|          | 542±0.6ms            | 546±5ms             | 1.01    | aggregate_collapse.Aggregation.time_collapsed_by_PEAK(False)                                |
|          | 550±5ms              | 546±6ms             | 0.99    | aggregate_collapse.Aggregation.time_collapsed_by_PEAK(True)                                 |
|          | 165±1ms              | 166±2ms             | 1.00    | aggregate_collapse.Aggregation.time_collapsed_by_PERCENTILE(False)                          |
|          | 184±1ms              | 183±2ms             | 1.00    | aggregate_collapse.Aggregation.time_collapsed_by_PERCENTILE(True)                           |
|          | 24.1±0.3ms           | 23.7±0.2ms          | 0.98    | aggregate_collapse.Aggregation.time_collapsed_by_PROPORTION(False)                          |
|          | 28.7±0.2ms           | 27.6±0.5ms          | 0.96    | aggregate_collapse.Aggregation.time_collapsed_by_PROPORTION(True)                           |
|          | 27.5±0.4ms           | 27.3±0.3ms          | 0.99    | aggregate_collapse.Aggregation.time_collapsed_by_RMS(False)                                 |
|          | 31.7±0.3ms           | 31.4±0.4ms          | 0.99    | aggregate_collapse.Aggregation.time_collapsed_by_RMS(True)                                  |
|          | 27.3±0.4ms           | 26.9±0.4ms          | 0.99    | aggregate_collapse.Aggregation.time_collapsed_by_STD_DEV(False)                             |
|          | 31.2±0.5ms           | 30.8±0.4ms          | 0.99    | aggregate_collapse.Aggregation.time_collapsed_by_STD_DEV(True)                              |
|          | 26.4±0.6ms           | 26.1±0.3ms          | 0.99    | aggregate_collapse.Aggregation.time_collapsed_by_VARIANCE(False)                            |
|          | 30.3±0.6ms           | 30.6±0.4ms          | 1.01    | aggregate_collapse.Aggregation.time_collapsed_by_VARIANCE(True)                             |
|          | 93.6±0.6ms           | 93.7±1ms            | 1.00    | aggregate_collapse.WeightedAggregation.time_w_aggregated_by_MEAN(False)                     |
|          | 95.6±0.9ms           | 94.8±1ms            | 0.99    | aggregate_collapse.WeightedAggregation.time_w_aggregated_by_MEAN(True)                      |
|          | 107±1ms              | 107±0.5ms           | 1.00    | aggregate_collapse.WeightedAggregation.time_w_aggregated_by_RMS(False)                      |
|          | 109±1ms              | 108±0.9ms           | 0.99    | aggregate_collapse.WeightedAggregation.time_w_aggregated_by_RMS(True)                       |
|          | 64.9±0.9ms           | 64.5±0.7ms          | 0.99    | aggregate_collapse.WeightedAggregation.time_w_aggregated_by_SUM(False)                      |
|          | 64.5±1ms             | 65.6±0.7ms          | 1.02    | aggregate_collapse.WeightedAggregation.time_w_aggregated_by_SUM(True)                       |
|          | 31.5±0.7ms           | 31.4±0.7ms          | 1.00    | aggregate_collapse.WeightedAggregation.time_w_collapsed_by_MEAN(False)                      |
|          | 35.0±0.9ms           | 35.7±1ms            | 1.02    | aggregate_collapse.WeightedAggregation.time_w_collapsed_by_MEAN(True)                       |
|          | 33.2±0.5ms           | 33.8±0.5ms          | 1.02    | aggregate_collapse.WeightedAggregation.time_w_collapsed_by_RMS(False)                       |
|          | 37.8±0.8ms           | 37.3±0.7ms          | 0.99    | aggregate_collapse.WeightedAggregation.time_w_collapsed_by_RMS(True)                        |
|          | 26.9±0.3ms           | 27.2±0.5ms          | 1.01    | aggregate_collapse.WeightedAggregation.time_w_collapsed_by_SUM(False)                       |
|          | 31.3±0.6ms           | 31.3±0.5ms          | 1.00    | aggregate_collapse.WeightedAggregation.time_w_collapsed_by_SUM(True)                        |
|          | 337±3ms              | 335±2ms             | 0.99    | aggregate_collapse.WeightedAggregation.time_w_collapsed_by_WPERCENTILE(False)               |
|          | 352±2ms              | 356±3ms             | 1.01    | aggregate_collapse.WeightedAggregation.time_w_collapsed_by_WPERCENTILE(True)                |
|          | 1.10±0.02ms          | 1.11±0.01ms         | 1.01    | cube.CubeCreation.time_create(False, 'construct')                                           |
|          | 393±3μs              | 398±2μs             | 1.01    | cube.CubeCreation.time_create(False, 'instantiate')                                         |
|          | 942±10μs             | 942±8μs             | 1.00    | cube.CubeCreation.time_create(True, 'construct')                                            |
|          | 567±9μs              | 581±8μs             | 1.02    | cube.CubeCreation.time_create(True, 'instantiate')                                          |
|          | 237±3ms              | 239±4ms             | 1.01    | cube.CubeEquality.time_equality(False, False, 'all_equal')                                  |
|          | 129±1ms              | 129±1ms             | 1.01    | cube.CubeEquality.time_equality(False, False, 'coord_inequality')                           |
|          | 265±2ms              | 265±2ms             | 1.00    | cube.CubeEquality.time_equality(False, False, 'data_inequality')                            |
|          | 17.0±0.4μs           | 16.7±0.2μs          | 0.98    | cube.CubeEquality.time_equality(False, False, 'metadata_inequality')                        |
|          | 344±3ms              | 341±6ms             | 0.99    | cube.CubeEquality.time_equality(False, True, 'all_equal')                                   |
|          | 231±2ms              | 231±2ms             | 1.00    | cube.CubeEquality.time_equality(False, True, 'coord_inequality')                            |
|          | 370±4ms              | 372±3ms             | 1.00    | cube.CubeEquality.time_equality(False, True, 'data_inequality')                             |
|          | 17.1±0.3μs           | 16.9±0.2μs          | 0.99    | cube.CubeEquality.time_equality(False, True, 'metadata_inequality')                         |
|          | 239±4ms              | 239±3ms             | 1.00    | cube.CubeEquality.time_equality(True, False, 'all_equal')                                   |
|          | 129±2ms              | 128±3ms             | 1.00    | cube.CubeEquality.time_equality(True, False, 'coord_inequality')                            |
|          | 267±4ms              | 268±2ms             | 1.00    | cube.CubeEquality.time_equality(True, False, 'data_inequality')                             |
|          | 52.8±0.6μs           | 52.0±0.4μs          | 0.98    | cube.CubeEquality.time_equality(True, False, 'metadata_inequality')                         |
|          | 343±3ms              | 343±2ms             | 1.00    | cube.CubeEquality.time_equality(True, True, 'all_equal')                                    |
|          | 230±2ms              | 231±2ms             | 1.00    | cube.CubeEquality.time_equality(True, True, 'coord_inequality')                             |
|          | 369±3ms              | 368±5ms             | 1.00    | cube.CubeEquality.time_equality(True, True, 'data_inequality')                              |
|          | 54.2±0.4μs           | 54.8±0.5μs          | 1.01    | cube.CubeEquality.time_equality(True, True, 'metadata_inequality')                          |
|          | 788±20μs             | 802±5μs             | 1.02    | import_iris.Iris.time__concatenate                                                          |
|          | 185±3μs              | 180±1μs             | 0.97    | import_iris.Iris.time__constraints                                                          |
|          | 110±1μs              | 109±1μs             | 0.99    | import_iris.Iris.time__data_manager                                                         |
|          | 94.4±2μs             | 93.3±0.3μs          | 0.99    | import_iris.Iris.time__deprecation                                                          |
|          | 139±2μs              | 138±0.6μs           | 1.00    | import_iris.Iris.time__lazy_data                                                            |
|          | 922±10μs             | 914±20μs            | 0.99    | import_iris.Iris.time__merge                                                                |
|          | 77.8±3μs             | 76.5±1μs            | 0.98    | import_iris.Iris.time__representation                                                       |
|          | 589±6μs              | 589±2μs             | 1.00    | import_iris.Iris.time_analysis                                                              |
|          | 140±3μs              | 139±1μs             | 1.00    | import_iris.Iris.time_analysis__area_weighted                                               |
|          | 111±1μs              | 110±3μs             | 0.99    | import_iris.Iris.time_analysis__grid_angles                                                 |
|          | 242±2μs              | 242±2μs             | 1.00    | import_iris.Iris.time_analysis__interpolation                                               |
|          | 193±4μs              | 189±1μs             | 0.98    | import_iris.Iris.time_analysis__regrid                                                      |
|          | 111±0.9μs            | 111±0.7μs           | 1.00    | import_iris.Iris.time_analysis__scipy_interpolate                                           |
|          | 137±6μs              | 138±4μs             | 1.01    | import_iris.Iris.time_analysis_calculus                                                     |
|          | 335±4μs              | 333±5μs             | 0.99    | import_iris.Iris.time_analysis_cartography                                                  |
|          | 94.1±0.7μs           | 96.4±2μs            | 1.02    | import_iris.Iris.time_analysis_geomerty                                                     |
|          | 217±3μs              | 217±1μs             | 1.00    | import_iris.Iris.time_analysis_maths                                                        |
|          | 97.0±0.4μs           | 96.2±0.6μs          | 0.99    | import_iris.Iris.time_analysis_stats                                                        |
|          | 176±2μs              | 174±2μs             | 0.98    | import_iris.Iris.time_analysis_trajectory                                                   |
|          | 314±4μs              | 303±3μs             | 0.97    | import_iris.Iris.time_aux_factory                                                           |
|          | 83.9±0.5μs           | 84.4±1μs            | 1.01    | import_iris.Iris.time_common                                                                |
|          | 162±4μs              | 160±1μs             | 0.99    | import_iris.Iris.time_common_lenient                                                        |
|          | 1.34±0.02ms          | 1.36±0.01ms         | 1.01    | import_iris.Iris.time_common_metadata                                                       |
|          | 137±5μs              | 139±1μs             | 1.01    | import_iris.Iris.time_common_mixin                                                          |
|          | 1.18±0.01ms          | 1.20±0.01ms         | 1.01    | import_iris.Iris.time_common_resolve                                                        |
|          | 198±2μs              | 199±4μs             | 1.00    | import_iris.Iris.time_config                                                                |
|          | 123±2μs              | 124±0.5μs           | 1.01    | import_iris.Iris.time_coord_categorisation                                                  |
|          | 363±2μs              | 366±9μs             | 1.01    | import_iris.Iris.time_coord_systems                                                         |
|          | 749±6μs              | 748±8μs             | 1.00    | import_iris.Iris.time_coords                                                                |
|          | 655±5μs              | 656±6μs             | 1.00    | import_iris.Iris.time_cube                                                                  |
|          | 225±1μs              | 223±1μs             | 0.99    | import_iris.Iris.time_exceptions                                                            |
|          | 76.5±2μs             | 77.1±1μs            | 1.01    | import_iris.Iris.time_experimental                                                          |
|          | 184±0.8μs            | 185±1μs             | 1.01    | import_iris.Iris.time_fileformats                                                           |
|          | 250±2μs              | 252±2μs             | 1.01    | import_iris.Iris.time_fileformats__ff                                                       |
|          | 2.76±0.02ms          | 2.73±0.01ms         | 0.99    | import_iris.Iris.time_fileformats__ff_cross_references                                      |
|          | 78.2±0.3μs           | 78.6±0.5μs          | 1.00    | import_iris.Iris.time_fileformats__pp_lbproc_pairs                                          |
|          | 112±1μs              | 115±0.9μs           | 1.02    | import_iris.Iris.time_fileformats_abf                                                       |
|          | 408±4μs              | 407±1μs             | 1.00    | import_iris.Iris.time_fileformats_cf                                                        |
|          | 5.36±0.05ms          | 5.33±0.04ms         | 0.99    | import_iris.Iris.time_fileformats_dot                                                       |
|          | 74.8±1μs             | 74.6±0.6μs          | 1.00    | import_iris.Iris.time_fileformats_name                                                      |
|          | 257±2μs              | 256±4μs             | 1.00    | import_iris.Iris.time_fileformats_name_loaders                                              |
|          | 118±1μs              | 118±1μs             | 1.00    | import_iris.Iris.time_fileformats_netcdf                                                    |
|          | 122±2μs              | 125±2μs             | 1.02    | import_iris.Iris.time_fileformats_nimrod                                                    |
|          | 213±2μs              | 212±6μs             | 1.00    | import_iris.Iris.time_fileformats_nimrod_load_rules                                         |
|          | 785±6μs              | 783±3μs             | 1.00    | import_iris.Iris.time_fileformats_pp                                                        |
|          | 184±6μs              | 184±2μs             | 1.00    | import_iris.Iris.time_fileformats_pp_load_rules                                             |
|          | 133±3μs              | 136±2μs             | 1.02    | import_iris.Iris.time_fileformats_pp_save_rules                                             |
|          | 541±3μs              | 551±6μs             | 1.02    | import_iris.Iris.time_fileformats_rules                                                     |
|          | 217±1μs              | 218±3μs             | 1.00    | import_iris.Iris.time_fileformats_structured_array_identification                           |
|          | 83.1±1μs             | 84.1±1μs            | 1.01    | import_iris.Iris.time_fileformats_um                                                        |
|          | 160±0.9μs            | 164±2μs             | 1.02    | import_iris.Iris.time_fileformats_um__fast_load                                             |
|          | 136±0.6μs            | 137±0.8μs           | 1.01    | import_iris.Iris.time_fileformats_um__fast_load_structured_fields                           |
|          | 75.8±0.7μs           | 76.9±1μs            | 1.02    | import_iris.Iris.time_fileformats_um__ff_replacement                                        |
|          | 82.4±1μs             | 80.9±1μs            | 0.98    | import_iris.Iris.time_fileformats_um__optimal_array_structuring                             |
|          | 989±5μs              | 1.00±0.01ms         | 1.01    | import_iris.Iris.time_fileformats_um_cf_map                                                 |
|          | 135±1μs              | 136±0.8μs           | 1.01    | import_iris.Iris.time_io                                                                    |
|          | 173±1μs              | 172±0.8μs           | 1.00    | import_iris.Iris.time_io_format_picker                                                      |
|          | 287±4μs              | 286±2μs             | 1.00    | import_iris.Iris.time_iris                                                                  |
|          | 126±2μs              | 127±0.9μs           | 1.01    | import_iris.Iris.time_iterate                                                               |
|          | 8.26±0.07ms          | 8.18±0.06ms         | 0.99    | import_iris.Iris.time_palette                                                               |
|          | 1.90±0.03ms          | 1.91±0.01ms         | 1.00    | import_iris.Iris.time_plot                                                                  |
|          | 105±0.9μs            | 105±1μs             | 1.00    | import_iris.Iris.time_quickplot                                                             |
|          | 2.18±0.05ms          | 2.22±0.03ms         | 1.02    | import_iris.Iris.time_std_names                                                             |
|          | 1.77±0.01ms          | 1.77±0.01ms         | 1.00    | import_iris.Iris.time_symbols                                                               |
|          | 100.0±0.4ms          | 102±2ms             | 1.02    | import_iris.Iris.time_tests                                                                 |
|          | 254±4μs              | 254±0.4μs           | 1.00    | import_iris.Iris.time_third_party_cartopy                                                   |
|          | 4.71±0.02ms          | 4.73±0.01ms         | 1.00    | import_iris.Iris.time_third_party_cf_units                                                  |
|          | 119±1μs              | 119±0.9μs           | 0.99    | import_iris.Iris.time_third_party_cftime                                                    |
|          | 2.81±0.01ms          | 2.82±0.01ms         | 1.01    | import_iris.Iris.time_third_party_matplotlib                                                |
|          | 1.55±0.02ms          | 1.54±0ms            | 1.00    | import_iris.Iris.time_third_party_numpy                                                     |
|          | 169±0.7μs            | 174±2μs             | 1.03    | import_iris.Iris.time_third_party_scipy                                                     |
|          | 99.4±0.6μs           | 99.3±0.7μs          | 1.00    | import_iris.Iris.time_time                                                                  |
|          | 328±2μs              | 330±4μs             | 1.00    | import_iris.Iris.time_util                                                                  |
|          | 71.6±0.8μs           | 71.4±1μs            | 1.00    | iterate.IZip.time_izip                                                                      |
|          | 9.91±0.1ms           | 9.81±0.2ms          | 0.99    | load.LoadAndRealise.time_load((1280, 960, 5), False, 'FF')                                  |
|          | 27.0±0.4ms           | 26.6±0.6ms          | 0.99    | load.LoadAndRealise.time_load((1280, 960, 5), False, 'NetCDF')                              |
|          | 9.95±0.03ms          | 9.94±0.08ms         | 1.00    | load.LoadAndRealise.time_load((1280, 960, 5), False, 'PP')                                  |
|          | 9.83±0.1ms           | 9.74±0.08ms         | 0.99    | load.LoadAndRealise.time_load((1280, 960, 5), True, 'FF')                                   |
|          | 22.3±0.2ms           | 22.4±0.2ms          | 1.00    | load.LoadAndRealise.time_load((1280, 960, 5), True, 'NetCDF')                               |
|          | 9.93±0.1ms           | 9.89±0.08ms         | 1.00    | load.LoadAndRealise.time_load((1280, 960, 5), True, 'PP')                                   |
|          | 1.56±0s              | 1.54±0.02s          | 0.99    | load.LoadAndRealise.time_load((2, 2, 1000), False, 'FF')                                    |
|          | 22.1±0.1ms           | 22.4±0.4ms          | 1.02    | load.LoadAndRealise.time_load((2, 2, 1000), False, 'NetCDF')                                |
|          | 1.59±0.01s           | 1.56±0.01s          | 0.98    | load.LoadAndRealise.time_load((2, 2, 1000), False, 'PP')                                    |
|          | 1.54±0.01s           | 1.54±0.01s          | 1.00    | load.LoadAndRealise.time_load((2, 2, 1000), True, 'FF')                                     |
|          | 22.1±0.1ms           | 22.6±0.3ms          | 1.02    | load.LoadAndRealise.time_load((2, 2, 1000), True, 'NetCDF')                                 |
|          | 1.56±0.01s           | 1.55±0.01s          | 1.00    | load.LoadAndRealise.time_load((2, 2, 1000), True, 'PP')                                     |
|          | 5.11±0.07ms          | 5.04±0.02ms         | 0.99    | load.LoadAndRealise.time_load((50, 50, 2), False, 'FF')                                     |
|          | 20.8±0.6ms           | 20.8±0.1ms          | 1.00    | load.LoadAndRealise.time_load((50, 50, 2), False, 'NetCDF')                                 |
|          | 5.08±0.04ms          | 5.01±0.03ms         | 0.99    | load.LoadAndRealise.time_load((50, 50, 2), False, 'PP')                                     |
|          | 5.04±0.04ms          | 5.05±0.03ms         | 1.00    | load.LoadAndRealise.time_load((50, 50, 2), True, 'FF')                                      |
|          | 20.8±0.1ms           | 20.9±0.2ms          | 1.01    | load.LoadAndRealise.time_load((50, 50, 2), True, 'NetCDF')                                  |
|          | 5.05±0.03ms          | 5.00±0.05ms         | 0.99    | load.LoadAndRealise.time_load((50, 50, 2), True, 'PP')                                      |
|          | 25.6±3ms             | 31.0±3ms            | ~1.21   | load.LoadAndRealise.time_realise((1280, 960, 5), False, 'FF')                               |
|          | 20.2±0.3ms           | 20.9±0.3ms          | 1.04    | load.LoadAndRealise.time_realise((1280, 960, 5), False, 'NetCDF')                           |
|          | 13.7±1ms             | 14.3±1ms            | 1.04    | load.LoadAndRealise.time_realise((1280, 960, 5), False, 'PP')                               |
|          | 26.4±0.8ms           | 26.6±0.6ms          | 1.01    | load.LoadAndRealise.time_realise((1280, 960, 5), True, 'FF')                                |
|          | 79.9±0.5ms           | 80.3±0.4ms          | 1.00    | load.LoadAndRealise.time_realise((1280, 960, 5), True, 'NetCDF')                            |
|          | 25.9±2ms             | 25.9±0.8ms          | 1.00    | load.LoadAndRealise.time_realise((1280, 960, 5), True, 'PP')                                |
|          | 483±2ms              | 487±4ms             | 1.01    | load.LoadAndRealise.time_realise((2, 2, 1000), False, 'FF')                                 |
|          | 2.83±0.05ms          | 2.94±0.1ms          | 1.04    | load.LoadAndRealise.time_realise((2, 2, 1000), False, 'NetCDF')                             |
|          | 481±3ms              | 487±4ms             | 1.01    | load.LoadAndRealise.time_realise((2, 2, 1000), False, 'PP')                                 |
|          | 492±4ms              | 501±4ms             | 1.02    | load.LoadAndRealise.time_realise((2, 2, 1000), True, 'FF')                                  |
|          | 2.97±0.09ms          | 2.94±0.08ms         | 0.99    | load.LoadAndRealise.time_realise((2, 2, 1000), True, 'NetCDF')                              |
|          | 496±6ms              | 493±3ms             | 0.99    | load.LoadAndRealise.time_realise((2, 2, 1000), True, 'PP')                                  |
|          | 1.70±0.05ms          | 1.69±0.08ms         | 0.99    | load.LoadAndRealise.time_realise((50, 50, 2), False, 'FF')                                  |
|          | 2.83±0.07ms          | 2.96±0.1ms          | 1.05    | load.LoadAndRealise.time_realise((50, 50, 2), False, 'NetCDF')                              |
|          | 1.71±0.04ms          | 1.71±0.06ms         | 1.00    | load.LoadAndRealise.time_realise((50, 50, 2), False, 'PP')                                  |
|          | 1.73±0.06ms          | 1.81±0.1ms          | 1.05    | load.LoadAndRealise.time_realise((50, 50, 2), True, 'FF')                                   |
|          | 2.93±0.09ms          | 2.93±0.07ms         | 1.00    | load.LoadAndRealise.time_realise((50, 50, 2), True, 'NetCDF')                               |
|          | 1.71±0.1ms           | 1.70±0.05ms         | 0.99    | load.LoadAndRealise.time_realise((50, 50, 2), True, 'PP')                                   |
|          | 361±3ms              | 361±3ms             | 1.00    | load.ManyVars.time_many_var_load                                                            |
|          | 9.89±0.2ms           | 9.83±0.06ms         | 0.99    | load.STASHConstraint.time_stash_constraint((1280, 960, 5), 'FF')                            |
|          | 9.99±0.2ms           | 9.92±0.1ms          | 0.99    | load.STASHConstraint.time_stash_constraint((1280, 960, 5), 'PP')                            |
|          | 1.56±0.01s           | 1.55±0.02s          | 0.99    | load.STASHConstraint.time_stash_constraint((2, 2, 1000), 'FF')                              |
|          | 1.58±0.01s           | 1.58±0.01s          | 1.00    | load.STASHConstraint.time_stash_constraint((2, 2, 1000), 'PP')                              |
|          | 5.13±0.08ms          | 5.07±0.04ms         | 0.99    | load.STASHConstraint.time_stash_constraint((2, 2, 2), 'FF')                                 |
|          | 5.14±0.06ms          | 5.06±0.03ms         | 0.98    | load.STASHConstraint.time_stash_constraint((2, 2, 2), 'PP')                                 |
|          | 9.12±0.1ms           | 9.08±0.08ms         | 0.99    | load.StructuredFF.time_structured_load((1280, 960, 5), False)                               |
|          | 5.87±0.1ms           | 5.86±0.03ms         | 1.00    | load.StructuredFF.time_structured_load((1280, 960, 5), True)                                |
|          | 1.53±0.01s           | 1.53±0.02s          | 1.00    | load.StructuredFF.time_structured_load((2, 2, 1000), False)                                 |
|          | 523±8ms              | 534±7ms             | 1.02    | load.StructuredFF.time_structured_load((2, 2, 1000), True)                                  |
|          | 4.24±0.06ms          | 4.39±0.1ms          | 1.03    | load.StructuredFF.time_structured_load((2, 2, 2), False)                                    |
|          | 4.09±0.05ms          | 4.09±0.02ms         | 1.00    | load.StructuredFF.time_structured_load((2, 2, 2), True)                                     |
|          | 163±2ms              | 167±0.8ms           | 1.03    | load.TimeConstraint.time_time_constraint(20, 'FF')                                          |
|          | 24.0±0.4ms           | 24.4±0.4ms          | 1.02    | load.TimeConstraint.time_time_constraint(20, 'NetCDF')                                      |
|          | 165±2ms              | 171±3ms             | 1.04    | load.TimeConstraint.time_time_constraint(20, 'PP')                                          |
|          | 32.6±0.2ms           | 33.0±0.2ms          | 1.01    | load.TimeConstraint.time_time_constraint(3, 'FF')                                           |
|          | 23.5±0.1ms           | 24.0±0.3ms          | 1.02    | load.TimeConstraint.time_time_constraint(3, 'NetCDF')                                       |
|          | 32.7±0.3ms           | 33.4±0.2ms          | 1.02    | load.TimeConstraint.time_time_constraint(3, 'PP')                                           |
|          | 18.8±0.1ms           | 19.2±0.2ms          | 1.02    | load.ugrid.BasicLoading.time_load_file(1)                                                   |
|          | 56.5±0.8ms           | 56.1±0.8ms          | 0.99    | load.ugrid.BasicLoading.time_load_file(200000)                                              |
|          | 14.6±0.4ms           | 14.8±0.2ms          | 1.02    | load.ugrid.BasicLoading.time_load_mesh(1)                                                   |
|          | 25.6±0.8ms           | 25.5±0.3ms          | 1.00    | load.ugrid.BasicLoading.time_load_mesh(200000)                                              |
|          | 19.1±0.3ms           | 19.1±0.2ms          | 1.00    | load.ugrid.BasicLoadingTime.time_load_file(1)                                               |
|          | 23.8±0.4ms           | 23.6±0.1ms          | 0.99    | load.ugrid.BasicLoadingTime.time_load_file(200000)                                          |
|          | 14.6±0.2ms           | 14.6±0.3ms          | 1.00    | load.ugrid.BasicLoadingTime.time_load_mesh(1)                                               |
|          | 19.1±0.2ms           | 19.3±0.2ms          | 1.01    | load.ugrid.BasicLoadingTime.time_load_mesh(200000)                                          |
|          | 20.4±0.2ms           | 20.0±0.1ms          | 0.98    | load.ugrid.Callback.time_load_file_callback(1)                                              |
|          | 65.8±2ms             | 67.3±0.7ms          | 1.02    | load.ugrid.Callback.time_load_file_callback(200000)                                         |
|          | 19.9±0.3ms           | 20.0±0.3ms          | 1.00    | load.ugrid.CallbackTime.time_load_file_callback(1)                                          |
|          | 25.3±0.3ms           | 25.5±0.3ms          | 1.01    | load.ugrid.CallbackTime.time_load_file_callback(200000)                                     |
|          | 2.77±0.09ms          | 2.84±0.07ms         | 1.02    | load.ugrid.DataRealisation.time_realise_data(10000)                                         |
|          | 4.81±0.3ms           | 4.96±0.5ms          | 1.03    | load.ugrid.DataRealisation.time_realise_data(200000)                                        |
|          | 35.0±0.7ms           | 37.8±0.7ms          | 1.08    | load.ugrid.DataRealisationTime.time_realise_data(10000)                                     |
|          | 797±10ms             | 808±7ms             | 1.01    | load.ugrid.DataRealisationTime.time_realise_data(200000)                                    |
|          | 430±4ms              | 425±7ms             | 0.99    | merge_concat.Concatenate.time_concatenate(False)                                            |
|          | 428±4ms              | 425±4ms             | 0.99    | merge_concat.Concatenate.time_concatenate(True)                                             |
|          | 110±0.5M             | 110±0.3M            | 1.00    | merge_concat.Concatenate.tracemalloc_concatenate(False)                                     |
|          | 110±0.5M             | 110±0.3M            | 1.00    | merge_concat.Concatenate.tracemalloc_concatenate(True)                                      |
|          | 57.8±1ms             | 58.4±0.4ms          | 1.01    | merge_concat.Merge.time_merge                                                               |
|          | 1.62±0.2M            | 1.62±0.2M           | 1.00    | merge_concat.Merge.tracemalloc_merge                                                        |
|          | 476±2ns              | 461±2ns             | 0.97    | mesh.utils.regions_combine.CombineRegionsComputeRealData.time_compute_data(50)              |
|          | 215±2ms              | 213±2ms             | 0.99    | mesh.utils.regions_combine.CombineRegionsComputeRealData.time_compute_data(500)             |
|          | 658±1k               | 658±1k              | 1.00    | mesh.utils.regions_combine.CombineRegionsComputeRealData.tracemalloc_compute_data(50)       |
|          | 60.1±0M              | 60.1±0M             | 1.00    | mesh.utils.regions_combine.CombineRegionsComputeRealData.tracemalloc_compute_data(500)      |
|          | 17.0±0.2ms           | 16.7±0.1ms          | 0.98    | mesh.utils.regions_combine.CombineRegionsCreateCube.time_create_combined_cube(50)           |
|          | 18.8±0.5ms           | 18.6±0.4ms          | 0.99    | mesh.utils.regions_combine.CombineRegionsCreateCube.time_create_combined_cube(500)          |
|          | 808±0.5k             | 808±0.7k            | 1.00    | mesh.utils.regions_combine.CombineRegionsCreateCube.tracemalloc_create_combined_cube(50)    |
|          | 12.7±0M              | 12.7±0M             | 1.00    | mesh.utils.regions_combine.CombineRegionsCreateCube.tracemalloc_create_combined_cube(500)   |
|          | 120±0.8ms            | 120±1ms             | 1.00    | mesh.utils.regions_combine.CombineRegionsFileStreamedCalc.time_stream_file2file(50)         |
|          | 687±8ms              | 675±6ms             | 0.98    | mesh.utils.regions_combine.CombineRegionsFileStreamedCalc.time_stream_file2file(500)        |
|          | 1.21±0.01M           | 1.19±0.03M          | 0.99    | mesh.utils.regions_combine.CombineRegionsFileStreamedCalc.tracemalloc_stream_file2file(50)  |
|          | 96.3±0.01M           | 96.3±0.03M          | 1.00    | mesh.utils.regions_combine.CombineRegionsFileStreamedCalc.tracemalloc_stream_file2file(500) |
|          | 78.1±0.7ms           | 78.5±0.7ms          | 1.00    | mesh.utils.regions_combine.CombineRegionsSaveData.time_save(50)                             |
|          | 630±5ms              | 630±6ms             | 1.00    | mesh.utils.regions_combine.CombineRegionsSaveData.time_save(500)                            |
|          | 1.18±0.02M           | 1.17±0.01M          | 0.99    | mesh.utils.regions_combine.CombineRegionsSaveData.tracemalloc_save(50)                      |
|          | 96.2±0.01M           | 96.2±0.01M          | 1.00    | mesh.utils.regions_combine.CombineRegionsSaveData.tracemalloc_save(500)                     |
|          | 2.1752849999999997   | 2.1752849999999997  | 1.00    | mesh.utils.regions_combine.CombineRegionsSaveData.track_filesize_saved(50)                  |
|          | 216.01528499999998   | 216.01528499999998  | 1.00    | mesh.utils.regions_combine.CombineRegionsSaveData.track_filesize_saved(500)                 |
|          | 6.44±0.04ms          | 6.43±0.03ms         | 1.00    | plot.AuxSort.time_aux_sort                                                                  |
|          | 78.2±4ms             | 80.8±7ms            | 1.03    | regridding.CurvilinearRegridding.time_regrid_pic                                            |
|          | 136±3M               | 136±3M              | 1.00    | regridding.CurvilinearRegridding.tracemalloc_regrid_pic                                     |
|          | 100±0.6ms            | 101±1ms             | 1.01    | regridding.HorizontalChunkedRegridding.time_regrid_area_w                                   |
|          | 49.6±3ms             | 50.1±0.6ms          | 1.01    | regridding.HorizontalChunkedRegridding.time_regrid_area_w_new_grid                          |
|          | 106±0.03M            | 106±0.04M           | 1.00    | regridding.HorizontalChunkedRegridding.tracemalloc_regrid_area_w                            |
|          | 147±0.02M            | 147±0.02M           | 1.00    | regridding.HorizontalChunkedRegridding.tracemalloc_regrid_area_w_new_grid                   |
|          | 4.43±0.03ms          | 4.49±0.05ms         | 1.02    | save.NetcdfSave.time_netcdf_save_cube(50, False)                                            |
|          | 80.6±0.9ms           | 82.0±0.3ms          | 1.02    | save.NetcdfSave.time_netcdf_save_cube(50, True)                                             |
|          | 51.9±0.7ms           | 52.5±1ms            | 1.01    | save.NetcdfSave.time_netcdf_save_cube(600, False)                                           |
|          | 583±8ms              | 587±3ms             | 1.01    | save.NetcdfSave.time_netcdf_save_cube(600, True)                                            |
|          | 89.8±0.9ns           | 89.8±1ns            | 1.00    | save.NetcdfSave.time_netcdf_save_mesh(50, False)                                            |
|          | 62.5±0.3ms           | 63.9±0.4ms          | 1.02    | save.NetcdfSave.time_netcdf_save_mesh(50, True)                                             |
|          | 88.0±1ns             | 87.4±2ns            | 0.99    | save.NetcdfSave.time_netcdf_save_mesh(600, False)                                           |
|          | 518±1ms              | 518±4ms             | 1.00    | save.NetcdfSave.time_netcdf_save_mesh(600, True)                                            |
|          | 28.9±0.2k            | 28.9±0.06k          | 1.00    | save.NetcdfSave.tracemalloc_netcdf_save(50, False)                                          |
|          | 1.68±0.1M            | 1.71±0.2M           | 1.02    | save.NetcdfSave.tracemalloc_netcdf_save(50, True)                                           |
|          | 28.9±0.2k            | 28.9±0.06k          | 1.00    | save.NetcdfSave.tracemalloc_netcdf_save(600, False)                                         |
|          | 225±9M               | 225±20M             | 1.00    | save.NetcdfSave.tracemalloc_netcdf_save(600, True)                                          |
|          | 41.9±0.4ms           | 41.9±0.4ms          | 1.00    | stats.PearsonR.time_lazy                                                                    |
|          | 8.99±0.2ms           | 9.23±0.1ms          | 1.03    | stats.PearsonR.time_real                                                                    |
|          | 24.4±0.3M            | 24.1±1M             | 0.99    | stats.PearsonR.tracemalloc_lazy                                                             |
|          | 18.4±0.01M           | 18.4±0.01M          | 1.00    | stats.PearsonR.tracemalloc_real                                                             |
|          | 23.4±1ms             | 24.4±1ms            | 1.04    | trajectory.TrajectoryInterpolation.time_trajectory_linear                                   |
|          | 60.8±0.5ms           | 61.2±0.7ms          | 1.01    | trajectory.TrajectoryInterpolation.time_trajectory_nearest                                  |
|          | 23.3±0.01M           | 23.3±0.01M          | 1.00    | trajectory.TrajectoryInterpolation.tracemalloc_trajectory_linear                            |
|          | 12.1±0.04M           | 12.1±0.04M          | 1.00    | trajectory.TrajectoryInterpolation.tracemalloc_trajectory_nearest                           |

Generated by GHA run 12369929227

Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 77.14286% with 8 lines in your changes missing coverage. Please review.

Project coverage is 89.81%. Comparing base (bd1ae15) to head (80298dd).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
lib/iris/common/mixin.py 78.12% 5 Missing and 2 partials ⚠️
lib/iris/__init__.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6260      +/-   ##
==========================================
- Coverage   89.83%   89.81%   -0.02%     
==========================================
  Files          88       88              
  Lines       23315    23347      +32     
  Branches     4338     4344       +6     
==========================================
+ Hits        20945    20970      +25     
- Misses       1644     1649       +5     
- Partials      726      728       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@trexfeathers
Copy link
Contributor Author

Linkcheck should be fixed by #6261

@trexfeathers
Copy link
Contributor Author

The lack of coverage is only because we're testing against cf-units version 3.2 in this PR.

Copy link
Contributor

@stephenworsley stephenworsley left a comment

Choose a reason for hiding this comment

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

Looks good in theory, though I think there's a way to achieve this without changing the behaviour of cf_units for code outside of iris by limiting this to a change in the Unit class which iris objects have as their units attribute.

Copy link
Contributor

@stephenworsley stephenworsley left a comment

Choose a reason for hiding this comment

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

Nice one. This looks a lot more robust now.

@stephenworsley stephenworsley merged commit df4c52b into SciTools:main Dec 17, 2024
21 checks passed
stephenworsley added a commit to stephenworsley/iris that referenced this pull request Dec 17, 2024
…ask_slicing_bug

* origin/pin_dask_slicing_bug:
  `date_microseconds` FUTURE flag (SciTools#6260)
  [pre-commit.ci] pre-commit autoupdate (SciTools#6259)
  Remove freepik.com link due to linkcheck breakage (SciTools#6261)
@trexfeathers
Copy link
Contributor Author

trexfeathers commented Dec 18, 2024

Thanks @stephenworsley!

ESadek-MO pushed a commit to ESadek-MO/iris that referenced this pull request Dec 19, 2024
* PoC monkeypatch precision.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add FUTURE flag.

* FutureWarning.

* Corrected behaviour and added tests.

* Corrected behaviour and added tests.

* What's New entry.

* Make sensitive to cf-units version.

* Further test improvements.

* Clearer FutureWarning text.

* Use a cf-units subclass instead.

* Rename _IrisUnit to Unit.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@pp-mo pp-mo mentioned this pull request Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmark_this Request that this pull request be benchmarked to check if it introduces performance shifts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants