1 /*
2  *  Copyright (c) 2018 The WebM project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #ifndef VPX_TEST_BENCH_H_
12 #define VPX_TEST_BENCH_H_
13 
14 // Number of iterations used to compute median run time.
15 #define VPX_BENCH_ROBUST_ITER 15
16 
17 class AbstractBench {
18  public:
19   void RunNTimes(int n);
20   void PrintMedian(const char *title);
21 
22  protected:
23   // Implement this method and put the code to benchmark in it.
24   virtual void Run() = 0;
25 
26  private:
27   int times_[VPX_BENCH_ROBUST_ITER];
28 };
29 
30 #endif  // VPX_TEST_BENCH_H_
31