private static void Run(RunOptions options) { var log = new ConsoleLog(); var instance = new CashDBInstance(log); var config = new CashDBConfig { Layer1Path = options.Layer1Path, Layer3Path = string.Empty, Port = 0, // auto-selecting port }; instance.SetupStores(config); instance.SetupNetwork(config); instance.SetupControllers(); try { instance.Start(); Thread.Sleep(500); var localEndpoint = new IPEndPoint(IPAddress.Loopback, instance.Port); DoBenchmark(localEndpoint, log); } finally { instance.Stop(); } }
private static void Init(InitOptions options) { var log = new ConsoleLog(); var config = new CashDBConfig { Layer1Path = options.Layer1Path, Layer3Path = string.Empty, Port = 0, // auto-selecting port }; CashDBInstance.InitializeFiles(config, (long)(options.Layer1SizeInGB * 1e9), log: log); var instance = new CashDBInstance(log); // Inner initialization triggered by 'SetupStores'. instance.SetupStores(config); }