Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions api/neural_activity_app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,14 @@
}

DOWNLOADED_FILE_CACHE_DIR = os.path.join(BASE_DIR, "download_cache")

REST_FRAMEWORK = {
'DEFAULT_THROTTLE_CLASSES': [
'rest_framework.throttling.AnonRateThrottle',
'rest_framework.throttling.UserRateThrottle'
],
'DEFAULT_THROTTLE_RATES': {
'anon': '100/minute',
'user': '100/minute'
}
}
15 changes: 15 additions & 0 deletions loadtesting.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from molotov import scenario

# requirement: pip install molotov
# for autosizing run: molotov --sizing loadtesting.py

# _API = "https://neo-viewer-dev.brainsimulation.eu/blockdata/?url=https://gin.g-node.org/NeuralEnsemble/ephy_testing_data/raw/master/axon/File_axon_1.abf"
# _API = "http://127.0.0.1:8000/blockdata/?url=https://gin.g-node.org/NeuralEnsemble/ephy_testing_data/raw/master/axon/File_axon_1.abf"

_API = "http://127.0.0.1:8000/api/blockdata/?url=https://gin.g-node.org/NeuralEnsemble/ephy_testing_data/raw/master/brainwaresrc/block_300ms_4rep_1clust_part_ch1.src"
# _API = "https://neo-viewer.brainsimulation.eu/api/blockdata/?url=https://gin.g-node.org/NeuralEnsemble/ephy_testing_data/raw/master/brainwaresrc/block_300ms_4rep_1clust_part_ch1.src"

@scenario(weight=100)
async def _test(session):
async with session.get(_API) as resp:
assert resp.status == 200, resp.status