Skip to content

Conversation

@norberttech
Copy link
Member

Change Log

Added

  • group imports
  • make phpunit assertions static/self

Fixed

Changed

  • disabled native functions invocation that was messing with namespaced functions

Removed

Deprecated

Security


Description

@norberttech
Copy link
Member Author

norberttech commented Mar 10, 2024

@Wirone thanks to grouping imports, examples looks so much better now

image

vs

image

Thanks for your effort!

@github-actions
Copy link
Contributor

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.278mb +0.00%  | 821.628ms -0.83% | ±0.94% +15.45%  |
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 5.002mb +0.01%   | 341.036ms +0.03% | ±0.87% +78.68%  |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 5.152mb +0.01%   | 1.042s -0.22%    | ±0.75% +25.11%  |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 135.823mb +0.00% | 890.665ms -0.75% | ±1.26% +120.74% |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.909mb +0.01%   | 35.675ms +2.07%  | ±1.09% +38.88%  |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.915mb +0.01%   | 437.322ms +1.36% | ±0.18% -38.05%  |
+-----------------------+-------------------+------+-----+------------------+------------------+-----------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+------------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev           |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+------------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 110.615mb +0.00% | 64.707ms +0.55% | ±0.65% +1052.51% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+------------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev          |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| AvroLoaderBench    | bench_load_10k | 1    | 3   | 95.659mb +0.00%  | 450.827ms -3.87% | ±1.01% -2.83%   |
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 54.141mb +0.00%  | 70.027ms -2.14%  | ±0.70% +27.47%  |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 106.566mb +0.00% | 51.333ms -2.74%  | ±0.04% -96.62%  |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 224.386mb +0.00% | 1.414s -0.34%    | ±0.58% +310.69% |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.956mb +0.00%  | 38.424ms -2.46%  | ±1.10% +69.38%  |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark               | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 59.958mb +0.00%  | 432.175ms -1.27% | ±0.30% -46.99%  |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 14.497mb +0.00%  | 84.350ms -3.25%  | ±0.76% -35.80%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 116.714mb +0.00% | 494.280ms +0.52% | ±0.14% -77.50%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 60.192mb +0.00%  | 246.977ms -1.63% | ±0.49% +109.11% |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 15.126mb +0.00%  | 52.743ms -1.44%  | ±0.42% -75.29%  |
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 76.682mb +0.00%  | 3.279ms -16.00%  | ±1.91% +105.29% |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 96.409mb +0.00%  | 183.481ms +1.60% | ±1.00% +286.81% |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 74.935mb +0.00%  | 18.309ms +0.09%  | ±0.72% -10.36%  |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 77.922mb +0.00%  | 1.456ms -21.31%  | ±2.91% +282.57% |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 77.922mb +0.00%  | 1.566ms -10.30%  | ±1.46% +34.79%  |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 75.034mb +0.00%  | 2.443ms -5.09%   | ±1.46% -48.55%  |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 75.563mb +0.00%  | 14.473ms -2.78%  | ±1.10% -52.56%  |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 75.563mb +0.00%  | 14.441ms -3.77%  | ±0.74% -68.08%  |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 73.467mb +0.00%  | 1.600μs -15.52%  | ±0.00% -100.00% |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 73.467mb +0.00%  | 0.400μs +33.33%  | ±0.00% +0.00%   |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 87.022mb +0.00%  | 13.032ms +0.39%  | ±2.22% +30.50%  |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 116.382mb +0.00% | 66.058ms -0.92%  | ±0.51% +82.89%  |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 76.083mb +0.00%  | 1.166ms -27.32%  | ±2.59% +68.34%  |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 79.430mb +0.00%  | 57.007ms -1.59%  | ±0.66% -55.27%  |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 78.184mb +0.00%  | 3.853ms -6.75%   | ±0.98% +7.98%   |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 73.545mb +0.00%  | 40.806ms -1.44%  | ±1.81% +18.36%  |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 73.546mb +0.00%  | 41.968ms +0.59%  | ±1.79% +419.99% |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 73.545mb +0.00%  | 41.229ms +0.03%  | ±0.59% +5.16%   |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 75.908mb +0.00%  | 7.298ms -1.79%   | ±0.83% +9.71%   |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 73.467mb +0.00%  | 29.332ms +0.60%  | ±1.16% +22.86%  |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 73.467mb +0.00%  | 13.224μs -0.41%  | ±1.41% +51.19%  |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 73.467mb +0.00%  | 15.821μs -3.43%  | ±0.79% -39.58%  |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 96.476mb +0.00%  | 190.550ms +2.47% | ±0.84% +79.19%  |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+

@Wirone
Copy link
Contributor

Wirone commented Mar 10, 2024

Happy to see it working correctly in the real projects 😁!

PS. I need to take a look on your actions in terms of auto-labelling, looks like something we should take advantage of 🙂.

@norberttech norberttech merged commit a7eb830 into flow-php:1.x Mar 10, 2024
@norberttech norberttech added this to the 0.7.0 milestone Mar 11, 2024
@norberttech norberttech deleted the feature/codding-standards branch May 9, 2024 08:55
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