Пример #1
0
        /// <exception cref="System.IO.IOException"/>
        public static void Main(string[] argv)
        {
            TestTFileSeek testCase = new TestTFileSeek();

            TestTFileSeek.MyOptions options = new TestTFileSeek.MyOptions(argv);
            if (options.proceed == false)
            {
                return;
            }
            testCase.options = options;
            testCase.SetUp();
            testCase.TestSeeks();
            testCase.TearDown();
        }
Пример #2
0
 /// <exception cref="System.IO.IOException"/>
 protected override void SetUp()
 {
     if (options == null)
     {
         options = new TestTFileSeek.MyOptions(new string[0]);
     }
     conf = new Configuration();
     conf.SetInt("tfile.fs.input.buffer.size", options.fsInputBufferSize);
     conf.SetInt("tfile.fs.output.buffer.size", options.fsOutputBufferSize);
     path      = new Path(new Path(options.rootDir), options.file);
     fs        = path.GetFileSystem(conf);
     timer     = new NanoTimer(false);
     rng       = new Random(options.seed);
     keyLenGen = new RandomDistribution.Zipf(new Random(rng.NextLong()), options.minKeyLen
                                             , options.maxKeyLen, 1.2);
     RandomDistribution.DiscreteRNG valLenGen = new RandomDistribution.Flat(new Random
                                                                                (rng.NextLong()), options.minValLength, options.maxValLength);
     RandomDistribution.DiscreteRNG wordLenGen = new RandomDistribution.Flat(new Random
                                                                                 (rng.NextLong()), options.minWordLen, options.maxWordLen);
     kvGen = new KVGenerator(rng, true, keyLenGen, valLenGen, wordLenGen, options.dictSize
                             );
 }