From c120273708ca9843d15f4179c924bccc0f133d65 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Tue, 11 Dec 2012 10:05:55 -0600 Subject: ruby: modify the directed tester to read/write streams The directed tester supports only generating only read or only write accesses. The patch modifies the tester to support streams that have both read and write accesses. --- configs/example/ruby_direct_test.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'configs') diff --git a/configs/example/ruby_direct_test.py b/configs/example/ruby_direct_test.py index 1fcad30a9..170e774dc 100644 --- a/configs/example/ruby_direct_test.py +++ b/configs/example/ruby_direct_test.py @@ -52,16 +52,17 @@ parser.add_option("-l", "--requests", metavar="N", default=100, help="Stop after N requests") parser.add_option("-f", "--wakeup_freq", metavar="N", default=10, help="Wakeup every N cycles") -parser.add_option("--test-type", type="string", default="SeriesGetx", - help="SeriesGetx|SeriesGets|Invalidate") +parser.add_option("--test-type", type="choice", default="SeriesGetx", + choices = ["SeriesGetx", "SeriesGets", "SeriesGetMixed", + "Invalidate"], + help = "Type of test") +parser.add_option("--percent-writes", type="int", default=100, + help="percentage of accesses that should be writes") # # Add the ruby specific and protocol specific options # Ruby.define_options(parser) - -execfile(os.path.join(config_root, "common", "Options.py")) - (options, args) = parser.parse_args() if args: @@ -73,10 +74,13 @@ if args: # if options.test_type == "SeriesGetx": generator = SeriesRequestGenerator(num_cpus = options.num_cpus, - issue_writes = True) + percent_writes = 100) elif options.test_type == "SeriesGets": generator = SeriesRequestGenerator(num_cpus = options.num_cpus, - issue_writes = False) + percent_writes = 0) +elif options.test_type == "SeriesGetMixed": + generator = SeriesRequestGenerator(num_cpus = options.num_cpus, + percent_writes = options.percent_writes) elif options.test_type == "Invalidate": generator = InvalidateGenerator(num_cpus = options.num_cpus) else: -- cgit v1.2.3