flow-php / flow

Flow PHP - data processing framework
https://flow-php.com
MIT License
404 stars 23 forks source link

Fix fragile test comparing console output #1085

Closed stloyd closed 1 month ago

stloyd commented 1 month ago

Change Log

Added

Fixed

  • Fix fragile test comparing console output

Changed

Removed

Deprecated

Security


Description

Preventing failure like below:

There was 1 failure:

1) Flow\ParquetViewer\Tests\Integration\ReadMetadataTest::test_reading_metadata_from_non_json_file
Failed asserting that '\n
 [ERROR] File "/Users/stloyd/Documents/flow/src/lib/parquet-viewer/tests/Flow/ParquetViewer/Fixtures/flow.json" is not a\n
         valid parquet file                                                                                             \n
\n
' [ASCII](length: 244) contains "not a valid parquet file" [ASCII](length: 24).

/Users/stloyd/Documents/flow/src/lib/parquet-viewer/tests/Flow/ParquetViewer/Tests/Integration/ReadMetadataTest.php:29
github-actions[bot] commented 1 month ago

Flow PHP - Benchmarks

Results of the benchmarks from this PR are compared with the results from 1.x branch.

Extractors ```shell +-----------------------+-------------------+------+-----+------------------+------------------+----------------+ | benchmark | subject | revs | its | mem_peak | mode | rstdev | +-----------------------+-------------------+------+-----+------------------+------------------+----------------+ | AvroExtractorBench | bench_extract_10k | 1 | 3 | 35.449mb +0.00% | 829.054ms +0.22% | ±0.57% +31.62% | | CSVExtractorBench | bench_extract_10k | 1 | 3 | 5.167mb +0.00% | 335.011ms -0.38% | ±0.59% +1.26% | | JsonExtractorBench | bench_extract_10k | 1 | 3 | 5.200mb +0.00% | 1.066s -1.06% | ±0.48% -9.13% | | ParquetExtractorBench | bench_extract_10k | 1 | 3 | 135.872mb +0.00% | 900.090ms -0.96% | ±0.19% -77.34% | | TextExtractorBench | bench_extract_10k | 1 | 3 | 4.958mb +0.00% | 35.770ms -1.42% | ±0.42% -57.12% | | XmlExtractorBench | bench_extract_10k | 1 | 3 | 4.963mb +0.00% | 437.517ms -2.96% | ±0.70% -57.11% | +-----------------------+-------------------+------+-----+------------------+------------------+----------------+ ```
Transformers ```shell +-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+ | benchmark | subject | revs | its | mem_peak | mode | rstdev | +-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+ | RenameEntryTransformerBench | bench_transform_10k_rows | 1 | 3 | 116.265mb +0.00% | 60.096ms -0.17% | ±0.13% -90.44% | +-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+ ```
Loaders ```shell +--------------------+----------------+------+-----+------------------+------------------+-----------------+ | benchmark | subject | revs | its | mem_peak | mode | rstdev | +--------------------+----------------+------+-----+------------------+------------------+-----------------+ | AvroLoaderBench | bench_load_10k | 1 | 3 | 96.834mb +0.00% | 457.926ms +2.62% | ±1.23% +55.73% | | CSVLoaderBench | bench_load_10k | 1 | 3 | 55.246mb +0.00% | 70.160ms +2.80% | ±0.38% +17.26% | | JsonLoaderBench | bench_load_10k | 1 | 3 | 107.620mb +0.00% | 53.171ms +3.59% | ±1.56% +260.02% | | ParquetLoaderBench | bench_load_10k | 1 | 3 | 227.039mb +0.00% | 1.426s +1.21% | ±0.59% -40.60% | | TextLoaderBench | bench_load_10k | 1 | 3 | 18.001mb +0.00% | 39.379ms +0.90% | ±0.10% -90.82% | +--------------------+----------------+------+-----+------------------+------------------+-----------------+ ```
Building Blocks ```shell +-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+ | benchmark | subject | revs | its | mem_peak | mode | rstdev | +-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+ | RowsBench | bench_chunk_10_on_10k | 2 | 3 | 87.083mb +0.00% | 3.922ms +16.28% | ±1.69% -11.35% | | RowsBench | bench_diff_left_1k_on_10k | 2 | 3 | 102.681mb +0.00% | 190.540ms +0.33% | ±0.87% +19.71% | | RowsBench | bench_diff_right_1k_on_10k | 2 | 3 | 85.401mb +0.00% | 19.083ms -1.52% | ±0.44% -34.55% | | RowsBench | bench_drop_1k_on_10k | 2 | 3 | 88.323mb +0.00% | 1.771ms +1.97% | ±1.30% -1.52% | | RowsBench | bench_drop_right_1k_on_10k | 2 | 3 | 88.323mb +0.00% | 1.841ms +7.05% | ±0.45% -22.46% | | RowsBench | bench_entries_on_10k | 2 | 3 | 85.435mb +0.00% | 3.032ms +6.78% | ±3.30% -0.66% | | RowsBench | bench_filter_on_10k | 2 | 3 | 85.964mb +0.00% | 16.669ms +3.13% | ±1.89% +279.50% | | RowsBench | bench_find_on_10k | 2 | 3 | 85.964mb +0.00% | 16.508ms +1.04% | ±1.53% -55.76% | | RowsBench | bench_find_one_on_10k | 10 | 3 | 83.868mb +0.00% | 1.606μs -5.19% | ±2.89% +2.04% | | RowsBench | bench_first_on_10k | 10 | 3 | 83.868mb +0.00% | 0.400μs 0.00% | ±0.00% 0.00% | | RowsBench | bench_flat_map_on_1k | 2 | 3 | 93.218mb +0.00% | 13.274ms +8.16% | ±1.53% +331.01% | | RowsBench | bench_map_on_10k | 2 | 3 | 122.589mb +0.00% | 61.161ms -0.66% | ±0.52% -50.39% | | RowsBench | bench_merge_1k_on_10k | 2 | 3 | 86.484mb +0.00% | 1.346ms -5.80% | ±1.39% -58.72% | | RowsBench | bench_partition_by_on_10k | 2 | 3 | 89.831mb +0.00% | 64.300ms +1.99% | ±1.12% +26.14% | | RowsBench | bench_remove_on_10k | 2 | 3 | 88.585mb +0.00% | 4.071ms -3.76% | ±0.40% -77.26% | | RowsBench | bench_sort_asc_on_1k | 2 | 3 | 84.012mb +0.00% | 38.645ms -2.15% | ±1.03% +50.79% | | RowsBench | bench_sort_by_on_1k | 2 | 3 | 84.012mb +0.00% | 38.816ms -0.62% | ±0.64% -2.51% | | RowsBench | bench_sort_desc_on_1k | 2 | 3 | 84.012mb +0.00% | 39.463ms -5.03% | ±0.47% -59.93% | | RowsBench | bench_sort_entries_on_1k | 2 | 3 | 86.309mb +0.00% | 7.499ms +2.67% | ±0.25% +4.34% | | RowsBench | bench_sort_on_1k | 2 | 3 | 83.868mb +0.00% | 28.816ms +1.26% | ±1.16% +151.55% | | RowsBench | bench_take_1k_on_10k | 10 | 3 | 83.868mb +0.00% | 13.760μs +0.35% | ±2.44% +26.11% | | RowsBench | bench_take_right_1k_on_10k | 10 | 3 | 83.868mb +0.00% | 16.707μs +2.37% | ±1.87% +143.85% | | RowsBench | bench_unique_on_1k | 2 | 3 | 102.682mb +0.00% | 193.848ms +0.57% | ±0.95% +34.72% | | NativeEntryFactoryBench | bench_entry_factory | 1 | 3 | 116.813mb +0.00% | 494.398ms -1.73% | ±1.29% +40.65% | | NativeEntryFactoryBench | bench_entry_factory | 1 | 3 | 60.291mb +0.00% | 252.766ms +0.14% | ±0.18% -94.79% | | NativeEntryFactoryBench | bench_entry_factory | 1 | 3 | 15.225mb +0.00% | 53.869ms +0.53% | ±2.07% +318.40% | | TypeDetectorBench | bench_type_detector | 1 | 3 | 59.996mb +0.00% | 437.190ms +0.80% | ±0.31% +48.72% | | TypeDetectorBench | bench_type_detector | 1 | 3 | 14.535mb +0.00% | 87.732ms +1.19% | ±1.00% -16.23% | +-------------------------+----------------------------+------+-----+------------------+------------------+-----------------+ ```