{"id":25627494,"url":"https://github.com/xincao9/ptk","last_synced_at":"2025-10-11T05:34:37.117Z","repository":{"id":57724158,"uuid":"179200809","full_name":"xincao9/ptk","owner":"xincao9","description":"Easy to use java based, stress test suite","archived":false,"fork":false,"pushed_at":"2019-04-12T14:39:36.000Z","size":134,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-29T20:40:58.483Z","etag":null,"topics":["java","pressure","server","toolkit"],"latest_commit_sha":null,"homepage":"","language":"Java","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/xincao9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-03T03:09:27.000Z","updated_at":"2019-04-12T14:39:37.000Z","dependencies_parsed_at":"2022-09-02T06:44:39.432Z","dependency_job_id":null,"html_url":"https://github.com/xincao9/ptk","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/xincao9/ptk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xincao9%2Fptk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xincao9%2Fptk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xincao9%2Fptk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xincao9%2Fptk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xincao9","download_url":"https://codeload.github.com/xincao9/ptk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xincao9%2Fptk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006322,"owners_count":26084085,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["java","pressure","server","toolkit"],"created_at":"2025-02-22T17:49:45.440Z","updated_at":"2025-10-11T05:34:37.102Z","avatar_url":"https://github.com/xincao9.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ptk (pressure test kit)\nEasy to use java based, stress test suite [中文说明](https://github.com/xincao9/ptk/wiki/%E4%B8%AD%E6%96%87%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E)\n\n![logo](https://github.com/xincao9/ptk/blob/master/logo.png)\n\n**_Features_**\n\n* Small and flexible, without any third party dependence\n* Scalability is good, you can customize the data source\n* The pressure measurement code is easy to manage in one project, and the pressure measurement method is specified according to the command during pressure measurement.\n* After the long-term use of the project, the accuracy of the pressure measurement is high\n* Packaged as an executable jar for easy use anywhere\n\n**_Maven dependency_**\n\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.xincao9\u003c/groupId\u003e\n    \u003cartifactId\u003eptk-core\u003c/artifactId\u003e\n    \u003cversion\u003e1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n**_com.github.xincao9.ptk.core.Source_**\n\nData source: A collection of data for testing. By default, Source implements FileSource and SequenceSource\n\nIf custom\n\n```\npublic class D {\n\n    private final int id;\n\n    public D(int id) {\n        this.id = id;\n    }\n\n    public int getId() {\n        return this.id;\n    }\n}\npublic class SourceD implements Source {\n\n    @Override\n    public int read() {\n        for (int i = 1; i \u003c 5000; i++) {\n            Worker.submit(new D(i)); // Write to the pressure data pool\n        }\n        return 5000;\n    }\n\n}\n```\n\n**_com.github.xincao9.ptk.core.Method_**\n\nTest method: code block for pressure measurement\n\n```\n@Test(name = \"MethodD\")\npublic class MethodD extends Method {\n\n    @Override\n    public void exec(Object params) {\n        D d = (D) params;\n        Logger.info(d.getId());\n    }\n\n}\n```\n\n**_Startup method_**\n\n```\nPTKCore.bootstrap(new SourceD(), args);\n```\n\n**_Command line execution_**\n\n```\njava -jar ptk-sample/target/ptk-sample-1.0.jar\n1.cmd -[c, t, m] value\n2.com.github.xincao9.ptk.core.Source interface must be implemented, implemented as a read data source\nThe 3.com.github.xincao9.ptk.core.Method interface must be implemented and needs to be identified by the @Test identifier as the code block to be tested.\n4.com.github.xincao9.ptk.core.Result interface does not have to be implemented, it can output test results to its own system\n5.-c Concurrency limit 0 \u003c concurrent \u003c= 1024 Default CPU core number\n6.-t request delay limit cd \u003e 0 default 0ms; it is recommended to block the call to set a small point, calculate the dense call to set a large point, less than 0 for never delay\n7.-m test method class\n\njava -jar ptk-sample/target/ptk-sample-1.0.jar -m MethodD -c 2 -t -1\n```\n\n\n#### Contact\n\n* [https://github.com/xincao9/ptk/issues](https://github.com/xincao9/ptk/issues)\n* xincao9@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxincao9%2Fptk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxincao9%2Fptk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxincao9%2Fptk/lists"}