This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Script for loadtesting a server with https://github.com/tsenart/vegeta | |
| # | |
| # Sample output. The server under test breaks down at 10k queries per second: | |
| # its error rate goes from 0% to 23%, its 99th latency percentile goes | |
| # from 0.488 milliseconds (at 1000 qps) to 71.18 ms (at 10000 qps). | |
| # | |
| # qps errors 50th 95th 99th | |
| # 1000 0.0 0.182 0.222 0.488 | |
| # 2000 0.0 0.144 0.224 0.431 | |
| # 3000 0.0 0.141 0.244 0.466 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re, requests | |
| def _query(query): | |
| r = requests.post('https://query.wikidata.org/sparql', | |
| params={'query': query}, | |
| headers={'Accept': 'text/tab-separated-values'}) | |
| return r.text.splitlines() | |
| _entity_re = re.compile(r'^<http://www.wikidata.org/entity/([A-Z]\d+)>$') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-License-Identifier: CC0 | |
| # SPDX-FileCopyrightText: 2026 Sascha Brawer <sascha@brawer.ch> | |
| # | |
| # Python script to write test files in OpenStreetMap `*.osm.pbf` format. | |
| # Used to generate test data for an integration test in a project | |
| # that processes OpenStreetMap OSM_PBF data. | |
| # | |
| # This particular script generates a single uncompressed OSMData blob | |
| # that contains two PrimitiveGroups. Feel free to adapt it to whatever | |
| # you need for your own testing. |