Browse Source

[c#/beetlex] remove debug docker file (#6546)

* update beetlex 1.4.3

update beetlex 1.4.3

* docker add COMPlus_ReadyToRun variable
update beetlex

* update beetlex, enabled thread queue

* beetlex framework add db and queries cases

* add db code

* change result json data

* update query url

* beetlex framework add fortunes cases

* change Content-Type

* add beetlex core cases

* fix queries cases

* update config

* change try readline

* update benchmark config

* Update README.md

* Update README.md

* change versus property

* beetlex-core update .net core to v3.0

* change beetlex-core project file

* beetlex update raw db class

* beetlex update raw db

* beetlex debug plaintext

* change debug docker file

* update beetlex to 1.4.0

* update

* beetlex update core 3.1

* [c#/beetlex] add updates cases

* [c#/beetlex] change Server: TFB, change custom connection pool, add update docker

* fix errors

* change pool init

* change connection pool maxsize

* fix fortunes errors

* clear DBRaw _connectionString value.

* [c#beetlex] change update dbconnection pool size

* [c#/beetlex] udpate spanjson to v3.0.1, Npgsql v5.0.0

* [c#/beetlex] add caching sample

* set connectionstring multiplexing

* remove connection multiplexing setting

* [c#/beetlex]change NpgsqlParameter to  NpgsqlParameter<T>

* [c#/beetlex] update dbraw

* [c#/beetlex] change connection string

* [c#/beetlex]  add fortunes cases to core-updb

* update beetlex 1.5.6

* update 5.0.0-alpha1

* update docker file

* Enabled IOQueues

* Set IOQueues debug mode

* update

* [c#/beetlex] udpate to v1.6.0.1-beta

* update pg drive

* [c#/beetlex] update to beetlex v1.6.3 and support pipelining

* set options

* [c#/beetlex] Optimized actions

* [c#/beetlex] update plaintext

* Bump ServiceStack in /frameworks/CSharp/servicestack/src/SelfHost

Bumps [ServiceStack](https://github.com/ServiceStack/ServiceStack) from 3.9.59 to 5.9.2.
- [Release notes](https://github.com/ServiceStack/ServiceStack/releases)
- [Commits](https://github.com/ServiceStack/ServiceStack/commits/v5.9.2)

Signed-off-by: dependabot[bot] <[email protected]>

* [c#/beetlex] change plaintext buffer size, optimize fortunes.

* [c#/beetlex] update v1.6.5,use System.Text.Json

* change docker files

* update beetlex 1.6.5.2

* [c#/beetlex] update v1.6.5.3-beta

* [c#/beetlex] update 1.6.5.36-beta

* update

* update json

* [c#/beetlex] update

* update beetlex 1.6.5.38 beta

* update

* add  array buffer

* [c#/beetlex] updates

* update

* update

* [c#/beetlex] update to 1.6.5.4.1

* change server tag

* Bump bottle from 0.12.13 to 0.12.19 in /frameworks/Python/bottle

Bumps [bottle](https://github.com/bottlepy/bottle) from 0.12.13 to 0.12.19.
- [Release notes](https://github.com/bottlepy/bottle/releases)
- [Changelog](https://github.com/bottlepy/bottle/blob/master/docs/changelog.rst)
- [Commits](https://github.com/bottlepy/bottle/compare/0.12.13...0.12.19)

Signed-off-by: dependabot[bot] <[email protected]>

* [c#/beetlex] remove debug docker file

* update benchmark_config

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Henry 4 years ago
parent
commit
6e20cabf01

+ 2 - 10
frameworks/CSharp/beetlex/PlatformBenchmarks/HttpServer.cs

@@ -21,15 +21,7 @@ namespace PlatformBenchmarks
             serverOptions.DefaultListen.Port = 8080;
             serverOptions.Statistical = false;
             serverOptions.BufferPoolMaxMemory = 1000;
-            serverOptions.BufferPoolSize = 1024 * 10;
-            if (Program.Debug)
-            {
-                serverOptions.BufferSize = 1024 * 16;
-            }
-            else
-            {
-                serverOptions.BufferSize = 1024 * 8;
-            }
+            serverOptions.BufferPoolSize = 1024 * 16;
             ApiServer = SocketFactory.CreateTcpServer<HttpHandler>(serverOptions);
             ApiServer.Open();
             if (!Program.UpDB)
@@ -43,7 +35,7 @@ namespace PlatformBenchmarks
                 RawDb._connectionString = "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=64;NoResetOnClose=true;Enlist=false;Max Auto Prepare=3;Multiplexing=true;Write Coalescing Delay Us=500;Write Coalescing Buffer Threshold Bytes=1000";
                // RawDb._connectionString = "Server=192.168.2.19;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=64;NoResetOnClose=true;Enlist=false;Max Auto Prepare=3";
             }
-            ApiServer.Log(LogType.Info, null, $"Debug mode [{Program.Debug}]");
+           // ApiServer.Log(LogType.Info, null, $"Debug mode [{Program.Debug}]");
             return Task.CompletedTask;
 
         }

+ 2 - 2
frameworks/CSharp/beetlex/PlatformBenchmarks/Program.cs

@@ -7,13 +7,13 @@ namespace PlatformBenchmarks
     class Program
     {
 
-        public static bool Debug = false;
+        //public static bool Debug = false;
 
         public static bool UpDB = false;
 
         public static void Main(string[] args)
         {
-            Debug = (args != null && args.Length > 0 && args[0] == "debug");
+            //Debug = (args != null && args.Length > 0 && args[0] == "debug");
             UpDB = (args != null && args.Length > 0 && args[0] == "updb");
             new HostBuilder().ConfigureServices(delegate (HostBuilderContext hostContext, IServiceCollection services)
             {

+ 2 - 8
frameworks/CSharp/beetlex/PlatformBenchmarks/db.cs

@@ -16,14 +16,8 @@ namespace PlatformBenchmarks
             try
             {
                 var data = await token.Db.LoadSingleQueryRow();
-                if (Program.Debug)
-                {
-                    await JsonSerializer.NonGeneric.Utf8.SerializeAsync(data, stream);
-                }
-                else
-                {
-                    System.Text.Json.JsonSerializer.Serialize<World>(GetUtf8JsonWriter(stream, token), data, SerializerOptions);
-                }
+
+                System.Text.Json.JsonSerializer.Serialize<World>(GetUtf8JsonWriter(stream, token), data, SerializerOptions);
             }
             catch (Exception e_)
             {

+ 13 - 27
frameworks/CSharp/beetlex/PlatformBenchmarks/fortunes.cs

@@ -37,35 +37,21 @@ namespace PlatformBenchmarks
             {
 
                 var data = await token.Db.LoadFortunesRows();
-                if (Program.Debug)
-                {
-                    var html = token.GetHtmlBufferWriter();
-                    html.Reset();
-                    html.Write(_fortunesTableStart.Data, 0, _fortunesTableStart.Length);
-                    foreach (var item in data)
-                    {
-                        html.Write(_fortunesRowStart.Data, 0, _fortunesRowStart.Length);
-                        WriteNumeric(html, (uint)item.Id);
-                        html.Write(_fortunesColumn.Data, 0, _fortunesColumn.Length);
-                        html.Write(HtmlEncoder.Encode(item.Message));
-                        html.Write(_fortunesRowEnd.Data, 0, _fortunesRowEnd.Length);
-                    }
-                    html.Write(_fortunesTableEnd.Data, 0, _fortunesTableEnd.Length);
-                    stream.Write(html.Data, 0, html.Length);
-                }
-                else
+
+                var html = token.GetHtmlBufferWriter();
+                html.Reset();
+                html.Write(_fortunesTableStart.Data, 0, _fortunesTableStart.Length);
+                foreach (var item in data)
                 {
-                    stream.Write(_fortunesTableStart.Data, 0, _fortunesTableStart.Length);
-                    foreach (var item in data)
-                    {
-                        stream.Write(_fortunesRowStart.Data, 0, _fortunesRowStart.Length);
-                        WriteNumeric(stream, (uint)item.Id);
-                        stream.Write(_fortunesColumn.Data, 0, _fortunesColumn.Length);
-                        stream.Write(HtmlEncoder.Encode(item.Message));
-                        stream.Write(_fortunesRowEnd.Data, 0, _fortunesRowEnd.Length);
-                    }
-                    stream.Write(_fortunesTableEnd.Data, 0, _fortunesTableEnd.Length);
+                    html.Write(_fortunesRowStart.Data, 0, _fortunesRowStart.Length);
+                    WriteNumeric(html, (uint)item.Id);
+                    html.Write(_fortunesColumn.Data, 0, _fortunesColumn.Length);
+                    html.Write(HtmlEncoder.Encode(item.Message));
+                    html.Write(_fortunesRowEnd.Data, 0, _fortunesRowEnd.Length);
                 }
+                html.Write(_fortunesTableEnd.Data, 0, _fortunesTableEnd.Length);
+                stream.Write(html.Data, 0, html.Length);
+
             }
             catch (Exception e_)
             {

+ 1 - 8
frameworks/CSharp/beetlex/PlatformBenchmarks/json.cs

@@ -32,14 +32,7 @@ namespace PlatformBenchmarks
 
         public ValueTask Json(PipeStream stream, HttpToken token, ISession session)
         {
-            if (Program.Debug)
-            {
-                System.Text.Json.JsonSerializer.Serialize<JsonMessage>(GetUtf8JsonWriter(stream, token), new JsonMessage { message = "Hello, World!" }, SerializerOptions);   
-            }
-            else
-            {
-                SpanJson.JsonSerializer.NonGeneric.Utf8.SerializeAsync(new JsonMessage { message = "Hello, World!" }, stream);
-            }
+            System.Text.Json.JsonSerializer.Serialize<JsonMessage>(GetUtf8JsonWriter(stream, token), new JsonMessage { message = "Hello, World!" }, SerializerOptions);   
             OnCompleted(stream, session, token);
             return ValueTask.CompletedTask;
         }

+ 0 - 13
frameworks/CSharp/beetlex/beetlex-debug.dockerfile

@@ -1,13 +0,0 @@
-FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine AS build
-WORKDIR /app
-COPY PlatformBenchmarks .
-RUN dotnet publish -c Release -o out
-
-FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS runtime
-ENV DOTNET_SYSTEM_NET_SOCKETS_INLINE_COMPLETIONS 1
-WORKDIR /app
-COPY --from=build /app/out ./
-
-EXPOSE 8080
-
-ENTRYPOINT ["dotnet", "PlatformBenchmarks.dll","debug"]

+ 1 - 20
frameworks/CSharp/beetlex/benchmark_config.json

@@ -64,26 +64,7 @@
         "webserver": "beetlex",
         "os": "Linux",
         "database_os": "Linux",
-        "display_name": "beetlex-core",
-        "notes": "",
-        "versus": "aspcore"
-      },
-      "debug": {
-        "plaintext_url": "/plaintext",
-        "json_url": "/json",
-        "port": 8080,
-        "approach": "Realistic",
-        "classification": "Platform",
-        "database": "Postgres",
-        "framework": "beetlex",
-        "language": "C#",
-        "orm": "Raw",
-        "platform": ".NET",
-        "flavor": "CoreCLR",
-        "webserver": "beetlex",
-        "os": "Linux",
-        "database_os": "Linux",
-        "display_name": "beetlex-core",
+        "display_name": "beetlex-core-updb",
         "notes": "",
         "versus": "aspcore"
       }

+ 0 - 14
frameworks/CSharp/beetlex/config.toml

@@ -36,20 +36,6 @@ platform = ".NET"
 webserver = "beetlex"
 versus = "aspcore"
 
-[debug]
-urls.plaintext = "/plaintext"
-urls.json = "/json"
-urls.query = "/queries?queries="
-approach = "Realistic"
-classification = "Platform"
-database = "Postgres"
-database_os = "Linux"
-os = "Linux"
-orm = "Raw"
-platform = ".NET"
-webserver = "beetlex"
-versus = "aspcore"
-
 [core-updb]
 urls.update = "/updates?queries="
 urls.fortune = "/fortunes"