Skip to content

Conversation

@norberttech
Copy link
Member

Change Log

Added

  • CSV RowsNormalizer to automate writing deeply nested data structures to CSV without manual casting

Fixed

Changed

Removed

Deprecated

Security


Description

Resolves: #1178

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2024

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          |
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 3.949mb +0.03%  | 516.378ms +1.34% | ±0.83% +377.59% |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.082mb +0.03%  | 1.076s +0.25%    | ±0.45% -24.02%  |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 28.544mb +0.00% | 438.750ms +1.26% | ±0.76% -2.42%   |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 3.709mb +0.03%  | 33.437ms -1.81%  | ±1.27% -41.27%  |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 3.698mb +0.03%  | 774.066ms -1.55% | ±1.28% +70.81%  |
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev         |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 116.050mb +0.00% | 64.099ms +1.19% | ±0.70% -27.01% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+-------------------+----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode              | rstdev         |
+--------------------+----------------+------+-----+------------------+-------------------+----------------+
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 54.171mb +0.07%  | 139.706ms +60.70% | ±0.22% -66.11% |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 102.493mb +0.00% | 54.953ms +4.05%   | ±0.67% -49.30% |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 123.822mb +0.00% | 1.240s +1.25%     | ±0.75% +74.08% |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 16.966mb +0.01%  | 44.267ms +1.01%   | ±0.27% -0.70%  |
+--------------------+----------------+------+-----+------------------+-------------------+----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+------------------+------------------+------------------+
| benchmark               | subject                    | revs | its | mem_peak         | mode             | rstdev           |
+-------------------------+----------------------------+------+-----+------------------+------------------+------------------+
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 52.631mb +0.00%  | 389.398ms -0.10% | ±0.72% -52.06%   |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 12.897mb +0.01%  | 80.191ms +1.18%  | ±0.69% -74.52%   |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 106.824mb +0.00% | 473.884ms +1.09% | ±1.26% -23.11%   |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 55.182mb +0.00%  | 240.830ms +1.50% | ±1.06% +6.60%    |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.020mb +0.01%  | 52.779ms +4.42%  | ±1.68% -0.73%    |
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 86.807mb +0.00%  | 3.913ms +16.65%  | ±0.77% -28.43%   |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 102.410mb +0.00% | 188.629ms +0.27% | ±0.67% +31.76%   |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 85.130mb +0.00%  | 19.213ms +2.38%  | ±0.40% -80.61%   |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 88.047mb +0.00%  | 1.883ms -4.59%   | ±1.14% -39.04%   |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 88.047mb +0.00%  | 1.994ms +7.67%   | ±1.94% +10.99%   |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 85.159mb +0.00%  | 2.972ms +7.05%   | ±1.98% -25.63%   |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 85.688mb +0.00%  | 17.552ms -4.39%  | ±1.32% -33.73%   |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 85.688mb +0.00%  | 17.056ms -5.99%  | ±1.80% -47.70%   |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 83.591mb +0.00%  | 1.994μs +11.15%  | ±2.40% -10.17%   |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 83.591mb +0.00%  | 0.400μs +100.00% | ±0.00% 0.00%     |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 92.942mb +0.00%  | 14.400ms +12.61% | ±2.57% +80.03%   |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 122.313mb +0.00% | 61.674ms -3.53%  | ±0.66% -33.69%   |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 86.207mb +0.00%  | 1.651ms +18.71%  | ±0.83% -5.70%    |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 89.559mb +0.00%  | 67.315ms +6.36%  | ±0.50% -27.59%   |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 88.309mb +0.00%  | 4.520ms +13.43%  | ±2.03% +458.83%  |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 83.741mb +0.00%  | 42.524ms +8.80%  | ±1.80% +24.84%   |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 83.742mb +0.00%  | 41.672ms +6.39%  | ±1.33% +266.59%  |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 83.741mb +0.00%  | 41.230ms +6.23%  | ±0.95% +127.58%  |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 86.033mb +0.00%  | 7.713ms +5.89%   | ±2.56% +5599.74% |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 83.591mb +0.00%  | 30.730ms -3.09%  | ±0.19% -23.68%   |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 83.591mb +0.00%  | 13.888μs +4.09%  | ±1.87% -23.67%   |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 83.591mb +0.00%  | 16.483μs +3.29%  | ±1.30% -28.83%   |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 102.411mb +0.00% | 192.378ms -0.97% | ±0.57% +77.83%   |
+-------------------------+----------------------------+------+-----+------------------+------------------+------------------+

@norberttech norberttech merged commit f2819ee into flow-php:1.x Aug 9, 2024
@norberttech norberttech deleted the feature/csv-rows-normalizer branch December 5, 2024 20:18
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.

Automate CSVLoader rows normalization

1 participant