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

Add Title function with allWords parameter set default to false. #1477

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

f-lapinski
Copy link
Contributor

Add Test for function with and without allWords and return type

Change Log

Added

  • Add Title function with argument allWords set false as default with Tests

Fixed

Changed

Removed

Deprecated

Security


Description

Function title() and addWords parameter set false on default and add Test for title function with and without allWords and test for return type

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         |
+-----------------------+-------------------+------+-----+-----------------+------------------+----------------+
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 4.800mb +0.01%  | 551.747ms -1.45% | ±0.12% -92.19% |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.873mb +0.01%  | 1.054s -1.55%    | ±0.96% -52.96% |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 86.318mb +0.00% | 909.672ms -1.04% | ±0.48% +19.33% |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.530mb +0.02%  | 35.498ms +0.13%  | ±0.13% -87.87% |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.505mb +0.02%  | 611.173ms -1.06% | ±0.87% -17.47% |
+-----------------------+-------------------+------+-----+-----------------+------------------+----------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev         |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 127.327mb +0.00% | 72.699ms +2.43% | ±0.35% -46.09% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev         |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 64.000mb +0.00%  | 105.603ms -1.49% | ±1.07% +73.54% |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 84.346mb +0.00%  | 97.992ms -2.99%  | ±0.75% -47.46% |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 161.189mb +0.00% | 21.042s -2.38%   | ±0.24% -65.42% |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 17.997mb +0.00%  | 32.517ms +0.74%  | ±1.08% +30.22% |
+--------------------+----------------+------+-----+------------------+------------------+----------------+
Building Blocks
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark         | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 105.970mb +0.00% | 451.167ms -2.74% | ±0.52% -70.83%  |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 55.160mb +0.00%  | 230.118ms -1.23% | ±1.50% -14.99%  |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.682mb +0.00%  | 51.480ms -2.84%  | ±2.30% +380.96% |
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 43.804mb +0.00%  | 365.426ms +0.27% | ±0.90% +113.62% |
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 11.614mb +0.01%  | 73.298ms -1.22%  | ±0.20% -64.75%  |
| RowsBench         | bench_chunk_10_on_10k      | 2    | 3   | 97.013mb +0.00%  | 4.199ms -7.04%   | ±3.31% +82.93%  |
| RowsBench         | bench_diff_left_1k_on_10k  | 2    | 3   | 114.298mb +0.00% | 184.288ms -0.35% | ±0.31% -43.23%  |
| RowsBench         | bench_diff_right_1k_on_10k | 2    | 3   | 97.018mb +0.00%  | 18.798ms -2.51%  | ±0.52% -85.13%  |
| RowsBench         | bench_drop_1k_on_10k       | 2    | 3   | 97.888mb +0.00%  | 1.957ms -14.27%  | ±2.45% +3.16%   |
| RowsBench         | bench_drop_right_1k_on_10k | 2    | 3   | 97.888mb +0.00%  | 2.038ms -5.68%   | ±2.90% -3.27%   |
| RowsBench         | bench_entries_on_10k       | 2    | 3   | 96.049mb +0.00%  | 5.465ms -14.11%  | ±2.47% +57.02%  |
| RowsBench         | bench_filter_on_10k        | 2    | 3   | 96.578mb +0.00%  | 17.126ms -0.28%  | ±0.70% -12.24%  |
| RowsBench         | bench_find_on_10k          | 2    | 3   | 96.578mb +0.00%  | 17.086ms -2.16%  | ±0.40% +5.53%   |
| RowsBench         | bench_find_one_on_10k      | 10   | 3   | 95.269mb +0.00%  | 1.994μs -5.04%   | ±2.40% -38.35%  |
| RowsBench         | bench_first_on_10k         | 10   | 3   | 95.269mb +0.00%  | 0.400μs -20.00%  | ±0.00% +0.00%   |
| RowsBench         | bench_flat_map_on_1k       | 2    | 3   | 104.487mb +0.00% | 16.361ms -7.52%  | ±3.56% +253.23% |
| RowsBench         | bench_map_on_10k           | 2    | 3   | 134.554mb +0.00% | 74.609ms -2.67%  | ±1.86% +68.06%  |
| RowsBench         | bench_merge_1k_on_10k      | 2    | 3   | 97.097mb +0.00%  | 2.006ms -3.10%   | ±2.16% +51.90%  |
| RowsBench         | bench_partition_by_on_10k  | 2    | 3   | 100.397mb +0.00% | 65.076ms -2.71%  | ±1.99% +99.68%  |
| RowsBench         | bench_remove_on_10k        | 2    | 3   | 98.150mb +0.00%  | 4.970ms +7.37%   | ±3.36% -10.92%  |
| RowsBench         | bench_sort_asc_on_1k       | 2    | 3   | 95.560mb +0.00%  | 44.934ms -0.93%  | ±1.46% +35.19%  |
| RowsBench         | bench_sort_by_on_1k        | 2    | 3   | 95.560mb +0.00%  | 45.555ms -0.22%  | ±2.22% +24.87%  |
| RowsBench         | bench_sort_desc_on_1k      | 2    | 3   | 95.560mb +0.00%  | 45.175ms -1.18%  | ±2.06% +192.78% |
| RowsBench         | bench_sort_entries_on_1k   | 2    | 3   | 97.709mb +0.00%  | 9.394ms +0.85%   | ±3.11% +927.73% |
| RowsBench         | bench_sort_on_1k           | 2    | 3   | 95.459mb +0.00%  | 32.667ms -1.39%  | ±1.31% -58.64%  |
| RowsBench         | bench_take_1k_on_10k       | 10   | 3   | 95.269mb +0.00%  | 14.870μs -0.41%  | ±1.60% +2.26%   |
| RowsBench         | bench_take_right_1k_on_10k | 10   | 3   | 95.269mb +0.00%  | 17.024μs -1.52%  | ±1.10% +101.17% |
| RowsBench         | bench_unique_on_1k         | 2    | 3   | 114.299mb +0.00% | 188.558ms +0.55% | ±0.71% -71.48%  |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+

Copy link

codecov bot commented Feb 13, 2025

Codecov Report

Attention: Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 83.08%. Comparing base (d14101d) to head (d3fc904).
Report is 2 commits behind head on 1.x.

Additional details and impacted files
@@           Coverage Diff           @@
##              1.x    #1477   +/-   ##
=======================================
  Coverage   83.08%   83.08%           
=======================================
  Files         665      666    +1     
  Lines       17887    17899   +12     
=======================================
+ Hits        14861    14872   +11     
- Misses       3026     3027    +1     
Components Coverage Δ
etl 85.84% <91.66%> (+<0.01%) ⬆️
cli 86.73% <ø> (ø)
lib-array-dot 94.53% <ø> (ø)
lib-azure-sdk 62.56% <ø> (ø)
lib-doctrine-dbal-bulk 97.43% <ø> (ø)
lib-filesystem 76.75% <ø> (ø)
lib-parquet 84.33% <ø> (ø)
lib-parquet-viewer 82.02% <ø> (ø)
lib-rdsl 87.09% <ø> (ø)
lib-snappy 91.16% <ø> (ø)
bridge-filesystem-async-aws 90.38% <ø> (ø)
bridge-filesystem-azure 89.92% <ø> (ø)
bridge-monolog-http 96.38% <ø> (ø)
symfony-http-foundation 77.10% <ø> (ø)
adapter-chartjs 86.45% <ø> (ø)
adapter-csv 89.57% <ø> (ø)
adapter-doctrine 88.68% <ø> (ø)
adapter-elasticsearch 97.19% <ø> (ø)
adapter-google-sheet 78.04% <ø> (ø)
adapter-http 59.15% <ø> (ø)
adapter-json 90.62% <ø> (ø)
adapter-logger 53.84% <ø> (ø)
adapter-meilisearch 97.75% <ø> (ø)
adapter-parquet 80.85% <ø> (ø)
adapter-text 84.44% <ø> (ø)
adapter-xml 83.15% <ø> (ø)

@norberttech norberttech merged commit d03af95 into flow-php:1.x Feb 14, 2025
22 checks passed
@norberttech
Copy link
Member

Good job 👏

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