{"id":16242188,"url":"https://github.com/beetlex-io/netbenchmark","last_synced_at":"2025-03-19T17:31:17.843Z","repository":{"id":77784889,"uuid":"235233491","full_name":"beetlex-io/NetBenchmark","owner":"beetlex-io","description":"tpc http and websocket performance benchmark testing components","archived":false,"fork":false,"pushed_at":"2022-03-05T03:40:42.000Z","size":28,"stargazers_count":17,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-11T14:09:27.971Z","etag":null,"topics":["benchmark","http-benchmarking","http-client","network-benchmark","tcp-benchmarking","tcp-client","websocket","websocket-benchmarking"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beetlex-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-01-21T01:41:27.000Z","updated_at":"2023-11-10T16:32:15.000Z","dependencies_parsed_at":"2023-03-12T01:59:59.137Z","dependency_job_id":null,"html_url":"https://github.com/beetlex-io/NetBenchmark","commit_stats":null,"previous_names":["ikende/netbenchmark"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beetlex-io%2FNetBenchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beetlex-io%2FNetBenchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beetlex-io%2FNetBenchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beetlex-io%2FNetBenchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beetlex-io","download_url":"https://codeload.github.com/beetlex-io/NetBenchmark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221729439,"owners_count":16871021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","http-benchmarking","http-client","network-benchmark","tcp-benchmarking","tcp-client","websocket","websocket-benchmarking"],"created_at":"2024-10-10T14:09:55.271Z","updated_at":"2024-10-27T20:26:47.658Z","avatar_url":"https://github.com/beetlex-io.png","language":"C#","readme":"# NetBenchmark\ntpc http and websocket performance benchmark components\n## package\nhttps://www.nuget.org/packages/BeetleX.NetBenchmark/\n## tcp\n``` csharp\n    class Program\n    {\n        static void Main(string[] args)\n        {\n            var data = StringPacket.RamdomString(512);\n            var runer = Benchmark.Tcp\u003cStringPacket, Program\u003e(\"192.168.2.19\", 9090, 200,\n                async (tcp, token) =\u003e\n                {\n                    tcp.Send(data);\n                    await tcp.Receive();\n                }\n            );\n            runer.Run();\n            runer.Print();\n        }\n    }\n```\n## tcp results\n![image](https://user-images.githubusercontent.com/2564178/73148397-1ca69380-40f7-11ea-8db0-b2210cf66acb.png)\n## http\n``` csharp\n    class Program\n    {\n        static void Main(string[] args)\n        {\n            var runer = Benchmark.Http\u003cProgram\u003e(new Uri(\"http://192.168.2.19:5000\"), 100,\n                async (http, token) =\u003e\n                {\n                    await http.Get(\"/api/values\");\n                    await http.PostJson(\"/api/values\", \"beetlex.io\");\n                });\n            runer.Run();\n            runer.Print();\n        }\n    }\n```\n## http result\n![image](https://user-images.githubusercontent.com/2564178/73148550-f2090a80-40f7-11ea-859d-713352100dae.png)\n## websocket\n``` csharp\n    class Program\n    {\n        static void Main(string[] args)\n        {\n            var runer = Benchmark.WebsocketJson\u003cProgram\u003e(new Uri(\"ws://192.168.2.19:8080\"), 100,\n                async (ws, token) =\u003e\n                {\n                    ws.TimeOut = 1000 * 5;\n                    ws.Send(new { url = \"/json\" });\n                    var result = await ws.Receive();\n                });\n            runer.Run();\n            runer.Print();\n        }\n    }\n```\n## result\n![image](https://user-images.githubusercontent.com/2564178/73153365-7ebec300-410e-11ea-8e13-a0d3f2c313ba.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeetlex-io%2Fnetbenchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeetlex-io%2Fnetbenchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeetlex-io%2Fnetbenchmark/lists"}