Browse Source

fix fortunes

yi lu 6 years ago
parent
commit
cdf16ed3d3

+ 2 - 2
frameworks/CSharp/zysocket-v/PlatformBenchmarks/DBRaw.cs

@@ -20,8 +20,8 @@ namespace PlatformBenchmarks
         {
             _random = random;
             _dbProviderFactory = dbProviderFactory;
-            _connectionString = "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=256;NoResetOnClose=true;Enlist=false;Max Auto Prepare=3";
-            //_connectionString = "Server=192.168.2.19;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=256;NoResetOnClose=true;Enlist=false;Max Auto Prepare=3";
+           // _connectionString = "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=256;NoResetOnClose=true;Enlist=false;Max Auto Prepare=3";
+            _connectionString = "Server=192.168.1.55;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=256;NoResetOnClose=true;Enlist=false;Max Auto Prepare=3";
             OnCreateCommand();
         }
 

+ 1 - 1
frameworks/CSharp/zysocket-v/PlatformBenchmarks/ZYHttpServer.cs

@@ -76,7 +76,7 @@ namespace PlatformBenchmarks
            
 
             using (var data_r = fiberRw.GetMemory(4096))
-            using (var data_w = fiberRw.GetMemory(4096))
+            using (var data_w = fiberRw.GetMemory(16384))
             {
 
                 for (; ; )

+ 2 - 2
frameworks/CSharp/zysocket-v/PlatformBenchmarks/fortunes.cs

@@ -30,9 +30,9 @@ namespace PlatformBenchmarks
                     foreach (var item in data)
                     {
                         write.Write(_fortunesRowStart.Data, 0, _fortunesRowStart.Length);
-                        write.Write(item.Id.ToString(CultureInfo.InvariantCulture));
+                        write.Write(item.Id.ToString(CultureInfo.InvariantCulture),false);
                         write.Write(_fortunesColumn.Data, 0, _fortunesColumn.Length);
-                        write.Write(System.Web.HttpUtility.HtmlEncode(item.Message));
+                        write.Write(System.Web.HttpUtility.HtmlEncode(item.Message),false);
                         write.Write(_fortunesRowEnd.Data, 0, _fortunesRowEnd.Length);
                     }
                     write.Write(_fortunesTableEnd.Data, 0, _fortunesTableEnd.Length);