diff --git a/Benchmark Example.ipynb b/Benchmark Example.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..e1043c7a88794192cdea237fed2f39091b964b66 --- /dev/null +++ b/Benchmark Example.ipynb @@ -0,0 +1,92 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "under-egypt", + "metadata": {}, + "outputs": [], + "source": [ + "from maap.maap import MAAP\n", + "maap = MAAP(maap_host='api.uat.maap-project.org')" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "piano-northern", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'code': 200,\n", + " 'message': 'success',\n", + " 'queues': ['maap-dps-worker-16gb',\n", + " 'maap-dps-worker-32gb',\n", + " 'maap-dps-worker-8gb']}" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "maap.getQueues().json()" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "brief-coalition", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'status': 'failed', 'http_status_code': 500, 'job_id': ''}\n" + ] + } + ], + "source": [ + "job = maap.submitJob(identifier=\"some\", algo_id=\"enchmark_ubuntu\",\n", + " version=\"master\",\n", + " username=\"sshah\",\n", + " queue=\"maap-dps-worker-16gb\",\n", + " num_jobs=100)\n", + "print(job)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "scientific-shakespeare", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python [conda env:root] *", + "language": "python", + "name": "conda-root-py" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.4" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}