doc:scratchpad:benchmark

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revisionBoth sides next revision
doc:scratchpad:benchmark [2009/07/01 21:53] – created a small documentation for the cli benchmark hjalledoc:scratchpad:benchmark [2009/07/01 22:36] – prettyfied hjalle
Line 1: Line 1:
 ===== PHP CLI benchmark ===== ===== PHP CLI benchmark =====
 +The PHP CLI benchmark is a script that runs several algorithms and test runs and gives back results in forms of memory consumption or cache misses depending on which tool that is used. The algorithms that are used are similar (or clones) to the ones used in the V8 javascript benchmark and the Sunspider javascript benchmark. 
 +
  
 Current available tools:  Current available tools: 
Line 13: Line 15:
 ====Example of usage==== ====Example of usage====
  
-bench.php --tool memusage --complog -v+<code>bench.php --tool memusage --complog -v</code>
  
 This would do a benchmark run in two default test-directories (microtests and tests) and print a total memory usage for the run. It will also (with the -v) display each tests memory usage. This would do a benchmark run in two default test-directories (microtests and tests) and print a total memory usage for the run. It will also (with the -v) display each tests memory usage.
 --complog will create a serialized log file that will be useful when comparing runs. The comparison log file will look like "bench_PHPVERSION_TOOL_PID.txt". --complog will create a serialized log file that will be useful when comparing runs. The comparison log file will look like "bench_PHPVERSION_TOOL_PID.txt".
  
-bench.php --tool memusage --path microtests -q --complog+<code>bench.php --tool memusage --path microtests -q --complog</code>
  
 This run will just include the microtests path and be quiet (-q, not produce output). There will be a logfile created after this run that can be used for comparison. This run will just include the microtests path and be quiet (-q, not produce output). There will be a logfile created after this run that can be used for comparison.
  
-bench.php --tool cachegrind --complog+<code>bench.php --tool cachegrind --complog</code>
  
 This will do a cachegrind benchmark and show results of the valgrind tool cachegrind. This requires valgrind. This will do a cachegrind benchmark and show results of the valgrind tool cachegrind. This requires valgrind.
Line 52: Line 54:
  
 To compare the results it's possible to use the --comparison option. In example, if you would like to compare results from 5.X with memory usage the command could be following: To compare the results it's possible to use the --comparison option. In example, if you would like to compare results from 5.X with memory usage the command could be following:
-bench.php --comparison bench_5.*_memusage_*+<code>bench.php --comparison bench_5.*_memusage_*</code>
  
 The results will look like this: The results will look like this:
 <code> <code>
 +bench.php --comparison bench_5.*_memusage_*
 --------------- bench.php Comparison -------------- --------------- bench.php Comparison --------------
 PHP version     PHP uname                           Runtime           Private RSS     PHP version     PHP uname                           Runtime           Private RSS    
Line 69: Line 72:
 This is how the cachegrind comparison looks like currently: This is how the cachegrind comparison looks like currently:
 <code> <code>
 +bench.php --comparison bench_5.*_cachegrind_*
 --------------- bench.php Comparison -------------- --------------- bench.php Comparison --------------
 PHP version     PHP uname                           Branch Mispred.        Instructions         Cache misses         PHP version     PHP uname                           Branch Mispred.        Instructions         Cache misses        
doc/scratchpad/benchmark.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1