summaryrefslogtreecommitdiff
path: root/performance-tests/Synch-Benchmarks/Base_Test/Baseline_Test.h
diff options
context:
space:
mode:
Diffstat (limited to 'performance-tests/Synch-Benchmarks/Base_Test/Baseline_Test.h')
-rw-r--r--performance-tests/Synch-Benchmarks/Base_Test/Baseline_Test.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/performance-tests/Synch-Benchmarks/Base_Test/Baseline_Test.h b/performance-tests/Synch-Benchmarks/Base_Test/Baseline_Test.h
index 31ea8a25ffa..2206db2dbca 100644
--- a/performance-tests/Synch-Benchmarks/Base_Test/Baseline_Test.h
+++ b/performance-tests/Synch-Benchmarks/Base_Test/Baseline_Test.h
@@ -8,19 +8,11 @@
#include "Synch_Lib/Benchmark_Base.h"
-const unsigned long DEFAULT_ITERATIONS = 1000000;
-
class ACE_Svc_Export Baseline_Test_Base : public Benchmark_Base
{
// = TITLE
// This class identifies itself as Benmarking Performance Test class.
public:
- enum {
- TEST_LOCK,
- TEST_READLOCK,
- TEST_WRITELOCK
- };
-
virtual int init (int argc, char *argv[]);
// Standard initializing method for Baseline Test.
@@ -41,6 +33,7 @@ public:
virtual void yield ();
// Yield to other thread.
+ size_t multiply_factor (void);
size_t iteration (void);
// Access methods.
@@ -50,11 +43,11 @@ protected:
int yield_method_;
// Should we your thr_yield or sleep (0).
- size_t iteration_;
- // Total number of operations. <iterations_>
+ size_t multiply_factor_;
+ // Number of operations before yielding to other threads.
- int what_;
- // What test should be performed?
+ size_t iteration_;
+ // Total number of operations. <iterations_> <= <multiply_factor_> * n
};
class ACE_Svc_Export Baseline_Test_Options
@@ -76,7 +69,7 @@ public:
int parse_args (int argc, char *argv[]);
// Parse and set the Baseline_Test options and flags.
- int reset_params (size_t iteration, int yield);
+ int reset_params (size_t mulply_factor, size_t iteration, int yield);
// Reset test parameters for next round.
int test_try_lock (void);
@@ -87,8 +80,12 @@ public:
// Start/stop measuring time.
int inc_loop_counter (void);
+ // Added multiply_factor_ to total_iteration_.
// Returns
+ size_t current_multiply_factor (void);
+ // Return <multiply_factor_>.
+
size_t current_iteration (void);
// Return <iteration_>.
@@ -106,6 +103,9 @@ private:
int current_yield_method_;
// yield or sleep.
+ size_t current_multiply_factor_;
+ // Number loop before performing thread yield.
+
size_t current_iteration_;
// Number of iteration.