Browse Source

Updated evhttp-sharp

Nikita Tsukanov 11 years ago
parent
commit
d1705fcf10
3 changed files with 4 additions and 3 deletions
  1. 1 1
      evhttp-sharp/setup.py
  2. 3 2
      evhttp-sharp/src/Program.cs
  3. BIN
      evhttp-sharp/src/lib/EvHttpSharp.dll

+ 1 - 1
evhttp-sharp/setup.py

@@ -14,7 +14,7 @@ def start(args, logfile, errfile):
     # build
     subprocess.check_call("rm -rf bin obj", shell=True, cwd=app, stdout=logfile, stderr=errfile)
     subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app, stdout=logfile, stderr=errfile)
-    
+    os.environ['MONO_GC_PARAMS']="nursery-size=64m"
     subprocess.Popen("mono -O=all bin/Release/EvHttpSharpBenchmark.exe 127.0.0.1 8085 " + str(args.max_threads) + " &", shell=True, cwd=app, stdout=logfile, stderr=errfile)
     return 0
   except subprocess.CalledProcessError:

+ 3 - 2
evhttp-sharp/src/Program.cs

@@ -15,8 +15,9 @@ namespace EvHttpSharpBenchmark
 
 		static void Main (string[] args)
 		{
-			var host = new EventHttpListener(Handler);
-			host.Start(args[0], ushort.Parse(args[1]), int.Parse(args[2]));
+            LibLocator.Init();
+		    var host = new EventHttpMultiworkerListener(Handler, int.Parse(args[2]));
+		    host.Start(args[0], ushort.Parse(args[1]));
 		}
 
 		private static void Handler(EventHttpRequest req)

BIN
evhttp-sharp/src/lib/EvHttpSharp.dll