{"id":16397298,"url":"https://github.com/foxriver76/iobroker.benchmark","last_synced_at":"2025-03-23T04:32:10.561Z","repository":{"id":46911317,"uuid":"406666555","full_name":"foxriver76/ioBroker.benchmark","owner":"foxriver76","description":"Measure the performance of your ioBroker installation.","archived":false,"fork":false,"pushed_at":"2024-06-03T13:22:42.000Z","size":1460,"stargazers_count":0,"open_issues_count":5,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T17:59:47.341Z","etag":null,"topics":["benchmark","iobroker","performance-testing","smarthome"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foxriver76.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"foxriver76","custom":"https://www.paypal.me/foxriver76"}},"created_at":"2021-09-15T08:02:08.000Z","updated_at":"2024-06-03T13:22:43.000Z","dependencies_parsed_at":"2024-04-19T12:29:02.505Z","dependency_job_id":"67d0890d-ca06-4398-bb7e-33cce647ac31","html_url":"https://github.com/foxriver76/ioBroker.benchmark","commit_stats":{"total_commits":105,"total_committers":2,"mean_commits":52.5,"dds":0.00952380952380949,"last_synced_commit":"30ec73d85dbe31aab5d1a68b2567eeb3cb47afd9"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxriver76%2FioBroker.benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxriver76%2FioBroker.benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxriver76%2FioBroker.benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxriver76%2FioBroker.benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foxriver76","download_url":"https://codeload.github.com/foxriver76/ioBroker.benchmark/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245056891,"owners_count":20553854,"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","iobroker","performance-testing","smarthome"],"created_at":"2024-10-11T05:09:46.841Z","updated_at":"2025-03-23T04:32:08.428Z","avatar_url":"https://github.com/foxriver76.png","language":"TypeScript","funding_links":["https://github.com/sponsors/foxriver76","https://www.paypal.me/foxriver76"],"categories":[],"sub_categories":[],"readme":"![Logo](admin/benchmark.png)\n# ioBroker.benchmark\n\n[![NPM version](https://img.shields.io/npm/v/iobroker.benchmark.svg)](https://www.npmjs.com/package/iobroker.benchmark)\n[![Downloads](https://img.shields.io/npm/dm/iobroker.benchmark.svg)](https://www.npmjs.com/package/iobroker.benchmark)\n![Number of Installations](https://iobroker.live/badges/benchmark-installed.svg)\n![Current version in stable repository](https://iobroker.live/badges/benchmark-stable.svg)\n\n[![NPM](https://nodei.co/npm/iobroker.benchmark.png?downloads=true)](https://nodei.co/npm/iobroker.benchmark/)\n\n**Tests:** ![Test and Release](https://github.com/foxriver76/ioBroker.benchmark/workflows/Test%20and%20Release/badge.svg)\n\n## benchmark adapter for ioBroker\nBenchmark your system.\n\n## Important: Information for users\nNote, that the purpose of the adapter, in its current state, is mainly to benchmark different scenarios to gather \ninsights on changes on js-controller level.\nThe Benchmark Tests can take very long and can cause high loads on your system. Also note, that by default the benchmark adapter\nruns in an isolated mode, which will disable all adapters and only keep the controller and itself alive. Furthermore, the adapter\nalways needs to be run with instance number `0`.\n\n## How to add a new test?\n1. Create a new TypeScript file in src/lib/activeTests, with a class which inherits from TestUtils\n2. Define the three (five) steps of your test (execute is automatically measured)\n3. Ooptional: If your test has some requierments, e.g. controller needs to be `\u003e=3.0.0`, please pass the requirements to\nthe parent constructor\n4. Add your test to src/lib/allTests.ts\n5. Add a button and translation for your test to admin/jsonConfig.json\n\n### Test requirements\nSome tests may have requirements. If the system does not fulfill the requirements, the test will be skipped.\nIn the constructor you should pass the requirements to the parent class, like\n\n```typescript\npublic constructor(adapter: AdapterInstance) {\n    super(adapter, {freeMemory: 2000});\n}\n```\n\nCurrently, the following requirements are supported:\n\n- `controllerVersion` - if methods are tested which were introduced with a specific controller version, the benchmark \nadapter should not try to run these tests on a non-supporting controller\n- `freeMemory` - define the required memory of the test, this is only necessary if you e.g. add a lot of instances\n\n## Test description\n### getStates\nExecutes `iterations` times `getState`.\n\n### getStatesAlias\nExecutes `iterations` times `getState` on an alias.\n\n### getStatesAliasRead\nExecutes `iterations` times `getState` on an alias. The alias has a simple read function.\n\n### getStatesMulti\nCreates 10,000 states, then executes `iterations` times `getStates` on them.\n\n### getStatesMultiAlias\nCreates 10,000 alias states, then executes `iterations` times `getStates` on them. \n\n### idle\nJust waits `iterations` ms.\n\n### messages\nCreates a secondary benchmark instance. The controller instance will then send `iterations` messages to the secondary instance. \nIf all messages are recevied, the test is finished.\n\n### objectsCreation\nCreates `iterations` objects via `setObject`.\n\n### objectsDeletion\nDeletes `iterations` objects via `delObject`.\n\n### objectViewEqual\nCreates 10,000 objects while 50 % of them are relevant for the object view. Then it executes `iterations` object views.\n\n### objectViewLarge\nCreates 10,000 objects while 98 % of them are relevant for the object view. Then it executes `iterations` object views.\n\n### objectViewSmall\nCreates 10,000 objects while only 2 % of them are relevant for the object view. Then it executes `iterations` object views.\n\n### setStates\nSets `iterations` states via `setState`\n\n### setStatesNonStrict\nSets `iterations` states via `setState`, but `strictObjectChecks` are disabled.\n\n### setStateParallel\nAdds 30 secondary instances, every instance will set `iterations` states. On system level, the instances are setting these states in parallel, but on instance level, the previous `setState` needs to be finished until the next one is set.\nThis test aims to benchmark multicore systems.\n\n__Requirements__: 2 GB of free memory\n\n### statesDeletion\nDeletes `iterations` states via `delState`.\n\n### statesSubscription\nThe controller instance subscribes on a specific namespace. 4 secondaries each set `iterations / 4` states. As soon as the controller received all `iterations` publishes, the test is finished.\n\n### statesSubscriptionAlias\nThe controller instance subscribes on an alias namespace. 4 secondaries each set `iterations / 4` alias states. As soon as the controller received all `iterations` publishes, the test is finished.\n\n### statesSubscriptionAliasWrite\nThe controller instance subscribes on an alias namespace. 4 secondaries each set `iterations / 4` alias states. As soon as the controller received all `iterations` publishes, the test is finished.\nThe alias contains a simple write function.\n\n### statesSubscriptionSingle\nTen secondaries each subscribe on the same `iterations` states. Instead of using one `subscribe` call each perform `iterations` single subscribe calls. As soon as all `ìterations` are received by every secondary, the test is finished.\n\n## Changelog\n\u003c!--\n\tPlaceholder for the next version (at the beginning of the line):\n\t### **WORK IN PROGRESS**\n--\u003e\n### 1.3.0 (2024-06-03)\n* (foxriver76) added test `statesSubscriptionSingle`\n\n### 1.2.0 (2024-04-16)\n* (foxriver76) added `controllerVersion` to results\n\n### 1.1.4 (2022-12-30)\n* (foxriver76) fixed cleanup after `getStatesMulti`\n\n### 1.1.3 (2022-12-30)\n* (foxriver76) fixed a bug, where `getStatesMultiAlias` did not remove alias objects\n\n### 1.1.1 (2022-12-30)\n* (foxriver76) fixed a bug, where `getStatesMultiAlias` created wrong amount of objects\n\n### 1.1.0 (2022-11-17)\n* (foxriver76) added `getStatesMulti` and `getStatesMultiAlias`\n\n### 1.0.0 (2022-06-10)\n* (foxriver76) the config is now applied directly from frontend without requiring to save first\n\n### 0.5.1 (2022-02-26)\n* (foxriver76) changed type in io-package to `utility`\n* (foxriver76) updated deps\n* (foxriver76) added `dataSource` to io-package\n\n### 0.5.0 (2022-01-01)\n* (foxriver76) we introduced `TestRequirements` which can define required memory, controller and node version\n\n### 0.4.0 (2021-11-24)\n* (foxriver76) we introduced some categories in the user interface\n* (foxriver76) we switched to checkboxes to allow to execute a subset of all tests\n\n### 0.3.2 (2021-11-23)\n* (foxriver76) we now also remove secondary instances on clean up\n\n### 0.3.1 (2021-11-23)\n* (foxriver76) we now prettify the summary file\n\n### 0.3.0 (2021-11-22)\n* (foxriver76) we added three `getObjectView` tests\n\n### 0.2.0 (2021-11-20)\n* (foxriver76) we added a parallel `setState` test for multicore performance evaluation (closes #5)\n\n### 0.1.15 (2021-11-19)\n* (foxriver76) internal simplification\n\n### 0.1.14 (2021-11-19)\n* (foxriver76) make cooldown dependent on test time (closes #4)\n* (foxriver76) on last iteration of last test we do not need to cooldown\n\n### 0.1.13 (2021-10-25)\n* (foxriver76) fix iob executable to also work on Windows systems (closes #3)\n\n### 0.1.8 (2021-10-20)\n* (foxriver76) make `addInstances` wait that instance is actually alive\n\n### 0.1.7 (2021-09-26)\n* (foxriver76) added test for alias subscription with write function\n\n### 0.1.6 (2021-09-26)\n* (foxriver76) added tests for subscription with alias, getStates with alias read\n\n### 0.1.5 (2021-09-24)\n* (foxriver76) added db types to summary\n\n### 0.1.4 (2021-09-23)\n* (foxriver76) fixed `actionsPerSecondStd` state\n* (foxriver76) added tests `getStatesAlias` and `messages`\n* (foxriver76) fixed execution of `getStates` test\n\n### 0.1.3 (2021-09-23)\n* (foxriver76) optimize JSON file writing\n* (foxriver76) added tests `objectsDeletion` and `getStates`\n\n### 0.1.2 (2021-09-22)\n* (foxriver76) fixed statesDeletion test\n\n### 0.1.1 (2021-09-22)\n* (foxriver76) implemented `cleanUpBetweenEpoch` and `prepareBetweenEpoch` to save ressources\n\n### 0.1.0 (2021-09-21)\n* (foxriver76) write mem stats in MB\n* (foxriver76) write summary file\n* (foxriver76) also monitor js-controller\n* (foxriver76) add overall summary state\n* (foxriver76) add epochs and iterations to summary\n* (foxriver76) added logging + restructuring code\n* (foxriver76) added cleanup button and allow prefixing ids\n\n### 0.0.3 (2021-09-20)\n* (foxriver76) we fixed actionsPerSecondStd state if only one epoch\n\n### 0.0.2 (2021-09-20)\n* (foxriver76) we fixed actionsPerSecondStd state\n\n### 0.0.1 (2021-09-20)\n* (foxriver76) initial release\n\n## License\nMIT License\n\nCopyright (c) 2022 Moritz Heusinger \u003cmoritz.heusinger@gmail.com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nThe adapter icon has been designed using resources from Flaticon.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxriver76%2Fiobroker.benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxriver76%2Fiobroker.benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxriver76%2Fiobroker.benchmark/lists"}