Пример #1
0
        static void Main(string[] args)
        {
            Logger.Info("CosmosDb Perf Stress Tester");
            Logger.Info("Initialising...");
            try
            {
                _dbClient = new DocDbClient.CosmosWriteOperations <PerfTestDto>(Config.DataLocation, Config.CosmosConfiguration);
                _dbClient.CreateDocumentCollectionIfNotExists().Wait();
            } catch (Exception ex)
            {
                Logger.Error($"Error initialising: {ex.Message}");
                return;
            }
            Logger.Info("Initialised.");

            var loadRunner = new LoadRunner(_dbClient);

            loadRunner.Run().Wait();
        }
Пример #2
0
 public LoadRunner(DocDbClient.CosmosWriteOperations <PerfTestDto> dbClient)
 {
     _dbClient = dbClient;
 }
 public LoadRunner(DocDbClient.CosmosWriteOperations <PerfTestDto> dbClient)
 {
     _dbClient = dbClient;
     this._pendingTaskCount = Config.Concurrency;
 }