FaSe22 / phpalgorithms

learning basics...
1 stars 0 forks source link

Actions fail #9

Closed dimitrijjedich closed 1 week ago

dimitrijjedich commented 2 weeks ago

This seems to be a problem for a long time already. My initial investigation yielded the following errror running the command locally:

vendor/bin/phpbench run --report=chart --retry-threshold=5 --output=build-artifact
PHPBench (1.2.14) running benchmarks... #standwithukraine
with configuration file: /Users/dimitrijjedich/GitHub/phpalgorithms/phpbench.json
with PHP version 8.3.13, xdebug ❌, opcache ❌

\Benchmark\InsertionsortBench

    benchInsertionsort # 100................R2 I2 - Mo185.197μs (±2.85%)
    benchInsertionsort # 1000...............R2 I4 - Mo13.460ms (±1.69%)
    benchInsertionsort # 10000..............R1 I2 - Mo1.418s (±1.69%)

\Tests\Benchmark\BubblesortBench

    benchBubblesort # 100,1.................R5 I4 - Mo402.639μs (±2.97%)
    benchBubblesort # 1000,1................R3 I4 - Mo34.204ms (±1.47%)
    benchBubblesort               ERROR.....R3 I0 
    benchBubblesort # 100,2.................R2 I2 - Mo507.120μs (±2.32%)
    benchBubblesort # 1000,2................R2 I4 - Mo44.688ms (±1.99%)
    benchBubblesort               ERROR.....R2 I0 
    benchBubblesort # 100,3.................R1 I3 - Mo367.339μs (±2.49%)
    benchBubblesort # 1000,3................R2 I1 - Mo28.041ms (±2.01%)
    benchBubblesort               ERROR.....R2 I0 
    benchBubblesort # 100,4.................R2 I3 - Mo661.654μs (±1.80%)
    benchBubblesort # 1000,4................R1 I1 - Mo58.381ms (±1.97%)
    benchBubblesort               ERROR.....R1 I0 
    benchBubblesort # 100,5.................R1 I1 - Mo734.738μs (±3.14%)
    benchBubblesort # 1000,5................R2 I4 - Mo67.037ms (±2.29%)
    benchBubblesort               ERROR.....R2 I0 

5 subjects encountered errors:

\Tests\Benchmark\BubblesortBench::benchBubblesort

    The process "'/usr/local/Cellar/php/8.3.13_1/bin/php' -dmax_execution_time=0 '/private/var/folders/7p/4zz73x4139sgb0byf966kgkw0000gn/T/PhpBenchTbj10e'" exceeded the timeout of 10 seconds.

\Tests\Benchmark\BubblesortBench::benchBubblesort

    The process "'/usr/local/Cellar/php/8.3.13_1/bin/php' -dmax_execution_time=0 '/private/var/folders/7p/4zz73x4139sgb0byf966kgkw0000gn/T/PhpBenchrI2cDY'" exceeded the timeout of 10 seconds.

\Tests\Benchmark\BubblesortBench::benchBubblesort

    The process "'/usr/local/Cellar/php/8.3.13_1/bin/php' -dmax_execution_time=0 '/private/var/folders/7p/4zz73x4139sgb0byf966kgkw0000gn/T/PhpBenchJecJgt'" exceeded the timeout of 10 seconds.

\Tests\Benchmark\BubblesortBench::benchBubblesort

    The process "'/usr/local/Cellar/php/8.3.13_1/bin/php' -dmax_execution_time=0 '/private/var/folders/7p/4zz73x4139sgb0byf966kgkw0000gn/T/PhpBenchztMWdH'" exceeded the timeout of 10 seconds.

\Tests\Benchmark\BubblesortBench::benchBubblesort

    The process "'/usr/local/Cellar/php/8.3.13_1/bin/php' -dmax_execution_time=0 '/private/var/folders/7p/4zz73x4139sgb0byf966kgkw0000gn/T/PhpBenchGh4yUs'" exceeded the timeout of 10 seconds.

Subjects: 2, Assertions: 0, Failures: 0, Errors: 5

Tested solution:

By adding this line to the phpbench.json Should have impact on the timeout error:

  "runner.timeout": 30,

The error pasted above did occure anyway with the timeout of 10 seconds, so this seems to be the wrong usage of the config

FaSe22 commented 1 week ago

Hab die größten Testdatensätze aus den Tests entfernt, womit sie wieder in der Zeit durchlaufen :)

dimitrijjedich commented 1 week ago

Fair enough. Ich würde das Issue als closed belassen und bei Gelegenheit jedoch nen Deepdive in phpbench machen um zu schauen wie das funktioniert um das gegebenenfalls doch zum laufen zu krigen. Die Urspruchsidee war ja, dass man am Ende schaut, wie sich die Algorithmen im Vergleich bei verschiedenen Größen von Arrays verhalten.