Commit 6ccda3d2 authored by fbarchard@google.com's avatar fbarchard@google.com

Add environment variable for tests to repeat for benchmarking purposes.

BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/796006

git-svn-id: http://libyuv.googlecode.com/svn/trunk@352 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent b8eabfea
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 351
Version: 352
License: BSD
License File: LICENSE
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 351
#define LIBYUV_VERSION 352
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
......@@ -12,6 +12,8 @@
#include <cstring>
#include <stdlib.h> // For getenv()
// Change this to 1000 for benchmarking.
// TODO(fbarchard): Add command line parsing to pass this as option.
#define BENCHMARK_ITERATIONS 1
......@@ -19,6 +21,10 @@
libyuvTest::libyuvTest() : rotate_max_w_(128), rotate_max_h_(128),
benchmark_iterations_(BENCHMARK_ITERATIONS), benchmark_width_(1280),
benchmark_height_(720) {
const char* repeat = getenv("LIBYUV_REPEAT");
if (repeat) {
benchmark_iterations_ = atoi(repeat);
}
}
int main(int argc, char** argv) {
......
......@@ -66,7 +66,7 @@ class libyuvTest : public ::testing::Test {
const int rotate_max_w_;
const int rotate_max_h_;
const int benchmark_iterations_;
int benchmark_iterations_;
const int benchmark_width_;
const int benchmark_height_;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment