Skip to content

Latest commit

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

NetBenchmark

tpc http and websocket performance benchmark components

package

https://www.nuget.org/packages/BeetleX.NetBenchmark/

tcp

classProgram{staticvoidMain(string[]args){vardata=StringPacket.RamdomString(512);varruner=Benchmark.Tcp<StringPacket,Program>("192.168.2.19",9090,200,async(tcp,token)=>{tcp.Send(data);awaittcp.Receive();});runer.Run();runer.Print();}}

tcp results

image

http

classProgram{staticvoidMain(string[]args){varruner=Benchmark.Http<Program>(newUri("http://192.168.2.19:5000"),100,async(http,token)=>{awaithttp.Get("/api/values");awaithttp.PostJson("/api/values","beetlex.io");});runer.Run();runer.Print();}}

http result

image

websocket

classProgram{staticvoidMain(string[]args){varruner=Benchmark.WebsocketJson<Program>(newUri("ws://192.168.2.19:8080"),100,async(ws,token)=>{ws.TimeOut=1000*5;ws.Send(new{url="/json"});varresult=awaitws.Receive();});runer.Run();runer.Print();}}

result

image

About

tpc http and websocket performance benchmark testing components

Topics

Resources

Stars

18 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages