Skip to content

Conversation

@stloyd
Copy link
Member

@stloyd stloyd commented Jan 6, 2024

Change Log

Added

Fixed

Changed

  • Make sure that entries are "stringable"

Removed

Deprecated

Security


Description

Almost all Entry related classes implement the \Stringable interface, but even if not those classes have the magic method __toString() declared cause it's required by the Entry interface itself. This change makes the code of entries a bit more clear.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 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          |
+-----------------------+-------------------+------+-----+------------------+------------------+-----------------+
| AvroExtractorBench    | bench_extract_10k | 1    | 3   | 35.129mb +0.00%  | 746.421ms -4.93% | ±3.51% +271.29% |
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 4.782mb +0.00%   | 342.994ms -0.94% | ±0.63% +30.15%  |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.877mb +0.00%   | 972.980ms -1.89% | ±0.76% -53.45%  |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 239.581mb +0.00% | 1.130s -2.19%    | ±1.05% +73.56%  |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.661mb +0.00%   | 54.070ms -1.73%  | ±0.60% -12.52%  |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.663mb +0.00%   | 464.079ms -3.86% | ±0.25% -76.35%  |
+-----------------------+-------------------+------+-----+------------------+------------------+-----------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev          |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 110.375mb +0.00% | 63.715ms -0.55% | ±1.99% +119.45% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+-----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev         |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| AvroLoaderBench    | bench_load_10k | 1    | 3   | 94.739mb +0.00%  | 450.932ms -7.05% | ±1.45% -36.90% |
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 54.820mb +0.00%  | 71.634ms -4.42%  | ±0.68% -57.91% |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 105.333mb +0.00% | 55.619ms -9.34%  | ±0.65% -73.96% |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 320.543mb +0.00% | 1.248s -2.62%    | ±0.10% -72.78% |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.703mb +0.00%  | 41.148ms -1.06%  | ±0.71% +51.99% |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark               | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 115.992mb +0.00% | 384.624ms -4.47% | ±0.96% -49.55%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 59.710mb +0.00%  | 196.755ms -3.91% | ±0.95% -69.94%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.835mb +0.00%  | 40.331ms -5.48%  | ±0.86% -20.88%  |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 59.398mb +0.00%  | 328.637ms -2.01% | ±0.55% -75.31%  |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 14.321mb +0.00%  | 64.655ms -2.77%  | ±1.72% +522.60% |
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 76.456mb +0.00%  | 3.231ms -6.05%   | ±2.01% +54.82%  |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 96.249mb +0.00%  | 185.544ms -2.04% | ±0.87% -49.20%  |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 74.775mb +0.00%  | 18.363ms -2.08%  | ±0.39% -72.90%  |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 77.696mb +0.00%  | 1.632ms -9.89%   | ±1.86% -32.67%  |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 77.696mb +0.00%  | 1.624ms -11.87%  | ±2.05% +91.88%  |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 74.808mb +0.00%  | 2.563ms -6.42%   | ±1.28% +11.48%  |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 75.337mb +0.00%  | 14.391ms -3.36%  | ±1.39% -28.86%  |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 75.337mb +0.00%  | 14.195ms -6.43%  | ±1.39% -34.36%  |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 73.240mb +0.00%  | 1.700μs -5.24%   | ±0.00% -100.00% |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 73.240mb +0.00%  | 0.300μs -25.00%  | ±0.00% -100.00% |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 86.796mb +0.00%  | 12.641ms -3.04%  | ±0.46% -55.74%  |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 116.156mb +0.00% | 62.691ms -4.66%  | ±0.19% -91.05%  |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 75.857mb +0.00%  | 1.186ms -16.73%  | ±2.78% +41.77%  |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 79.204mb +0.00%  | 56.140ms -4.38%  | ±1.81% +67.32%  |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 77.958mb +0.00%  | 3.773ms -6.41%   | ±0.18% -41.33%  |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 73.385mb +0.00%  | 39.740ms -2.90%  | ±0.41% -76.15%  |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 73.386mb +0.00%  | 40.261ms -1.77%  | ±1.16% +16.36%  |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 73.385mb +0.00%  | 40.363ms -4.61%  | ±0.28% -90.57%  |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 75.682mb +0.00%  | 7.393ms -2.28%   | ±1.24% +20.98%  |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 73.240mb +0.00%  | 28.589ms -5.16%  | ±0.61% -28.26%  |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 73.240mb +0.00%  | 13.194μs -0.93%  | ±0.36% -66.08%  |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 73.240mb +0.00%  | 15.683μs -1.29%  | ±1.37% -16.48%  |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 96.250mb +0.00%  | 183.120ms -2.01% | ±1.09% +89.13%  |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+

@norberttech norberttech merged commit b66007a into flow-php:1.x Jan 9, 2024
@stloyd stloyd deleted the entry-stringable branch January 9, 2024 11:07
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.

2 participants