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

Use the FlowTestCase in all the Adapters tests #1306

Merged
merged 8 commits into from
Dec 30, 2024

Conversation

Bellangelo
Copy link
Contributor

Change Log

Added

Fixed

Changed

  • Used the new `FlowTestCase` in all the ETL tests

Removed

Deprecated

Security


Description

Partially addresses #745.

Following the work of #1291 we will use the new FlowTestCase in all the Adapter tests.

Copy link
Contributor

github-actions bot commented Dec 30, 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   | 4.715mb +0.01%  | 524.502ms +1.39% | ±2.92% +740.79% |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.819mb +0.01%  | 1.133s +2.44%    | ±1.48% +0.94%   |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 86.465mb +0.00% | 919.655ms +1.10% | ±1.02% +635.80% |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.448mb +0.01%  | 34.033ms +1.15%  | ±0.81% +76.52%  |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.424mb +0.01%  | 667.012ms -0.80% | ±0.30% -64.94%  |
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev         |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 114.445mb +0.00% | 62.025ms +3.36% | ±0.43% -74.26% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev          |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 55.188mb +0.00%  | 114.120ms +1.66% | ±1.03% -68.98%  |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 85.655mb +0.00%  | 102.506ms +1.10% | ±0.62% -10.22%  |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 167.441mb +0.00% | 19.529s +1.33%   | ±0.49% -80.41%  |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.273mb +0.00%  | 44.564ms +0.36%  | ±0.64% +134.85% |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
Building Blocks
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark               | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| RowsBench               | bench_chunk_10_on_10k      | 2    | 3   | 85.501mb +0.00%  | 3.531ms +13.32%  | ±1.49% -6.48%   |
| RowsBench               | bench_diff_left_1k_on_10k  | 2    | 3   | 102.771mb +0.00% | 186.344ms -1.00% | ±0.13% -72.43%  |
| RowsBench               | bench_diff_right_1k_on_10k | 2    | 3   | 85.491mb +0.00%  | 18.595ms -0.43%  | ±1.12% +100.32% |
| RowsBench               | bench_drop_1k_on_10k       | 2    | 3   | 86.376mb +0.00%  | 1.910ms +30.31%  | ±3.70% +49.98%  |
| RowsBench               | bench_drop_right_1k_on_10k | 2    | 3   | 86.376mb +0.00%  | 1.850ms +22.65%  | ±1.88% -38.96%  |
| RowsBench               | bench_entries_on_10k       | 2    | 3   | 84.537mb +0.00%  | 2.638ms +14.57%  | ±0.09% -93.51%  |
| RowsBench               | bench_filter_on_10k        | 2    | 3   | 85.066mb +0.00%  | 14.959ms +2.74%  | ±1.53% +59.23%  |
| RowsBench               | bench_find_on_10k          | 2    | 3   | 85.066mb +0.00%  | 15.167ms +0.89%  | ±0.62% -54.98%  |
| RowsBench               | bench_find_one_on_10k      | 10   | 3   | 83.757mb +0.00%  | 2.000μs +17.23%  | ±0.00% -100.00% |
| RowsBench               | bench_first_on_10k         | 10   | 3   | 83.757mb +0.00%  | 0.400μs 0.00%    | ±0.00% 0.00%    |
| RowsBench               | bench_flat_map_on_1k       | 2    | 3   | 92.335mb +0.00%  | 13.422ms +3.42%  | ±3.14% +230.46% |
| RowsBench               | bench_map_on_10k           | 2    | 3   | 120.642mb +0.00% | 62.889ms +2.99%  | ±0.56% -35.50%  |
| RowsBench               | bench_merge_1k_on_10k      | 2    | 3   | 85.586mb +0.00%  | 1.579ms +30.73%  | ±2.67% -22.64%  |
| RowsBench               | bench_partition_by_on_10k  | 2    | 3   | 88.874mb +0.00%  | 62.077ms +1.64%  | ±1.10% +188.94% |
| RowsBench               | bench_remove_on_10k        | 2    | 3   | 86.638mb +0.00%  | 4.162ms +17.41%  | ±3.49% +184.08% |
| RowsBench               | bench_sort_asc_on_1k       | 2    | 3   | 84.032mb +0.00%  | 43.236ms +4.80%  | ±0.73% +78.94%  |
| RowsBench               | bench_sort_by_on_1k        | 2    | 3   | 84.033mb +0.00%  | 42.762ms +0.73%  | ±1.63% -18.08%  |
| RowsBench               | bench_sort_desc_on_1k      | 2    | 3   | 84.032mb +0.00%  | 41.545ms -0.82%  | ±0.80% -43.71%  |
| RowsBench               | bench_sort_entries_on_1k   | 2    | 3   | 86.198mb +0.00%  | 7.865ms +1.92%   | ±2.02% +164.12% |
| RowsBench               | bench_sort_on_1k           | 2    | 3   | 83.947mb +0.00%  | 29.679ms +0.89%  | ±0.93% +31.30%  |
| RowsBench               | bench_take_1k_on_10k       | 10   | 3   | 83.757mb +0.00%  | 13.717μs +2.97%  | ±1.59% +68.96%  |
| RowsBench               | bench_take_right_1k_on_10k | 10   | 3   | 83.757mb +0.00%  | 16.006μs +5.76%  | ±0.29% -89.24%  |
| RowsBench               | bench_unique_on_1k         | 2    | 3   | 102.776mb +0.00% | 191.500ms +0.97% | ±0.60% -0.82%   |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 50.656mb +0.00%  | 402.792ms +0.56% | ±0.67% +0.53%   |
| TypeDetectorBench       | bench_type_detector        | 1    | 3   | 13.071mb +0.00%  | 81.760ms +1.12%  | ±1.01% -13.14%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 105.913mb +0.00% | 487.915ms +0.41% | ±1.27% +83.01%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 55.104mb +0.00%  | 250.036ms +2.31% | ±1.41% +52.09%  |
| NativeEntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.626mb +0.00%  | 53.954ms +1.35%  | ±1.66% +14.15%  |
+-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+

Copy link

codecov bot commented Dec 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.80%. Comparing base (41f1d96) to head (2c546ba).
Report is 4 commits behind head on 1.x.

Additional details and impacted files
@@           Coverage Diff           @@
##              1.x    #1306   +/-   ##
=======================================
  Coverage   81.80%   81.80%           
=======================================
  Files         569      569           
  Lines       15621    15621           
=======================================
+ Hits        12778    12779    +1     
+ Misses       2843     2842    -1     
Flag Coverage Δ
adapter-chartjs 81.80% <ø> (+<0.01%) ⬆️
adapter-csv 81.80% <ø> (+<0.01%) ⬆️
adapter-doctrine 81.80% <ø> (+<0.01%) ⬆️
adapter-elasticsearch 81.80% <ø> (+<0.01%) ⬆️
adapter-google-sheet 81.80% <ø> (+<0.01%) ⬆️
adapter-http 81.80% <ø> (+<0.01%) ⬆️
adapter-json 81.80% <ø> (+<0.01%) ⬆️
adapter-logger 81.80% <ø> (+<0.01%) ⬆️
adapter-meilisearch 81.80% <ø> (+<0.01%) ⬆️
adapter-parquet 81.80% <ø> (+<0.01%) ⬆️
adapter-text 81.80% <ø> (+<0.01%) ⬆️
adapter-xml 81.80% <ø> (+<0.01%) ⬆️
bridge-filesystem-async-aws 81.80% <ø> (+<0.01%) ⬆️
bridge-filesystem-azure 81.80% <ø> (+<0.01%) ⬆️
bridge-monolog-http 81.80% <ø> (+<0.01%) ⬆️
bridge-symfony-http-foundation 81.80% <ø> (+<0.01%) ⬆️
cli 81.80% <ø> (+<0.01%) ⬆️
etl 81.80% <ø> (+<0.01%) ⬆️
lib-azure-sdk 81.80% <ø> (+<0.01%) ⬆️
lib-doctrine-dbal-bulk 81.80% <ø> (+<0.01%) ⬆️
lib-filesystem 81.80% <ø> (+<0.01%) ⬆️
lib-parquet 81.80% <ø> (+<0.01%) ⬆️
lib-parquet-viewer 81.80% <ø> (+<0.01%) ⬆️
lib-rdsl 81.80% <ø> (+<0.01%) ⬆️
lib-snappy 81.80% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@Bellangelo
Copy link
Contributor Author

@norbertmwk We had some tests which were using the wrong test case. Two of them where from the libs folder. Fixed them here e9f8003

@norberttech
Copy link
Member

@norbertmwk We had some tests which were using the wrong test case. Two of them where from the libs folder. Fixed them here e9f8003

perfect! I just noticed that changes in bridges are not triggering test suite and that changes in adapters are triggering the mutation tests (and they shouldn't) - just pushed the fix, will rebase your PR's shortly

@norberttech norberttech merged commit dbba660 into flow-php:1.x Dec 30, 2024
22 checks passed
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