Skip to content

Commit b648eb3

Browse files
authored
update test version (#10273)
* add new test : CSharp/akazawayun.pro * modify config and code * add content-type * update url * update package version * add 3 new tests: db、queries、updates 1. add 3 new tests: db、queries、updates; 2. split code to multi files; * - * use generated sql instead const string. * update version * fix bug of db query * set port to 8080 * 升级 akazawayun.pro 框架版本到 14 * i forget to update the port change... * test self whether work fine.. * update nuget version * why pr failed... * 不小心多提交了别人的框架...改回 * akazawayun fix bug * remove db test there is some error in mysql * confirmed there is bug in mysql.data 9.5.0 还是用8080端口吧- -b, 都用8080, 改其他的对比测时不方便 * downgrade mysql.data back to 9.4.0 * fix bug of akazawayun.pro * update version of akazawayun.pro * update version * add platform test * update nupkg version * update version * update version. * fix debug
1 parent 92bf758 commit b648eb3

File tree

3 files changed

+4
-24
lines changed

3 files changed

+4
-24
lines changed

frameworks/CSharp/akazawayun.pro/src/AkazawaYun.Benchmark.Platform/AkazawaYun.Benchmark.Platform.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</PropertyGroup>
1616

1717
<ItemGroup>
18-
<PackageReference Include="AkazawaYun.PRO" Version="1.14.25.1110" />
18+
<PackageReference Include="AkazawaYun.PRO" Version="1.14.25.1027-p" />
1919
</ItemGroup>
2020

2121
</Project>

frameworks/CSharp/akazawayun.pro/src/AkazawaYun.Benchmark.Platform/MyBenchmarkReceptor.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
using AkazawaYun.PRO7;
2-
using System.Text;
32

43
namespace AkazawaYun.Benchmark.Platform;
54

65
class MyBenchmarkReceptor : akzWebReceptorBenchmark
76
{
87
readonly JsonModel JsonModel;
9-
readonly ReadOnlyMemory<byte> JsonContentLength;
108

119

1210
public MyBenchmarkReceptor()
@@ -15,8 +13,6 @@ public MyBenchmarkReceptor()
1513
{
1614
message = "Hello, World!"
1715
};
18-
akzJson.Text2Json(JsonModel, out ReadOnlyMemory<byte> json);
19-
JsonContentLength = Encoding.UTF8.GetBytes($"{json.Length}\r\n\r\n");
2016
}
2117

2218

@@ -26,8 +22,7 @@ public override ValueTask SendPlaintext(IHttpContext http)
2622
}
2723
public override async ValueTask SendJson(IHttpContext http)
2824
{
29-
await http.Slient.Send(DataJson_OnlyHeaderExceptContentLength);
30-
await http.Slient.Send(JsonContentLength);
25+
await http.Slient.Send(DataJson_OnlyHeader);
3126
akzJson.Text2Json(JsonModel, out ReadOnlyMemory<byte> json);
3227
await http.Slient.Send(json);
3328
}

frameworks/CSharp/akazawayun.pro/src/AkazawaYun.Benchmark.Platform/Program.cs

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,16 @@ namespace AkazawaYun.Benchmark.Platform;
55
class Program
66
{
77
static readonly akzWebBuilder builder;
8-
const int port = 8080;
98

109
static Program()
1110
{
1211
akzLog.War("AkazawaYun.PRO 平台压力测试特供版 ver2025.11.3, 只支持 /plaintext 和 /json");
13-
akzJson.Config(null, AotJsonContext.Default);
14-
builder = akzWebBuilder.Shared.SetPort(port).SetDev(true)
15-
.Add<akzXmlSummary, akzXmlSummary>(() => null)
16-
.Add<IWebReceptor, MyBenchmarkReceptor>(() => new MyBenchmarkReceptor())
17-
.Add<IWebListener, akzHttpListenerVIBenchmark>(() => new(port))
18-
.Build();
12+
akzJson.Config(AotJsonContext.Default);
13+
builder = akzWebBuilder.Shared.Build(new MyBenchmarkReceptor());
1914
}
2015
static async Task Main()
2116
{
2217
await builder.Launch();
23-
24-
Console.WriteLine("[API SELF-TEST]");
25-
string url = $"http://localhost:{port}/plaintext";
26-
Console.WriteLine(" REQ URL :" + url);
27-
string res = await akzHttpClient.Shared.Get(url).FetchString();
28-
Console.WriteLine(" RES LEN :" + res.Length);
29-
Console.WriteLine(" RES BODY:" + res);
30-
Console.WriteLine("[OK, I WORK FINE]");
31-
32-
akzLog.Default = akzLog.Output.NoneButWar;
3318
await Task.Delay(-1);
3419
}
3520
}

0 commit comments

Comments
 (0)