Example #1
0
        public FASTER_YcsbBenchmark(int threadCount_, int numaStyle_, string distribution_, int readPercent_)
        {
            threadCount  = threadCount_;
            numaStyle    = numaStyle_;
            distribution = distribution_;
            readPercent  = readPercent_;

#if DASHBOARD
            statsWritten = new AutoResetEvent[threadCount];
            for (int i = 0; i < threadCount; i++)
            {
                statsWritten[i] = new AutoResetEvent(false);
            }
            threadThroughput     = new double[threadCount];
            threadAverageLatency = new double[threadCount];
            threadMaximumLatency = new double[threadCount];
            threadProgress       = new long[threadCount];
            writeStats           = new bool[threadCount];
            freq = HiResTimer.EstimateCPUFrequency();
#endif

            device = FASTERFactory.CreateLogDevice("C:\\data\\hlog");

#if USE_CODEGEN
            store = FASTERFactory.Create <Key, Value, Input, Output, Context, Functions, IFASTER>
#else
            store = new FasterKV
#endif
                        (kMaxKey / 2, device);
        }
Example #2
0
        public ConcurrentDictionary_YcsbBenchmark(int threadCount_, int numaStyle_, string distribution_, int readPercent_)
        {
            threadCount  = threadCount_;
            numaStyle    = numaStyle_;
            distribution = distribution_;
            readPercent  = readPercent_;

#if DASHBOARD
            statsWritten = new AutoResetEvent[threadCount];
            for (int i = 0; i < threadCount; i++)
            {
                statsWritten[i] = new AutoResetEvent(false);
            }
            threadThroughput     = new double[threadCount];
            threadAverageLatency = new double[threadCount];
            threadMaximumLatency = new double[threadCount];
            threadProgress       = new long[threadCount];
            writeStats           = new bool[threadCount];
            freq = HiResTimer.EstimateCPUFrequency();
#endif


            store = new ConcurrentDictionary <Key, Value>(threadCount, kMaxKey, new KeyComparer());
        }