Skip to content
This repository
Browse code

testing stuff

  • Loading branch information...
commit 9eda5ee046f3d83ac6207da791d01be52303ffa1 1 parent 9b038c8
Attila Kiskó authored

Showing 1 changed file with 36 additions and 0 deletions. Show diff stats Hide diff stats

  1. +36 0 TestApp/Program.cs
36 TestApp/Program.cs
@@ -19,6 +19,41 @@ static void Main(string[] args)
19 19 {
20 20 log4net.Config.XmlConfigurator.Configure();
21 21
  22 + var emcc = new MemcachedClientConfiguration();
  23 + emcc.AddServer("localhost:11211");
  24 + emcc.AddServer("localhost:11212");
  25 + emcc.AddServer("localhost:11213");
  26 + emcc.AddServer("localhost:11214");
  27 +
  28 + var client = new MemcachedClient(emcc);
  29 +
  30 + var mre = new ManualResetEvent(false);
  31 + var keys = Enumerable.Range(0, 20).Select(i => "key_" + i).ToArray();
  32 +
  33 + foreach (var k in keys)
  34 + client.Store(StoreMode.Set, k, new byte[65534]);
  35 +
  36 + for (var i = 0; i < 4; i++)
  37 + {
  38 + ThreadPool.QueueUserWorkItem((o) =>
  39 + {
  40 + mre.WaitOne();
  41 +
  42 + while (true)
  43 + client.Get(keys);
  44 + });
  45 + }
  46 +
  47 + Console.WriteLine("Go?");
  48 + Console.ReadLine();
  49 +
  50 + mre.Set();
  51 +
  52 + Console.WriteLine("Enter to quit.");
  53 + Console.ReadLine();
  54 +
  55 +
  56 + /*
22 57
23 58 var mbcc = new MembaseClientConfiguration();
24 59
@@ -107,6 +142,7 @@ static void Main(string[] args)
107 142 //var stats2 = nc2.Stats();
108 143 //foreach (var kvp in stats2.GetRaw("curr_connections"))
109 144 // Console.WriteLine("{0} -> {1}", kvp.Key, kvp.Value);
  145 + * */
110 146 }
111 147
112 148 private static void MultigetSpeedTest()

0 comments on commit 9eda5ee

Please sign in to comment.
Something went wrong with that request. Please try again.