-
-
Notifications
You must be signed in to change notification settings - Fork 38
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 StringBefore function with test #1484
Merged
norberttech
merged 5 commits into
flow-php:1.x
from
f-lapinski:integration/symfony-string-before
Feb 20, 2025
Merged
Add StringBefore function with test #1484
norberttech
merged 5 commits into
flow-php:1.x
from
f-lapinski:integration/symfony-string-before
Feb 20, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Flow PHP - BenchmarksResults 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.801mb +0.01% | 548.710ms -0.78% | ±0.33% +76.11% |
| JsonExtractorBench | bench_extract_10k | 1 | 3 | 4.874mb +0.01% | 1.055s -0.62% | ±0.45% +57.11% |
| ParquetExtractorBench | bench_extract_10k | 1 | 3 | 86.321mb +0.00% | 888.101ms -2.14% | ±0.09% -66.24% |
| TextExtractorBench | bench_extract_10k | 1 | 3 | 4.531mb +0.02% | 35.496ms +0.42% | ±0.76% +122.93% |
| XmlExtractorBench | bench_extract_10k | 1 | 3 | 4.506mb +0.02% | 607.999ms +0.57% | ±1.06% +176.34% |
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
Transformers+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark | subject | revs | its | mem_peak | mode | rstdev |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1 | 3 | 127.328mb +0.00% | 70.236ms -0.68% | ±1.14% +61.26% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| benchmark | subject | revs | its | mem_peak | mode | rstdev |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| CSVLoaderBench | bench_load_10k | 1 | 3 | 64.000mb +0.00% | 104.450ms +0.54% | ±0.65% +0.94% |
| JsonLoaderBench | bench_load_10k | 1 | 3 | 84.347mb +0.00% | 95.151ms -3.08% | ±1.54% +137.79% |
| ParquetLoaderBench | bench_load_10k | 1 | 3 | 161.191mb +0.00% | 20.396s -1.58% | ±0.17% -78.53% |
| TextLoaderBench | bench_load_10k | 1 | 3 | 17.998mb +0.00% | 29.721ms -5.82% | ±0.53% +15.43% |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
Building Blocks+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark | subject | revs | its | mem_peak | mode | rstdev |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| EntryFactoryBench | bench_entry_factory | 1 | 3 | 105.970mb +0.00% | 455.554ms +0.53% | ±1.18% -23.09% |
| EntryFactoryBench | bench_entry_factory | 1 | 3 | 55.161mb +0.00% | 226.103ms -1.94% | ±0.74% +31.75% |
| EntryFactoryBench | bench_entry_factory | 1 | 3 | 14.683mb +0.00% | 49.466ms -1.72% | ±1.59% +224.70% |
| TypeDetectorBench | bench_type_detector | 1 | 3 | 43.805mb +0.00% | 366.185ms +0.95% | ±1.13% +11.22% |
| TypeDetectorBench | bench_type_detector | 1 | 3 | 11.615mb +0.01% | 72.320ms +0.21% | ±1.26% +728.57% |
| RowsBench | bench_chunk_10_on_10k | 2 | 3 | 97.014mb +0.00% | 3.109ms -2.61% | ±1.02% +135.00% |
| RowsBench | bench_diff_left_1k_on_10k | 2 | 3 | 114.301mb +0.00% | 184.299ms -1.34% | ±0.39% -64.67% |
| RowsBench | bench_diff_right_1k_on_10k | 2 | 3 | 97.021mb +0.00% | 18.585ms -1.08% | ±0.37% -13.68% |
| RowsBench | bench_drop_1k_on_10k | 2 | 3 | 97.889mb +0.00% | 1.396ms -10.88% | ±1.94% +18.07% |
| RowsBench | bench_drop_right_1k_on_10k | 2 | 3 | 97.889mb +0.00% | 1.430ms -13.76% | ±1.16% -65.11% |
| RowsBench | bench_entries_on_10k | 2 | 3 | 96.049mb +0.00% | 4.216ms -4.49% | ±0.55% -69.98% |
| RowsBench | bench_filter_on_10k | 2 | 3 | 96.578mb +0.00% | 16.164ms -1.49% | ±0.22% -81.35% |
| RowsBench | bench_find_on_10k | 2 | 3 | 96.578mb +0.00% | 16.447ms -1.08% | ±0.96% +101.75% |
| RowsBench | bench_find_one_on_10k | 10 | 3 | 95.270mb +0.00% | 1.894μs 0.00% | ±2.53% 0.00% |
| RowsBench | bench_first_on_10k | 10 | 3 | 95.270mb +0.00% | 0.400μs 0.00% | ±0.00% 0.00% |
| RowsBench | bench_flat_map_on_1k | 2 | 3 | 104.488mb +0.00% | 14.153ms -3.71% | ±0.32% -84.93% |
| RowsBench | bench_map_on_10k | 2 | 3 | 134.555mb +0.00% | 70.738ms -2.26% | ±0.99% +410.19% |
| RowsBench | bench_merge_1k_on_10k | 2 | 3 | 97.098mb +0.00% | 1.231ms -8.99% | ±2.07% +6.21% |
| RowsBench | bench_partition_by_on_10k | 2 | 3 | 100.400mb +0.00% | 63.900ms -0.41% | ±0.35% -3.52% |
| RowsBench | bench_remove_on_10k | 2 | 3 | 98.151mb +0.00% | 3.597ms -10.15% | ±0.22% -92.26% |
| RowsBench | bench_sort_asc_on_1k | 2 | 3 | 95.562mb +0.00% | 42.153ms +0.47% | ±0.32% -65.92% |
| RowsBench | bench_sort_by_on_1k | 2 | 3 | 95.563mb +0.00% | 42.526ms +1.66% | ±0.96% +68.84% |
| RowsBench | bench_sort_desc_on_1k | 2 | 3 | 95.562mb +0.00% | 41.920ms -0.61% | ±0.30% -3.60% |
| RowsBench | bench_sort_entries_on_1k | 2 | 3 | 97.710mb +0.00% | 8.144ms +0.74% | ±1.49% +22.91% |
| RowsBench | bench_sort_on_1k | 2 | 3 | 95.460mb +0.00% | 29.189ms +0.07% | ±0.20% -75.78% |
| RowsBench | bench_take_1k_on_10k | 10 | 3 | 95.270mb +0.00% | 12.900μs -3.65% | ±0.00% -100.00% |
| RowsBench | bench_take_right_1k_on_10k | 10 | 3 | 95.270mb +0.00% | 15.533μs +1.12% | ±2.62% -13.01% |
| RowsBench | bench_unique_on_1k | 2 | 3 | 114.301mb +0.00% | 187.507ms -0.83% | ±0.24% -75.29% |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
|
stloyd
reviewed
Feb 17, 2025
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 1.x #1484 +/- ##
==========================================
+ Coverage 83.08% 83.09% +0.01%
==========================================
Files 667 668 +1
Lines 17912 17925 +13
==========================================
+ Hits 14882 14895 +13
Misses 3030 3030
|
# Conflicts: # src/core/etl/src/Flow/ETL/Function/ScalarFunctionChain.php
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Log
Added
Fixed
Changed
Removed
Deprecated
Security
Description
This function extracts the substring before a given delimiter, ensuring proper UTF-8
stringBefore($needle, $includeNeedle)