Re: Are there a complex set of benchmarking similar to lmbench, fsbench... for images?

Bob Friesenhahn <[email protected]>
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <[email protected]>
On Wed, 28 Dec 2016, timofonic timofonic wrote:

> That's what I meant. It's easy for one use case, but not for too many use cases.
>
> The ultimate goal would be to make a benchmarking for too many use
> cases, in order to compare them.

A "use case" might be one GM command or several commands.  If it is 
several commands then the 'batch' feature can help by executing 
several sub-commands in one invocation.  The benchmark subcommand is 
very useful in that it can repeat the command a specified number of 
times or execute the command until a certain amount of time has been 
reached. If commands complete quickly then it is necessary to repeat 
them many times in order to obtain an accurate measurement.

There are a huge number of operations which may be performed and since 
the operations can be aribitrarily chained, you will need to think up 
the "use cases" you want to test.

Benchmarking itself is pretty easy since it is just a matter of 
execting commands and seeing how much time and/or resources were 
consumed.

Under Linux, '/usr/bin/time -v command' provides considerable 
details.  For example:

~~~~~~~~~~~~~~~~~~~~~~~~~~~

% /usr/bin/time -v gm convert logo: -gaussian 0x3 null:
         Command being timed: "gm convert logo: -gaussian 0x3 null:"
         User time (seconds): 0.96
         System time (seconds): 0.00
         Percent of CPU this job got: 389%
         Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.24
         Average shared text size (kbytes): 0
         Average unshared data size (kbytes): 0
         Average stack size (kbytes): 0
         Average total size (kbytes): 0
         Maximum resident set size (kbytes): 10172
         Average resident set size (kbytes): 0
         Major (requiring I/O) page faults: 0
         Minor (reclaiming a frame) page faults: 2338
         Voluntary context switches: 23
         Involuntary context switches: 58
         Swaps: 0
         File system inputs: 0
         File system outputs: 0
         Socket messages sent: 0
         Socket messages received: 0
         Signals delivered: 0
         Page size (bytes): 4096
         Exit status: 0

~~~~~~~~~~~~~~~~~~~~~~~~~~

Bob
-- 
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.