Skip to content

Conversation

@norberttech
Copy link
Member

@norberttech norberttech commented Nov 1, 2023

Change Log

Added

Fixed

Changed

  • Adjusted time related columns to be compatibile with other parquet libraries

Removed

Deprecated

Security


Description

For now, I had to hardcode the time precision for all time-based columns to MICROSECONDS, which is the most precise way of calculating time in PHP.
Depends on demand we can later implement also MILLISECONDS precision but I'm not even sure if there will be any real use cases for it.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2023

Flow PHP - Benchmarks

Results of the benchmarks from this PR are compared with the results from 1.x branch.

Extractors
+-----------------------+-------------------+------+-----+------------------+-------------------+------------------+
| benchmark             | subject           | revs | its | mem_peak         | mode              | rstdev           |
+-----------------------+-------------------+------+-----+------------------+-------------------+------------------+
| AvroExtractorBench    | bench_extract_10k | 1    | 3   | 44.091mb +0.00%  | 518.794ms +0.62%  | ±2.89% +610.56%  |
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 13.976mb +0.00%  | 474.947ms +13.10% | ±1.82% +1415.77% |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 18.638mb +0.00%  | 872.355ms +3.26%  | ±3.16% +1340.31% |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 237.751mb +0.00% | 1.178s +1.14%     | ±0.54% -27.63%   |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 7.245mb +0.01%   | 25.273ms -0.31%   | ±2.76% +63.93%   |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 7.593mb +0.01%   | 757.512ms +1.74%  | ±0.71% -74.77%   |
+-----------------------+-------------------+------+-----+------------------+-------------------+------------------+
Transformers
+-----------------------------+--------------------------+------+-----+-----------------+-----------------+-----------------+
| benchmark                   | subject                  | revs | its | mem_peak        | mode            | rstdev          |
+-----------------------------+--------------------------+------+-----+-----------------+-----------------+-----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 87.032mb +0.00% | 82.621ms +2.05% | ±1.28% +191.21% |
+-----------------------------+--------------------------+------+-----+-----------------+-----------------+-----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev          |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| AvroLoaderBench    | bench_load_10k | 1    | 3   | 93.195mb +0.00%  | 853.287ms +0.74% | ±2.03% -22.85%  |
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 47.109mb +0.00%  | 81.847ms +0.96%  | ±0.83% +89.70%  |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 88.543mb +0.00%  | 90.096ms +0.99%  | ±1.81% +141.23% |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 281.651mb +0.00% | 1.923s +0.78%    | ±0.85% +50.93%  |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 16.530mb +0.00%  | 42.076ms -0.50%  | ±0.25% -84.25%  |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+-----------------+------------------+------------------+
| benchmark               | subject                    | revs | its | mem_peak        | mode             | rstdev           |
+-------------------------+----------------------------+------+-----+-----------------+------------------+------------------+
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 60.656mb +0.00% | 5.675ms -3.50%   | ±2.47% -13.31%   |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 80.448mb +0.00% | 212.649ms +0.28% | ±1.69% +3275.86% |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 58.974mb +0.00% | 21.698ms +0.92%  | ±1.94% +319.91%  |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 59.794mb +0.00% | 3.862ms +4.41%   | ±0.84% -66.81%   |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 59.794mb +0.00% | 4.034ms +9.30%   | ±2.13% -24.96%   |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 59.008mb +0.00% | 5.169ms +1.45%   | ±2.30% -21.58%   |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 59.537mb +0.00% | 27.958ms +0.95%  | ±0.59% +979.95%  |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 59.536mb +0.00% | 27.856ms -4.11%  | ±0.18% -91.08%   |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 57.608mb +0.00% | 2.800μs +3.70%   | ±2.92% -3.57%    |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 57.608mb +0.00% | 0.500μs 0.00%    | ±0.00% 0.00%     |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 65.841mb +0.00% | 17.283ms +2.27%  | ±0.44% -77.20%   |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 91.361mb +0.00% | 73.763ms +1.70%  | ±3.45% +2070.16% |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 60.057mb +0.00% | 4.549ms +8.71%   | ±2.77% +93.98%   |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 62.327mb +0.00% | 57.381ms +0.88%  | ±0.21% -12.51%   |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 62.158mb +0.00% | 10.502ms +2.29%  | ±3.29% -8.13%    |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 57.608mb +0.00% | 61.990ms +0.16%  | ±0.27% -3.50%    |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 57.608mb +0.00% | 61.673ms -0.35%  | ±0.15% -45.71%   |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 57.608mb +0.00% | 62.265ms -0.63%  | ±0.62% -78.67%   |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 59.882mb +0.00% | 11.582ms +2.24%  | ±1.74% +1336.41% |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 57.607mb +0.00% | 46.236ms +0.85%  | ±0.34% -29.90%   |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 57.608mb +0.00% | 25.766μs -0.98%  | ±0.80% +21.36%   |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 57.608mb +0.00% | 32.179μs +0.44%  | ±0.39% -56.86%   |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 80.449mb +0.00% | 216.607ms +1.24% | ±3.27% +6566.41% |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 91.722mb +0.01% | 175.104ms +0.86% | ±0.34% +507.10%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 47.592mb +0.02% | 89.444ms +0.46%  | ±0.29% -22.44%   |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 12.389mb +0.00% | 21.508ms +1.75%  | ±0.27% -58.10%   |
+-------------------------+----------------------------+------+-----+-----------------+------------------+------------------+

@norberttech norberttech merged commit 43876c6 into flow-php:1.x Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant