github.com/kaydxh/golang@v0.0.131/pkg/gocv/cgo/third_path/graphics-magick/share/doc/GraphicsMagick/www/benchmark.html (about)

     1  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
     2    "http://www.w3.org/TR/html4/loose.dtd">
     3  <html>
     4  <head>
     5  	<meta HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=us-ascii">
     6  	<title>GraphicsMagick GM Utility</title>
     7  	<style type=text/css>
     8  	<!--
     9  		@page { size: 8.5in 11in }
    10  		TD P { color: #000000; font-family: "Verdana", "Arial", "Helvetica", sans-serif; font-size: 12pt }
    11  		P { color: #000000; font-family: "Verdana", "Arial", "Helvetica", sans-serif; font-size: 12pt }
    12  		A:link { color: #00B04F }
    13  		A:visited { color: #007B37 }
    14  	-->
    15  	</style>
    16  
    17  </head>
    18  <body LANG="en-US" TEXT="#000000" LINK="#00B04F" VLINK="#007B37" BGCOLOR="#ffffff">
    19  <a name="top"></a>
    20  <table border=0 cellpadding=10 cellspacing=0 style="margin-top:-17px" width="100%"><tr><td>
    21  <br>&nbsp;<br>
    22  <table BORDER=0 WIDTH="100%"> 
    23  <tr> 
    24  <td ALIGN=LEFT bgcolor="#FFFFFF"><img 
    25  SRC="images/right_triangle.png"  ALT=">" BORDER=0 
    26  height=14 width=15><b><font face="Helvetica, Arial"><font 
    27  color="#00B04F"><font size="+1">
    28  <a NAME="benchmark"></a>gm benchmark
    29  </font></font></font></b></td></tr></table>
    30  <table width="94%" border="0" cellspacing="0" cellpadding="8">
    31  <tr><td width="3%"><br></td><td>
    32  <table BORDER=0 WIDTH="100%"> 
    33  <tr> 
    34  <td ALIGN=LEFT bgcolor="#FFFFFF"><img 
    35  SRC="images/right_triangle.png"  ALT=">" BORDER=0 
    36  height=14 width=15><b><font face="Helvetica, Arial"><font 
    37  color="#00B04F"><font size="+1">
    38  <a NAME="bench-top"></a>NAME
    39  </font></font></font></b></td></tr></table>
    40  <table width="94%" border="0" cellspacing="0" cellpadding="8">
    41  <tr><td width="3%"><br></td><td>
    42  benchmark - benchmark the execution of a gm command
    43  </td></tr></table>
    44  <table BORDER=0 WIDTH="100%"> 
    45  <tr> 
    46  <td ALIGN=LEFT bgcolor="#FFFFFF"><img 
    47  SRC="images/right_triangle.png"  ALT=">" BORDER=0 
    48  height=14 width=15><b><font face="Helvetica, Arial"><font 
    49  color="#00B04F"><font size="+1">
    50  <a NAME="bench-contents"></a>Contents
    51  </font></font></font></b></td></tr></table>
    52  <table width="94%" border="0" cellspacing="0" cellpadding="8">
    53  <tr><td width="3%"><br></td><td>
    54  <dl>
    55  <dt>
    56  <a href="#bench-syno">Synopsis</a>
    57  </dt>
    58  <dt>
    59  <a href="#bench-desc">Description</a>
    60  </dt>
    61  <dt>
    62  <a href="#bench-exam">Examples</a>
    63  </dt>
    64  <dt>
    65  <a href="#bench-opti">Options</a>
    66  </dt>
    67  </dl>
    68  </td></tr></table>
    69  <table BORDER=0 WIDTH="100%"> 
    70  <tr> 
    71  <td ALIGN=LEFT bgcolor="#FFFFFF"><img 
    72  SRC="images/right_triangle.png"  ALT=">" BORDER=0 
    73  height=14 width=15><b><font face="Helvetica, Arial"><font 
    74  color="#00B04F"><font size="+1">
    75  <a NAME="bench-syno"></a>Synopsis
    76  </font></font></font></b></td></tr></table>
    77  <table width="94%" border="0" cellspacing="0" cellpadding="8">
    78  <tr><td width="3%"><br></td><td>
    79  <p>
    80  <strong>gm benchmark</strong> <strong>[</strong> <em>options ...</em> <strong>]</strong> <em>command</em>
    81  </td></tr></table>
    82  <table BORDER=0 WIDTH="100%"> 
    83  <tr> 
    84  <td ALIGN=LEFT bgcolor="#FFFFFF"><img 
    85  SRC="images/right_triangle.png"  ALT=">" BORDER=0 
    86  height=14 width=15><b><font face="Helvetica, Arial"><font 
    87  color="#00B04F"><font size="+1">
    88  <a NAME="bench-desc"></a>Description
    89  </font></font></font></b></td></tr></table>
    90  <table width="94%" border="0" cellspacing="0" cellpadding="8">
    91  <tr><td width="3%"><br></td><td>
    92  <p>
    93  <strong>benchmark</strong> executes an arbitrary <strong>gm</strong> utility command
    94  (e.g. <strong>convert</strong>) for one or more loops, and/or a specified
    95  execution time, and reports many execution metrics.  For builds using
    96  OpenMP, a mode is provided to execute the benchmark with an increasing
    97  number of threads and provide a report of speedup and multi-thread
    98  execution efficiency.  If <strong>benchmark</strong> is used to execute a
    99  command without any additional benchmark options, then the command is
   100  run once.
   101  </td></tr></table>
   102  <table BORDER=0 WIDTH="100%"> 
   103  <tr> 
   104  <td ALIGN=LEFT bgcolor="#FFFFFF"><img 
   105  SRC="images/right_triangle.png"  ALT=">" BORDER=0 
   106  height=14 width=15><b><font face="Helvetica, Arial"><font 
   107  color="#00B04F"><font size="+1">
   108  <a NAME="bench-exam"></a>Examples
   109  </font></font></font></b></td></tr></table>
   110  <table width="94%" border="0" cellspacing="0" cellpadding="8">
   111  <tr><td width="3%"><br></td><td>
   112  <p>To obtain benchmark information for a single execution of a
   113  command:
   114  <pre>
   115    % gm benchmark convert input.ppm -gaussian 0x1 output.ppm
   116    Results: 32 threads 1 iter 6.20s user 0.41s total 2.439 iter/s 0.161 iter/cpu
   117  </pre>
   118  <p>To obtain benchmark information from 100 iterations of the
   119  command:
   120  <pre>
   121    % gm benchmark -iterations 100 convert input.ppm -gaussian 0x1 output.ppm
   122    Results: 32 threads 100 iter 625.40s user 31.74s total 3.151 iter/s 0.160 iter/cpu
   123  </pre>
   124  <p>To obtain benchmark information by iterating the command until a
   125  specified amount of time (in seconds) has been consumed:
   126  <pre>
   127    % gm benchmark -duration 30 convert input.ppm -gaussian 0x1 output.ppm
   128    Results: 32 threads 91 iter 587.33s user 30.30s total 3.003 iter/s 0.155 iter/cpu
   129  </pre>
   130  <p>To obtain a full performance report with an increasing number of
   131  threads (1-32 threads, stepping the number of threads by four each
   132  time):
   133  <pre>
   134    % gm benchmark -duration 3 -stepthreads 4 convert input.ppm -gaussian 0x2 output.ppm
   135    Results: 1 threads 1 iter 8.84s user 8.84s total 0.113 iter/s 0.113 iter/cpu 1.00 speedup 1.000 karp-flatt
   136    Results: 4 threads 2 iter 18.37s user 4.89s total 0.409 iter/s 0.109 iter/cpu 3.62 speedup 0.035 karp-flatt
   137    Results: 8 threads 3 iter 29.81s user 4.09s total 0.733 iter/s 0.101 iter/cpu 6.48 speedup 0.033 karp-flatt
   138    Results: 12 threads 3 iter 30.81s user 3.14s total 0.955 iter/s 0.097 iter/cpu 8.45 speedup 0.038 karp-flatt
   139    Results: 16 threads 3 iter 35.02s user 3.01s total 0.997 iter/s 0.086 iter/cpu 8.81 speedup 0.054 karp-flatt
   140    Results: 20 threads 4 iter 52.92s user 3.53s total 1.133 iter/s 0.076 iter/cpu 10.02 speedup 0.052 karp-flatt
   141    Results: 24 threads 4 iter 60.66s user 3.39s total 1.180 iter/s 0.066 iter/cpu 10.43 speedup 0.057 karp-flatt
   142    Results: 28 threads 4 iter 73.10s user 3.35s total 1.194 iter/s 0.055 iter/cpu 10.56 speedup 0.061 karp-flatt
   143    Results: 32 threads 4 iter 82.10s user 3.09s total 1.294 iter/s 0.049 iter/cpu 11.44 speedup 0.058 karp-flatt
   144  </pre>
   145  <p>Here is the interpretation of the output:
   146  <ul>
   147  <li><strong>threads</strong> - number of threads used.
   148  <li><strong>iter</strong> - number of command iterations executed.
   149  <li><strong>user</strong> - total user time consumed.
   150  <li><strong>total</strong> - total elapsed time consumed.
   151  <li><strong>iter/s</strong> - number of command iterations per second.
   152  <li><strong>iter/cpu</strong> - amount of CPU time consumed per iteration.
   153  <li><strong>speedup</strong> - speedup compared with one thread.
   154  <li><strong>karp-flatt</strong> - Karp-Flatt measure of speedup efficiency.
   155  </ul>
   156  <p><em>Please note that the reported "speedup" is based on the
   157  execution time of just one thread.  A preliminary warm-up pass is used
   158  before timing the first loop in order to ensure that the CPU is
   159  brought out of power-saving modes and that system caches are warmed
   160  up.  Most modern CPUs provide a "turbo" mode where the CPU clock speed
   161  is increased (e.g. by a factor of two) when only one or two cores are
   162  active.  If the CPU grows excessively hot (due to insufficient
   163  cooling), then it may dial back its clock rates as a form of thermal
   164  management.  These factors result in an under-reporting of speedup
   165  compared to if "turbo" mode was disabled and the CPU does not need to
   166  worry about thermal management.  The <strong>powertop</strong> utility available
   167  under Linux and Solaris provides a way to observe CPU core clock rates
   168  while a benchmark is running.</em>
   169  </td></tr></table>
   170       <p>
   171  <i><a href="#top">Back to Contents</a></i> 
   172  &nbsp;</p>
   173  <table BORDER=0 WIDTH="100%"> 
   174  <tr> 
   175  <td ALIGN=LEFT bgcolor="#FFFFFF"><img 
   176  SRC="images/right_triangle.png"  ALT=">" BORDER=0 
   177  height=14 width=15><b><font face="Helvetica, Arial"><font 
   178  color="#00B04F"><font size="+1">
   179  <a NAME="bench-opti"></a>Options
   180  </font></font></font></b></td></tr></table>
   181  <table width="94%" border="0" cellspacing="0" cellpadding="8">
   182  <tr><td width="3%"><br></td><td>
   183  <p> Options are processed from left to right and must appear before
   184  any argument.
   185  <table BORDER=0 WIDTH="94%">
   186  <tr>
   187  <td width="3%"><br></td> 
   188  <td ALIGN=LEFT BGCOLOR="#FFFFFF">
   189  <img SRC="images/right_triangle_option.png"
   190  ALT=">" BORDER=0 height=14
   191  width=15><b><font face="Helvetica, Arial"
   192  ><font color="#00B04F"><font size="+1">
   193      -duration <i>duration</i>
   194  </font></font></font></b></td></tr></table>
   195  <table width="90%" border="0" cellspacing="0"              cellpadding="8">              <tr><td width="6%"><br></td><td>duration to run benchmark</td></tr></table>
   196  <table width="90%" border="0" cellspacing="0"             cellpadding="8">             <tr><td width="6%"><br></td><td><font size="-1">Specify the number of seconds to run the benchmark. The command is
   197  executed repeatedly until the specified amount of time has
   198  elapsed.</font></td></tr></table>
   199  <table BORDER=0 WIDTH="94%">
   200  <tr>
   201  <td width="3%"><br></td> 
   202  <td ALIGN=LEFT BGCOLOR="#FFFFFF">
   203  <img SRC="images/right_triangle_option.png"
   204  ALT=">" BORDER=0 height=14
   205  width=15><b><font face="Helvetica, Arial"
   206  ><font color="#00B04F"><font size="+1">
   207      -help
   208  </font></font></font></b></td></tr></table>
   209  <table width="90%" border="0" cellspacing="0"             cellpadding="8">             <tr><td width="6%"><br></td><td><font size="-1">
   210  Prints benchmark command help.</font></td></tr></table>
   211  <table BORDER=0 WIDTH="94%">
   212  <tr>
   213  <td width="3%"><br></td> 
   214  <td ALIGN=LEFT BGCOLOR="#FFFFFF">
   215  <img SRC="images/right_triangle_option.png"
   216  ALT=">" BORDER=0 height=14
   217  width=15><b><font face="Helvetica, Arial"
   218  ><font color="#00B04F"><font size="+1">
   219      -iterations <i>loops</i>
   220  </font></font></font></b></td></tr></table>
   221  <table width="90%" border="0" cellspacing="0"              cellpadding="8">              <tr><td width="6%"><br></td><td>number of command iterations</td></tr></table>
   222  <table width="90%" border="0" cellspacing="0"             cellpadding="8">             <tr><td width="6%"><br></td><td><font size="-1">Specify the number of iterations to run the benchmark. The command
   223  is executed repeatedly until the specified number of iterations has
   224  been reached.</font></td></tr></table>
   225  <table BORDER=0 WIDTH="94%">
   226  <tr>
   227  <td width="3%"><br></td> 
   228  <td ALIGN=LEFT BGCOLOR="#FFFFFF">
   229  <img SRC="images/right_triangle_option.png"
   230  ALT=">" BORDER=0 height=14
   231  width=15><b><font face="Helvetica, Arial"
   232  ><font color="#00B04F"><font size="+1">
   233      -rawcsv
   234  </font></font></font></b></td></tr></table>
   235  <table width="90%" border="0" cellspacing="0"              cellpadding="8">              <tr><td width="6%"><br></td><td>Print results in CSV format</td></tr></table>
   236  <table width="90%" border="0" cellspacing="0"             cellpadding="8">             <tr><td width="6%"><br></td><td><font size="-1">Print results in a comma-separated value (CSV) format which is easy
   237  to parse for plotting or importing into a spreadsheet or database.
   238  The values reported are <strong>threads</strong>, <strong>iterations</strong>,
   239  <strong>user_time</strong>, and <strong>elapsed_time</strong>.</font></td></tr></table>
   240  <table BORDER=0 WIDTH="94%">
   241  <tr>
   242  <td width="3%"><br></td> 
   243  <td ALIGN=LEFT BGCOLOR="#FFFFFF">
   244  <img SRC="images/right_triangle_option.png"
   245  ALT=">" BORDER=0 height=14
   246  width=15><b><font face="Helvetica, Arial"
   247  ><font color="#00B04F"><font size="+1">
   248      -stepthreads <i>step</i>
   249  </font></font></font></b></td></tr></table>
   250  <table width="90%" border="0" cellspacing="0"              cellpadding="8">              <tr><td width="6%"><br></td><td>execute a per-thread benchmark ramp</td></tr></table>
   251  <table width="90%" border="0" cellspacing="0"             cellpadding="8">             <tr><td width="6%"><br></td><td><font size="-1"> Execute a per-thread benchmark ramp, incrementing the number of
   252  threads at each step by the specified value.  The maximum number of
   253  threads is taken from the standard <tt>OMP_NUM_THREADS</tt>
   254  environment variable.</font></td></tr></table>
   255  </td></tr></table>
   256       <p>
   257  <i><a href="#top">Back to Contents</a></i> 
   258  &nbsp;</p>
   259  </td></tr></table>