Exemplo n.º 1
0
        private static void CassandraInsert()
        {
            var config = new CassandraOptions();

            config.Url          = "localhost";
            config.DatabaseName = "MembersStore";

            var service = new JsonCassandraService(config);

            service.CreateTable();

            var members = MemberHelpers.GetRandomCassandraJsonMembers(100000);

            var time = System.Diagnostics.Stopwatch.StartNew();

            foreach (var member in members)
            {
                service.CreateAsync(member);
            }

            time.Stop();
            Console.WriteLine($"Tempo de Execução do Insert:{time.ElapsedMilliseconds}");
        }