static void LoadDataWithSyncForCassandra(string filename, int nThread, VersionDb vdb) { List <VersionDb> vdbList = new List <VersionDb>(); for (int i = 0; i < nThread; i++) { vdbList.Add(vdb); } YCSBBenchmarkTest sync_test = new YCSBBenchmarkTest(0, 0, vdb); sync_test.LoadDataWithMultiThreads(filename, vdbList, nThread); }
public static void YCSBSyncTestWithCassandra(string[] args) { string[] contactPoints = { "127.0.0.1" }; int replicationFactor = 1; int workerCount = 1; int taskCountPerWorker = 1000; string dataFile = "ycsb_data_r.in"; string operationFile = "ycsb_ops_r.in"; int i = 1; while (i < args.Length) { switch (args[i++]) { case "--contacts": contactPoints = args[i++].Split(','); break; case "--repfactor": replicationFactor = int.Parse(args[i++]); break; case "--workers": workerCount = int.Parse(args[i++]); break; case "--tasks": taskCountPerWorker = int.Parse(args[i++]); break; case "--data": dataFile = args[i++]; break; case "--ops": operationFile = args[i++]; break; default: break; } } //Console.WriteLine("contact points: " + contactPoints.Length); //Console.WriteLine("replica: " + replicationFactor); //Console.WriteLine("worker: " + workerCount); //Console.WriteLine("taskPerWorker: " + taskCountPerWorker); //Console.WriteLine("data: " + dataFile); //Console.WriteLine("ops: " + operationFile); //return; // Cassandra version db int maxVdbCnt = 8192; List <VersionDb> vdbList = new List <VersionDb>(); for (int j = 0; j < maxVdbCnt; j++) { vdbList.Add(CassandraVersionDb.Instance(1, j)); } YCSBBenchmarkTest test = new YCSBBenchmarkTest(0, 0, vdbList[0]); test.LoadDataWithMultiThreads(dataFile, vdbList, 1); // run //test.rerun(1, 5000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(2, 5000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(4, 5000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(8, 5000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(16, 5000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(32, 5000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(64, 5000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(128, 2000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(64, 2000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(256, 1000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(512, 500, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(1024, 250, operationFile, vdbList); //Console.WriteLine("*****************************************************"); test.rerun(2048, 125, operationFile, vdbList); Console.WriteLine("*****************************************************"); test.rerun(4096, 50, operationFile, vdbList); Console.WriteLine("*****************************************************"); test.rerun(8192, 25, operationFile, vdbList); Console.WriteLine("*****************************************************"); //Console.WriteLine("done"); //Console.ReadLine(); }
public static void YCSBSyncTestWithPartitionedCassandra(string[] args) { int workerCount = 1; int taskCountPerWorker = 1000; string dataFile = "ycsb_data_r.in"; string operationFile = "ycsb_ops_r.in"; // Cassandra version db int maxVdbCnt = 8192; List <VersionDb> vdbList = new List <VersionDb>(); for (int j = 0; j < maxVdbCnt; j++) { vdbList.Add(PartitionedCassandraVersionDb.Instance(1, "127.0.0.1", 1, ConsistencyLevel.One)); } YCSBBenchmarkTest test = new YCSBBenchmarkTest(0, 0, vdbList[0]); test.LoadDataWithMultiThreads(dataFile, vdbList, 10); // run //test.rerun(1, 5000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(2, 5000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(4, 5000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(8, 5000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(16, 5000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(32, 5000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(64, 5000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(128, 2000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(64, 2000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(256, 1000, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(512, 500, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(1024, 250, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(2048, 125, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(4096, 50, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //test.rerun(8192, 25, operationFile, vdbList); //Console.WriteLine("*****************************************************"); //Console.WriteLine("done"); //Console.ReadLine(); }