diff options
author | DRC <information@virtualgl.org> | 2015-02-21 11:57:27 -0600 |
---|---|---|
committer | DRC <information@virtualgl.org> | 2015-02-25 13:54:35 -0600 |
commit | 4631a76c1baf5be23f33075dc993a1231db564af (patch) | |
tree | 3139c5370309c3ab78db841b772df5c041e617b0 /tests/encperf.cxx | |
parent | 77be929e03e859494a9172cb1723a4cfb8c79231 (diff) | |
download | tigervnc-4631a76c1baf5be23f33075dc993a1231db564af.tar.gz tigervnc-4631a76c1baf5be23f33075dc993a1231db564af.zip |
encperf: allow # of iterations to be specified
Diffstat (limited to 'tests/encperf.cxx')
-rw-r--r-- | tests/encperf.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/encperf.cxx b/tests/encperf.cxx index 4112a37e..ffa30473 100644 --- a/tests/encperf.cxx +++ b/tests/encperf.cxx @@ -49,6 +49,7 @@ static rfb::IntParameter width("width", "Frame buffer width", 0); static rfb::IntParameter height("height", "Frame buffer height", 0); +static rfb::IntParameter count("count", "Number of benchmark iterations", 9); static rfb::StringParameter format("format", "Pixel format (e.g. bgr888)", ""); @@ -368,8 +369,6 @@ static void sort(double *array, int count) } while (!sorted); } -static const int runCount = 9; - static void usage(const char *argv0) { fprintf(stderr, "Syntax: %s [options] <rfb file>\n", argv0); @@ -384,10 +383,6 @@ int main(int argc, char **argv) const char *fn; - double times[runCount], dev[runCount]; - double median, meddev, ratio; - unsigned long long bytes, equivalent; - fn = NULL; for (i = 1; i < argc; i++) { if (rfb::Configuration::setParam(argv[i])) @@ -409,6 +404,11 @@ int main(int argc, char **argv) fn = argv[i]; } + int runCount = count; + double times[runCount], dev[runCount]; + double median, meddev, ratio; + unsigned long long bytes, equivalent; + if (fn == NULL) { fprintf(stderr, "No file specified!\n\n"); usage(argv[0]); |