command.c: gm benchmark iterations and duration
"Nguyen Vu Hung" <[email protected]> Thu, 28 Aug 2008 19:21:05 +0900
| Newsgroups | gmane.comp.video.graphicsmagick.core |
|---|---|
| Message-ID | <[email protected]> |
Hi,
gm benchmark has 2 options, but we can use only one of them.
I think we should state this in "gm benchmark -help":
static void BenchmarkUsage(void)
{
static const char
*options[]=
{
"-duration duration duration to run the benchmark (in seconds)",
"-iterations loops number of iterations to execute",
"Note that you can only specify one of the parameters, not both at a
time"
(char *) NULL
};
[snip]
}
And in function BenchmarkImageCommand, as of 1.3 now, the benchmark results
are as follows:
# magick/command.c
MagickExport unsigned int BenchmarkImageCommand(ImageInfo *image_info, int
argc,char **argv,char **metadata,ExceptionInfo *exception) {
[snip]
(void) printf("Results: %ld iter %.2fs user %.2fs total %.2f iter/s
(%.2f iter/s cpu)\n",
iteration,user_time,elapsed_time,rate_total,rate_cpu);
[snip]
}
but I think sometimes average time is not enough, we need to know deviation
of times
to see how balance the elapsed time is.
Iteration per second ( iter/s) is not as intuitive as s/iter( Average time
for one iteration- i.e one
benchmark command - to be done).
If anyone think it worths, I can do the code.
------
CF. gm benchmarck output:
[vuhung@tmp]$gm benchmark -duration 30 -iterations 2 convert real_1.png
real_1.jpg
Results: 1 iter 0.00s user 0.00s total 1000000000000.000 iter/s
gm benchmark: Unrecognized command 'iterations'. Use -help for a usage
summary or see manual..
[vuhung@tmp]$gm benchmark -help
GraphicsMagick 1.1.10 2007-09-19 Q8 http://www.GraphicsMagick.org/
Copyright (C) 2002-2007 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Usage: gm benchmark options command ...
Where options include one of:
-duration duration duration to run the benchmark (in seconds)
-iterations loops number of iterations to execute
Followed by some other GraphicsMagick command
gm benchmark: Improper arguments supplied, please see manual.
[vuhung@tmp]$
[vuhung@aoclife tmp]$ gm benchmark -iterations 2 convert uen_5710.jpg
uen_5710.png
arg: -iterations
iterations = 2
Results: 2 iter 24.95s user 24.97s total 0.08 iter/s (0.08 iter/s cpu)
[vuhung@aoclife tmp]$ time gm convert uen_5710.jpg uen_5710.png
--
Best Regards,
Nguyen Hung Vu ( Nguyễn Vũ Hưng )
vuhung16plus{remove}@gmail.dot.com
<vuhung16plus%7Bremove%[email protected]>, YIM: vuhung16 , Skype:
vuhung16dg
Japan through an eye of a gaijin:
http://www.flickr.com/photos/vuhung/tags/fav/
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Graphicsmagick-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-core