{"id":19632966,"url":"https://github.com/sitewhere/sitewhere-load-test","last_synced_at":"2026-06-10T04:31:28.012Z","repository":{"id":34406895,"uuid":"38335773","full_name":"sitewhere/sitewhere-load-test","owner":"sitewhere","description":"SiteWhere Load Testing Node","archived":false,"fork":false,"pushed_at":"2017-04-14T23:13:49.000Z","size":1469,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-26T21:17:15.524Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sitewhere.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-30T22:13:35.000Z","updated_at":"2017-04-10T23:48:02.000Z","dependencies_parsed_at":"2022-08-03T20:45:23.647Z","dependency_job_id":null,"html_url":"https://github.com/sitewhere/sitewhere-load-test","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sitewhere/sitewhere-load-test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitewhere%2Fsitewhere-load-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitewhere%2Fsitewhere-load-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitewhere%2Fsitewhere-load-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitewhere%2Fsitewhere-load-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sitewhere","download_url":"https://codeload.github.com/sitewhere/sitewhere-load-test/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitewhere%2Fsitewhere-load-test/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34137570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"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":[],"created_at":"2024-11-11T12:15:52.551Z","updated_at":"2026-06-10T04:31:27.989Z","avatar_url":"https://github.com/sitewhere.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n![SiteWhere] (http://www.sitewhere.org/sites/default/files/sitewhere.png)\r\n\r\nThe Open Platform for the Internet of Things™\r\n-----------------------------------------------\r\n\r\n# SiteWhere Load Testing Node\r\nA standalone node that can be configured to load test SiteWhere Server by sending\r\nrealistic data streams that are ingested by the system. When deployed in large \r\ngroups, the nodes can be used to stress test the system to find bottlenecks and\r\ncapture performance data.\r\n\r\n### Building from Source\r\nIf you want to customize SiteWhere Load Testing Node or otherwise have a need to build it \r\nfrom source code, use the following steps.\r\n\r\n**Note that this project has dependencies on SiteWhere 1.0.5 which is an unreleased\r\nbranch. Before building the load test node project, clone the 1.0.5 branch of \r\nSiteWhere Server and build it to generate artifacts into your local Maven repository.**\r\n\r\n#### Required Tools #####\r\n* [Apache Maven] (http://maven.apache.org/)\r\n* A [GIT] (http://git-scm.com/) client\r\n\r\n#### Clone and Build #####\r\nClone this repository locally using:\r\n\r\n    git clone https://github.com/sitewhere/sitewhere-load-test.git\r\n    \r\nNavigate to the newly created directory and execute:\r\n\r\n    mvn clean install\r\n\r\nAfter the build completes, a file named **sitewhere-loadtest.war** will have been created in the **deploy** \r\nfolder.\r\n\r\n#### Building a Full Server #####\r\nOnce the **sitewhere-loadtest.war** file has been generated, you can create the full server distribution by using:\r\n\r\n\tmvn -P builderServer install\r\n\t\r\nThis will download a copy of Tomcat, copy the WAR to the webapps folder, and copy the default \r\nconfiguration files to the correct location. Two archives are generated; a zip archive and a \r\ntarred gzipped archive. To install the archive, move it to the machine where the load test node\r\nshould run, unzip the archive then execute either *bin/startup.bat* or *bin/startup.sh* to\r\nstart the node.\r\n\r\n### Configuring the Load Testing Node ####\r\nThe configuration file for the load testing node is located at *conf/loadtest/sitewhere-loadtest.xml*. It is\r\nan XML file that conforms to the Spring beans XML schema and contains custom schema elements used to\r\nconfigure how load testing is performed. An example of a configuration file is shown below:\r\n\r\n ```XML\r\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\r\n\u003cbeans xmlns=\"http://www.springframework.org/schema/beans\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n\txmlns:context=\"http://www.springframework.org/schema/context\" xmlns:lt=\"http://www.sitewhere.com/schema/sitewhere/loadtest\"\r\n\txsi:schemaLocation=\"\r\n           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd\r\n           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd\r\n           http://www.sitewhere.com/schema/sitewhere/loadtest http://www.sitewhere.org/schema/sitewhere/loadtest/1.0.5/sitewhere-loadtest.xsd?a=a3\"\u003e\r\n           \r\n\t\u003c!-- Load property values for substitution --\u003e\r\n\t\u003ccontext:property-placeholder location=\"file:${catalina.home}/conf/loadtest/loadtest.properties\"\r\n\t\tignore-resource-not-found=\"true\"/\u003e\r\n\r\n\t\u003c!-- Defines load testing configuration --\u003e\r\n\t\u003clt:load-test\u003e\r\n\r\n\t\t\u003c!-- SiteWhere connection information --\u003e\r\n\t\t\u003clt:connection\u003e\r\n\r\n\t\t\t\u003clt:sitewhere-server restApiUrl=\"http://localhost:8080/sitewhere/api/\"\r\n\t\t\t\trestApiUsername=\"admin\" restApiPassword=\"password\"/\u003e\r\n\r\n\t\t\u003c/lt:connection\u003e\r\n\r\n\t\t\u003c!-- List of load test agents --\u003e\r\n\t\t\u003clt:agents\u003e\r\n\t\r\n\t\t\t\u003c!-- Generates traffic via an MQTT connection --\u003e\r\n\t\t\t\u003clt:mqtt-agent agentId=\"mqtt\" numThreads=\"20\" hostname=\"localhost\" port=\"1883\"\r\n\t\t\t\ttopic=\"SiteWhere/input/protobuf\"\u003e\r\n\t\t\t\r\n\t\t\t\t\u003c!-- Pool of devices to generate events from --\u003e\r\n\t\t\t\t\u003clt:device-pool poolSize=\"25\"/\u003e\r\n\r\n\t\t\t\t\u003c!-- Produces events at a linear rate with a throttle delay --\u003e\r\n\t\t\t\t\u003clt:linear-event-producer throttleDelayMs=\"100\"/\u003e\r\n\r\n\t\t\t\t\u003c!-- Produces events at an increasing rate over the duration of an hour --\u003e\r\n\t\t\t\t\u003c!--  \r\n\t\t\t\t\u003clt:progressive-event-producer initialThrottleDelayMs=\"500\"\r\n\t\t\t\t\tfinalThrottleDelayMs=\"10\" durationInSec=\"3600\"/\u003e\r\n\t\t\t\t--\u003e\r\n\t\t\r\n\t\t\t\t\u003c!-- Encodes events in SiteWhere Google Protocol Buffer format --\u003e\r\n\t\t\t\t\u003clt:protobuf-encoder/\u003e\r\n\r\n\t\t\t\u003c/lt:mqtt-agent\u003e\r\n\r\n\t\t\u003c/lt:agents\u003e\r\n\r\n\t\u003c/lt:load-test\u003e\r\n\r\n\u003c/beans\u003e\r\n```\r\n\r\nThis configuration will start an MQTT agent that uses 20 threads to submit event traffic to\r\na SiteWhere server over the MQTT protocol. The events will be sent to a pool of 25 devices which\r\nare loaded from the SiteWhere server via the REST services. Events will be produced in a linear\r\nfashion with a delay of 100 milliseconds to throttle the transmission rate. Each event is encoded using the default \r\n[SiteWhere Google Protocol Buffers](https://github.com/sitewhere/sitewhere/blob/sitewhere-1.0.5/sitewhere-protobuf/proto/sitewhere.proto) \r\nformat. \r\n\r\n**Note that your SiteWhere server should be configured to accept events in this same format.\r\nThe default SiteWhere server configuration will work with this load testing configuration.**\r\n\r\n#### Agents #####\r\nA SiteWhere load test node configuration may contain one or more **agents**. An agent is used\r\nto send data to a SiteWhere server over a given protocol. The initial version of SiteWhere load\r\ntest node only supports sending events over MQTT. Future versions will add agents for Stomp, COAP,\r\nREST and other formats.\r\n\r\n\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsitewhere%2Fsitewhere-load-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsitewhere%2Fsitewhere-load-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsitewhere%2Fsitewhere-load-test/lists"}