예제 #1
0
        static void Main(string[] args)
        {
            File.Delete(@"C:\temp\log.txt");
            var config = new ClientConfiguration
            {
                Servers = new List<Uri>
                {
                    new Uri("http://127.0.0.1:8091/pools")
                },
                PoolConfiguration = new PoolConfiguration
                {
                    MaxSize = 2,
                    MinSize = 1
                },
                UseSsl = false
            };

            using (_cluster = new CouchbaseCluster(config))
            {
                using (var bucket = _cluster.OpenBucket("default"))
                {
                    const int n = 100000;
                    using (var timer = new OperationTimer())
                    {
                        //ThreadPoolInsert(bucket, n);
                        //ThreadPoolInsert(bucket, n);
                        //SynchronousInsert(bucket, n);
                        //ParallerInsert(bucket, n);
                        MultiThreaded(8, n, bucket);
                    }
                }
            }
            Console.Read();
        }
예제 #2
0
        static void Main(string[] args)
        {
            int n = 100000;

            using (var timer = new OperationTimer())
            {
                //SynchronousInsert(Client, n);
                ParallerInsert(Client, n);
            }
            Console.Read();
        }