{ "cells": [ { "cell_type": "markdown", "id": "83b7a7bd-1878-451b-8b6f-a49286dc557d", "metadata": {}, "source": [ "## VirES - magnetic model benchmark - testing server\n", "\n", "Assess perfomance of the VirES magnetic model evaluation and other parameters wrt. the plain data rerival. \n", "Get per sample times.\n", "\n", "See also [VirES Python Client](https://github.com/ESA-VirES/VirES-Python-Client)" ] }, { "cell_type": "code", "execution_count": 1, "id": "91b3ce04-2e60-4a49-b7a5-390ce105945a", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "P1D pass #1\n", "86400 6.54s plain request\n", "86400 1.5s plain request (cached)\n", "86400 1.53s filter: Flags_B != 255\n", "86400 7.1s aux.var.: MLT, QDLat\n", "86400 1.78s model: CHAOS-Core\n", "86400 3.93s model: CHAOS-Static80\n", "86400 13.9s model: CHAOS-Static\n", "86400 7.35s model: CHAOS-MMA-Primary\n", "86400 5.13s model: CHAOS-MMA-Secondary\n", "86400 2.51s model: CHAOS-MMA\n", "86400 4.05s model: CHAOS80\n", "86400 14.2s model: CHAOS\n", "86400 18.9s model: MIO_SHA_2C-Primary\n", "86400 18.7s model: MIO_SHA_2C-Secondary\n", "86400 35s model: MIO_SHA_2C\n", "P1D pass #2\n", "86400 1.27s plain request\n", "86400 1.32s plain request (cached)\n", "86387 0.627s filter: Flags_B != 255\n", "86400 1.11s aux.var.: MLT, QDLat\n", "86400 1.91s model: CHAOS-Core\n", "86400 3.01s model: CHAOS-Static80\n", "86400 13.6s model: CHAOS-Static\n", "86400 0.728s model: CHAOS-MMA-Primary\n", "86400 3.18s model: CHAOS-MMA-Secondary\n", "86400 0.748s model: CHAOS-MMA\n", "86400 4.67s model: CHAOS80\n", "86400 13.8s model: CHAOS\n", "86400 17.7s model: MIO_SHA_2C-Primary\n", "86400 18.5s model: MIO_SHA_2C-Secondary\n", "86400 34.5s model: MIO_SHA_2C\n", "P1D pass #3\n", "86400 1.72s plain request\n", "86400 1.38s plain request (cached)\n", "86400 1.21s filter: Flags_B != 255\n", "86400 3.12s aux.var.: MLT, QDLat\n", "86400 17s model: CHAOS-Core\n", "86400 5.55s model: CHAOS-Static80\n", "86400 14.4s model: CHAOS-Static\n", "86400 1.5s model: CHAOS-MMA-Primary\n", "86400 4.57s model: CHAOS-MMA-Secondary\n", "86400 1.48s model: CHAOS-MMA\n", "86400 4.77s model: CHAOS80\n", "86400 14.5s model: CHAOS\n", "86400 18s model: MIO_SHA_2C-Primary\n", "86400 17.5s model: MIO_SHA_2C-Secondary\n", "86400 33.6s model: MIO_SHA_2C\n", "P1D pass #4\n", "86400 0.965s plain request\n", "86400 0.524s plain request (cached)\n", "86400 0.77s filter: Flags_B != 255\n", "86400 0.968s aux.var.: MLT, QDLat\n", "86400 2.1s model: CHAOS-Core\n", "86400 3.01s model: CHAOS-Static80\n", "86400 15.6s model: CHAOS-Static\n", "86400 4.89s model: CHAOS-MMA-Primary\n", "86400 0.755s model: CHAOS-MMA-Secondary\n", "86400 0.821s model: CHAOS-MMA\n", "86400 3.78s model: CHAOS80\n", "86400 13.7s model: CHAOS\n", "86400 17.5s model: MIO_SHA_2C-Primary\n", "86400 17.9s model: MIO_SHA_2C-Secondary\n", "86400 33.8s model: MIO_SHA_2C\n", "P1D pass #5\n", "86400 1.29s plain request\n", "86400 0.817s plain request (cached)\n", "86400 0.597s filter: Flags_B != 255\n", "86400 0.732s aux.var.: MLT, QDLat\n", "86400 0.877s model: CHAOS-Core\n", "86400 3.66s model: CHAOS-Static80\n", "86400 13.3s model: CHAOS-Static\n", "86400 0.899s model: CHAOS-MMA-Primary\n", "86400 0.704s model: CHAOS-MMA-Secondary\n", "86400 0.703s model: CHAOS-MMA\n", "86400 3.68s model: CHAOS80\n", "86400 13.6s model: CHAOS\n", "86400 29.5s model: MIO_SHA_2C-Primary\n", "86400 17.3s model: MIO_SHA_2C-Secondary\n", "86400 34.1s model: MIO_SHA_2C\n", "P1D pass #6\n", "86400 0.985s plain request\n", "86400 0.571s plain request (cached)\n", "86400 1.99s filter: Flags_B != 255\n", "86400 1.23s aux.var.: MLT, QDLat\n", "86400 2.68s model: CHAOS-Core\n", "86400 3.04s model: CHAOS-Static80\n", "86400 14.5s model: CHAOS-Static\n", "86400 1.35s model: CHAOS-MMA-Primary\n", "86400 4.67s model: CHAOS-MMA-Secondary\n", "86400 0.764s model: CHAOS-MMA\n", "86400 3.76s model: CHAOS80\n", "86400 13.7s model: CHAOS\n", "86400 17.5s model: MIO_SHA_2C-Primary\n", "86400 18.4s model: MIO_SHA_2C-Secondary\n", "86400 35.3s model: MIO_SHA_2C\n", "P1D pass #7\n", "86400 1.26s plain request\n", "86400 1.14s plain request (cached)\n", "86400 0.541s filter: Flags_B != 255\n", "86400 1.97s aux.var.: MLT, QDLat\n", "86400 1.48s model: CHAOS-Core\n", "86400 3.08s model: CHAOS-Static80\n", "86400 13.4s model: CHAOS-Static\n", "86400 1.57s model: CHAOS-MMA-Primary\n", "86400 1.09s model: CHAOS-MMA-Secondary\n", "86400 0.85s model: CHAOS-MMA\n", "86400 3.34s model: CHAOS80\n", "86400 13.9s model: CHAOS\n", "86400 17.5s model: MIO_SHA_2C-Primary\n", "86400 17.4s model: MIO_SHA_2C-Secondary\n", "86400 34.2s model: MIO_SHA_2C\n", "P1D pass #8\n", "86400 1.02s plain request\n", "86400 1.88s plain request (cached)\n", "86400 0.999s filter: Flags_B != 255\n", "86400 0.876s aux.var.: MLT, QDLat\n", "86400 1.02s model: CHAOS-Core\n", "86400 2.93s model: CHAOS-Static80\n", "86400 13.8s model: CHAOS-Static\n", "86400 1.44s model: CHAOS-MMA-Primary\n", "86400 1.02s model: CHAOS-MMA-Secondary\n", "86400 0.764s model: CHAOS-MMA\n", "86400 3.97s model: CHAOS80\n", "86400 13.7s model: CHAOS\n", "86400 17.4s model: MIO_SHA_2C-Primary\n", "86400 17.7s model: MIO_SHA_2C-Secondary\n", "86400 34.9s model: MIO_SHA_2C\n", "P1D pass #9\n", "86400 0.907s plain request\n", "86400 1.49s plain request (cached)\n", "86400 1.17s filter: Flags_B != 255\n", "86400 1.66s aux.var.: MLT, QDLat\n", "86400 0.855s model: CHAOS-Core\n", "86400 3.35s model: CHAOS-Static80\n", "86400 14s model: CHAOS-Static\n", "86400 0.927s model: CHAOS-MMA-Primary\n", "86400 1.66s model: CHAOS-MMA-Secondary\n", "86400 1.51s model: CHAOS-MMA\n", "86400 3.36s model: CHAOS80\n", "86400 14s model: CHAOS\n", "86400 17.2s model: MIO_SHA_2C-Primary\n", "86400 17.5s model: MIO_SHA_2C-Secondary\n", "86400 34s model: MIO_SHA_2C\n", "P1D pass #10\n", "86400 1.26s plain request\n", "86400 0.553s plain request (cached)\n", "86400 1.51s filter: Flags_B != 255\n", "86400 1.12s aux.var.: MLT, QDLat\n", "86400 1.57s model: CHAOS-Core\n", "86400 3.73s model: CHAOS-Static80\n", "86400 13.4s model: CHAOS-Static\n", "86400 1.63s model: CHAOS-MMA-Primary\n", "86400 0.642s model: CHAOS-MMA-Secondary\n", "86400 1.4s model: CHAOS-MMA\n", "86400 4.03s model: CHAOS80\n", "86400 13.7s model: CHAOS\n", "86400 17.4s model: MIO_SHA_2C-Primary\n", "86400 19.5s model: MIO_SHA_2C-Secondary\n", "86400 33.9s model: MIO_SHA_2C\n", "PT6H pass #1\n", "21600 1.36s plain request\n", "21600 1.09s plain request (cached)\n", "21600 0.76s filter: Flags_B != 255\n", "21600 0.707s aux.var.: MLT, QDLat\n", "21600 0.688s model: CHAOS-Core\n", "21600 1.1s model: CHAOS-Static80\n", "21600 4.11s model: CHAOS-Static\n", "21600 1.57s model: CHAOS-MMA-Primary\n", "21600 0.542s model: CHAOS-MMA-Secondary\n", "21600 0.878s model: CHAOS-MMA\n", "21600 1.23s model: CHAOS80\n", "21600 3.79s model: CHAOS\n", "21600 4.6s model: MIO_SHA_2C-Primary\n", "21600 5.4s model: MIO_SHA_2C-Secondary\n", "21600 9.78s model: MIO_SHA_2C\n", "PT6H pass #2\n", "21600 0.763s plain request\n", "21600 0.563s plain request (cached)\n", "21600 1.01s filter: Flags_B != 255\n", "21600 1.3s aux.var.: MLT, QDLat\n", "21600 0.525s model: CHAOS-Core\n", "21600 1.03s model: CHAOS-Static80\n", "21600 3.6s model: CHAOS-Static\n", "21600 1.25s model: CHAOS-MMA-Primary\n", "21600 1.18s model: CHAOS-MMA-Secondary\n", "21600 0.83s model: CHAOS-MMA\n", "21600 2.22s model: CHAOS80\n", "21600 3.73s model: CHAOS\n", "21600 4.61s model: MIO_SHA_2C-Primary\n", "21600 5.29s model: MIO_SHA_2C-Secondary\n", "21600 9.02s model: MIO_SHA_2C\n", "PT6H pass #3\n", "21600 1.75s plain request\n", "21600 0.984s plain request (cached)\n", "21600 0.837s filter: Flags_B != 255\n", "21600 0.545s aux.var.: MLT, QDLat\n", "21600 0.621s model: CHAOS-Core\n", "21600 1.68s model: CHAOS-Static80\n", "21600 4.03s model: CHAOS-Static\n", "21600 0.731s model: CHAOS-MMA-Primary\n", "21600 0.718s model: CHAOS-MMA-Secondary\n", "21600 1.04s model: CHAOS-MMA\n", "21600 1.27s model: CHAOS80\n", "21600 4.86s model: CHAOS\n", "21600 5.65s model: MIO_SHA_2C-Primary\n", "21600 5.38s model: MIO_SHA_2C-Secondary\n", "21600 8.84s model: MIO_SHA_2C\n", "PT6H pass #4\n", "21600 0.973s plain request\n", "21600 0.888s plain request (cached)\n", "21600 0.889s filter: Flags_B != 255\n", "21600 1.12s aux.var.: MLT, QDLat\n", "21600 0.521s model: CHAOS-Core\n", "21600 1.75s model: CHAOS-Static80\n", "21600 3.64s model: CHAOS-Static\n", "21600 0.578s model: CHAOS-MMA-Primary\n", "21600 1.3s model: CHAOS-MMA-Secondary\n", "21600 1.53s model: CHAOS-MMA\n", "21600 2.31s model: CHAOS80\n", "21600 3.92s model: CHAOS\n", "21600 5.34s model: MIO_SHA_2C-Primary\n", "21600 4.62s model: MIO_SHA_2C-Secondary\n", "21600 9.82s model: MIO_SHA_2C\n", "PT6H pass #5\n", "21600 0.758s plain request\n", "21600 0.583s plain request (cached)\n", "21600 0.393s filter: Flags_B != 255\n", "21600 0.889s aux.var.: MLT, QDLat\n", "21600 1.09s model: CHAOS-Core\n", "21600 1.03s model: CHAOS-Static80\n", "21600 4.03s model: CHAOS-Static\n", "21600 0.507s model: CHAOS-MMA-Primary\n", "21600 1.12s model: CHAOS-MMA-Secondary\n", "21600 0.711s model: CHAOS-MMA\n", "21600 1.9s model: CHAOS80\n", "21600 4.27s model: CHAOS\n", "21600 5.28s model: MIO_SHA_2C-Primary\n", "21600 4.64s model: MIO_SHA_2C-Secondary\n", "21600 9.95s model: MIO_SHA_2C\n", "PT6H pass #6\n", "21600 1.3s plain request\n", "21600 1.1s plain request (cached)\n", "21600 1.12s filter: Flags_B != 255\n", "21600 0.463s aux.var.: MLT, QDLat\n", "21600 0.535s model: CHAOS-Core\n", "21600 1.44s model: CHAOS-Static80\n", "21600 4.54s model: CHAOS-Static\n", "21600 0.661s model: CHAOS-MMA-Primary\n", "21600 0.542s model: CHAOS-MMA-Secondary\n", "21600 0.583s model: CHAOS-MMA\n", "21600 1.97s model: CHAOS80\n", "21600 3.71s model: CHAOS\n", "21600 4.69s model: MIO_SHA_2C-Primary\n", "21600 5.59s model: MIO_SHA_2C-Secondary\n", "21600 8.86s model: MIO_SHA_2C\n", "PT6H pass #7\n", "21600 0.718s plain request\n", "21600 0.981s plain request (cached)\n", "21600 1.08s filter: Flags_B != 255\n", "21600 0.798s aux.var.: MLT, QDLat\n", "21600 0.594s model: CHAOS-Core\n", "21600 2.15s model: CHAOS-Static80\n", "21600 4.25s model: CHAOS-Static\n", "21600 0.986s model: CHAOS-MMA-Primary\n", "21600 0.506s model: CHAOS-MMA-Secondary\n", "21600 0.615s model: CHAOS-MMA\n", "21600 2.33s model: CHAOS80\n", "21600 4.21s model: CHAOS\n", "21600 4.8s model: MIO_SHA_2C-Primary\n", "21600 5.04s model: MIO_SHA_2C-Secondary\n", "21600 9.25s model: MIO_SHA_2C\n", "PT6H pass #8\n", "21600 1.13s plain request\n", "21600 0.872s plain request (cached)\n", "21600 1.17s filter: Flags_B != 255\n", "21600 1.18s aux.var.: MLT, QDLat\n", "21600 0.504s model: CHAOS-Core\n", "21600 2.14s model: CHAOS-Static80\n", "21600 3.77s model: CHAOS-Static\n", "21600 1.09s model: CHAOS-MMA-Primary\n", "21600 0.613s model: CHAOS-MMA-Secondary\n", "21600 1.68s model: CHAOS-MMA\n", "21600 1.25s model: CHAOS80\n", "21600 4.12s model: CHAOS\n", "21600 5.32s model: MIO_SHA_2C-Primary\n", "21600 4.69s model: MIO_SHA_2C-Secondary\n", "21600 9.58s model: MIO_SHA_2C\n", "PT6H pass #9\n", "21600 1.14s plain request\n", "21600 0.784s plain request (cached)\n", "21600 0.473s filter: Flags_B != 255\n", "21600 1.16s aux.var.: MLT, QDLat\n", "21600 0.975s model: CHAOS-Core\n", "21600 1.47s model: CHAOS-Static80\n", "21600 3.66s model: CHAOS-Static\n", "21600 1.2s model: CHAOS-MMA-Primary\n", "21600 0.531s model: CHAOS-MMA-Secondary\n", "21600 1.38s model: CHAOS-MMA\n", "21600 2.09s model: CHAOS80\n", "21600 4.04s model: CHAOS\n", "21600 5.5s model: MIO_SHA_2C-Primary\n", "21600 5.63s model: MIO_SHA_2C-Secondary\n", "21600 9.91s model: MIO_SHA_2C\n", "PT6H pass #10\n", "21600 1.27s plain request\n", "21600 0.424s plain request (cached)\n", "21600 1.05s filter: Flags_B != 255\n", "21600 1.18s aux.var.: MLT, QDLat\n", "21600 0.449s model: CHAOS-Core\n", "21600 1.87s model: CHAOS-Static80\n", "21600 3.71s model: CHAOS-Static\n", "21600 1.14s model: CHAOS-MMA-Primary\n", "21600 0.413s model: CHAOS-MMA-Secondary\n", "21600 0.744s model: CHAOS-MMA\n", "21600 2.11s model: CHAOS80\n", "21600 3.71s model: CHAOS\n", "21600 4.67s model: MIO_SHA_2C-Primary\n", "21600 4.69s model: MIO_SHA_2C-Secondary\n", "21600 9.9s model: MIO_SHA_2C\n", "PT1H pass #1\n", "3600 0.551s plain request\n", "3600 0.424s plain request (cached)\n", "3600 0.403s filter: Flags_B != 255\n", "3600 0.393s aux.var.: MLT, QDLat\n", "3600 0.389s model: CHAOS-Core\n", "3600 0.59s model: CHAOS-Static80\n", "3600 1.02s model: CHAOS-Static\n", "3600 0.461s model: CHAOS-MMA-Primary\n", "3600 0.545s model: CHAOS-MMA-Secondary\n", "3600 0.438s model: CHAOS-MMA\n", "3600 0.622s model: CHAOS80\n", "3600 0.974s model: CHAOS\n", "3600 1.16s model: MIO_SHA_2C-Primary\n", "3600 1.17s model: MIO_SHA_2C-Secondary\n", "3600 1.89s model: MIO_SHA_2C\n", "PT1H pass #2\n", "3600 0.629s plain request\n", "3600 0.43s plain request (cached)\n", "3600 0.408s filter: Flags_B != 255\n", "3600 0.446s aux.var.: MLT, QDLat\n", "3600 0.449s model: CHAOS-Core\n", "3600 0.528s model: CHAOS-Static80\n", "3600 1.05s model: CHAOS-Static\n", "3600 0.384s model: CHAOS-MMA-Primary\n", "3600 0.42s model: CHAOS-MMA-Secondary\n", "3600 0.443s model: CHAOS-MMA\n", "3600 0.629s model: CHAOS80\n", "3600 1.03s model: CHAOS\n" ] }, { "ename": "RuntimeError", "evalue": "Server error. Or perhaps the request is invalid? Check the output of: print(request) and print(request._request.decode())", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mHTTPError\u001b[0m Traceback (most recent call last)", "File \u001b[0;32m/opt/conda/lib/python3.9/site-packages/viresclient/_wps/wps.py:317\u001b[0m, in \u001b[0;36mWPS10Service._retrieve\u001b[0;34m(self, request, response_handler, error_handler)\u001b[0m\n\u001b[1;32m 316\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 317\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m closing(\u001b[43murlopen\u001b[49m\u001b[43m(\u001b[49m\u001b[43mrequest\u001b[49m\u001b[43m)\u001b[49m) \u001b[38;5;28;01mas\u001b[39;00m file_in:\n\u001b[1;32m 318\u001b[0m output \u001b[38;5;241m=\u001b[39m (response_handler \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_default_handler)(file_in)\n", "File \u001b[0;32m/opt/conda/lib/python3.9/urllib/request.py:214\u001b[0m, in \u001b[0;36murlopen\u001b[0;34m(url, data, timeout, cafile, capath, cadefault, context)\u001b[0m\n\u001b[1;32m 213\u001b[0m opener \u001b[38;5;241m=\u001b[39m _opener\n\u001b[0;32m--> 214\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mopener\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mopen\u001b[49m\u001b[43m(\u001b[49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mdata\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtimeout\u001b[49m\u001b[43m)\u001b[49m\n", "File \u001b[0;32m/opt/conda/lib/python3.9/urllib/request.py:523\u001b[0m, in \u001b[0;36mOpenerDirector.open\u001b[0;34m(self, fullurl, data, timeout)\u001b[0m\n\u001b[1;32m 522\u001b[0m meth \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mgetattr\u001b[39m(processor, meth_name)\n\u001b[0;32m--> 523\u001b[0m response \u001b[38;5;241m=\u001b[39m \u001b[43mmeth\u001b[49m\u001b[43m(\u001b[49m\u001b[43mreq\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mresponse\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 525\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m response\n", "File \u001b[0;32m/opt/conda/lib/python3.9/urllib/request.py:632\u001b[0m, in \u001b[0;36mHTTPErrorProcessor.http_response\u001b[0;34m(self, request, response)\u001b[0m\n\u001b[1;32m 631\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (\u001b[38;5;241m200\u001b[39m \u001b[38;5;241m<\u001b[39m\u001b[38;5;241m=\u001b[39m code \u001b[38;5;241m<\u001b[39m \u001b[38;5;241m300\u001b[39m):\n\u001b[0;32m--> 632\u001b[0m response \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mparent\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43merror\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 633\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mhttp\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mrequest\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mresponse\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcode\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mmsg\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mhdrs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 635\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m response\n", "File \u001b[0;32m/opt/conda/lib/python3.9/urllib/request.py:561\u001b[0m, in \u001b[0;36mOpenerDirector.error\u001b[0;34m(self, proto, *args)\u001b[0m\n\u001b[1;32m 560\u001b[0m args \u001b[38;5;241m=\u001b[39m (\u001b[38;5;28mdict\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mdefault\u001b[39m\u001b[38;5;124m'\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mhttp_error_default\u001b[39m\u001b[38;5;124m'\u001b[39m) \u001b[38;5;241m+\u001b[39m orig_args\n\u001b[0;32m--> 561\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_call_chain\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m)\u001b[49m\n", "File \u001b[0;32m/opt/conda/lib/python3.9/urllib/request.py:494\u001b[0m, in \u001b[0;36mOpenerDirector._call_chain\u001b[0;34m(self, chain, kind, meth_name, *args)\u001b[0m\n\u001b[1;32m 493\u001b[0m func \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mgetattr\u001b[39m(handler, meth_name)\n\u001b[0;32m--> 494\u001b[0m result \u001b[38;5;241m=\u001b[39m \u001b[43mfunc\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 495\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m result \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n", "File \u001b[0;32m/opt/conda/lib/python3.9/urllib/request.py:641\u001b[0m, in \u001b[0;36mHTTPDefaultErrorHandler.http_error_default\u001b[0;34m(self, req, fp, code, msg, hdrs)\u001b[0m\n\u001b[1;32m 640\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mhttp_error_default\u001b[39m(\u001b[38;5;28mself\u001b[39m, req, fp, code, msg, hdrs):\n\u001b[0;32m--> 641\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m HTTPError(req\u001b[38;5;241m.\u001b[39mfull_url, code, msg, hdrs, fp)\n", "\u001b[0;31mHTTPError\u001b[0m: HTTP Error 400: Bad Request", "\nDuring handling of the above exception, another exception occurred:\n", "\u001b[0;31mWPSError\u001b[0m Traceback (most recent call last)", "File \u001b[0;32m/opt/conda/lib/python3.9/site-packages/viresclient/_client.py:491\u001b[0m, in \u001b[0;36mClientRequest._get\u001b[0;34m(self, request, asynchronous, response_handler, message, show_progress, leave_progress_bar)\u001b[0m\n\u001b[1;32m 490\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m--> 491\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_wps_service\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\u001b[43mrequest\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mhandler\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mresponse_handler\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 492\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m WPSError:\n", "File \u001b[0;32m/opt/conda/lib/python3.9/site-packages/viresclient/_wps/wps.py:127\u001b[0m, in \u001b[0;36mWPS10Service.retrieve\u001b[0;34m(self, request, handler)\u001b[0m\n\u001b[1;32m 124\u001b[0m \u001b[38;5;124;03m\"\"\"Send a synchronous POST WPS request to a server and retrieve\u001b[39;00m\n\u001b[1;32m 125\u001b[0m \u001b[38;5;124;03mthe output.\u001b[39;00m\n\u001b[1;32m 126\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m--> 127\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_retrieve\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 128\u001b[0m \u001b[43m \u001b[49m\u001b[43mRequest\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mrequest\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mheaders\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mhandler\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43merror_handler\u001b[49m\n\u001b[1;32m 129\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n", "File \u001b[0;32m/opt/conda/lib/python3.9/site-packages/viresclient/_wps/wps.py:326\u001b[0m, in \u001b[0;36mWPS10Service._retrieve\u001b[0;34m(self, request, response_handler, error_handler)\u001b[0m\n\u001b[1;32m 325\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m error_handler:\n\u001b[0;32m--> 326\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43merror_handler\u001b[49m\u001b[43m(\u001b[49m\u001b[43merror\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 327\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m\n", "File \u001b[0;32m/opt/conda/lib/python3.9/site-packages/viresclient/_wps/wps.py:289\u001b[0m, in \u001b[0;36mWPS10Service.error_handler\u001b[0;34m(cls, http_error)\u001b[0m\n\u001b[1;32m 288\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m http_error\n\u001b[0;32m--> 289\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;28mcls\u001b[39m\u001b[38;5;241m.\u001b[39mparse_ows_exception(ows_exception, namespace)\n", "\u001b[0;31mWPSError\u001b[0m: WPS Request Failed! Reason: NoApplicableCode: Incompatible dimensions of the time and reshaped variable arrays.", "\nDuring handling of the above exception, another exception occurred:\n", "\u001b[0;31mRuntimeError\u001b[0m Traceback (most recent call last)", "Input \u001b[0;32mIn [1]\u001b[0m, in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 46\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mselection_time\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m pass #\u001b[39m\u001b[38;5;132;01m{\u001b[39;00midx\u001b[38;5;241m+\u001b[39m\u001b[38;5;241m1\u001b[39m\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 47\u001b[0m collection \u001b[38;5;241m=\u001b[39m get_random_collection(COLLECTIONS)\n\u001b[0;32m---> 48\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m record \u001b[38;5;129;01min\u001b[39;00m run_benchmark_set(SERVER_URL, collection, selection_time, TEST_CASES):\n\u001b[1;32m 49\u001b[0m write_record(record, log_file)\n", "File \u001b[0;32m~/jupyter_notebooks/MAG/MAG_LR_model_benchmark/benchmark.py:112\u001b[0m, in \u001b[0;36mrun_benchmark_set\u001b[0;34m(url, collection, selection_time, test_cases)\u001b[0m\n\u001b[1;32m 105\u001b[0m common_options \u001b[38;5;241m=\u001b[39m {\n\u001b[1;32m 106\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124murl\u001b[39m\u001b[38;5;124m\"\u001b[39m: url,\n\u001b[1;32m 107\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcollection\u001b[39m\u001b[38;5;124m\"\u001b[39m: collection,\n\u001b[1;32m 108\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mstart_time\u001b[39m\u001b[38;5;124m\"\u001b[39m: start_time,\n\u001b[1;32m 109\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mend_time\u001b[39m\u001b[38;5;124m\"\u001b[39m: end_time,\n\u001b[1;32m 110\u001b[0m }\n\u001b[1;32m 111\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m options \u001b[38;5;129;01min\u001b[39;00m test_cases:\n\u001b[0;32m--> 112\u001b[0m \u001b[38;5;28;01myield\u001b[39;00m \u001b[43mrun_benchmark\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mcommon_options\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[43m)\u001b[49m\n", "File \u001b[0;32m~/jupyter_notebooks/MAG/MAG_LR_model_benchmark/benchmark.py:77\u001b[0m, in \u001b[0;36mrun_benchmark\u001b[0;34m(url, description, collection, start_time, end_time, **options)\u001b[0m\n\u001b[1;32m 76\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mrun_benchmark\u001b[39m(url, description, collection, start_time, end_time, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39moptions):\n\u001b[0;32m---> 77\u001b[0m elapsed_time, size \u001b[38;5;241m=\u001b[39m \u001b[43mmeasure_request_duration\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 78\u001b[0m \u001b[43m \u001b[49m\u001b[43murl\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 79\u001b[0m \u001b[43m \u001b[49m\u001b[43mcollection\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcollection\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 80\u001b[0m \u001b[43m \u001b[49m\u001b[43mstart_time\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mstart_time\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 81\u001b[0m \u001b[43m \u001b[49m\u001b[43mend_time\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mend_time\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 82\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43moptions\u001b[49m\n\u001b[1;32m 83\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 84\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00msize\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m \u001b[39m\u001b[38;5;132;01m{\u001b[39;00melapsed_time\u001b[38;5;132;01m:\u001b[39;00m\u001b[38;5;124m.3g\u001b[39m\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124ms \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mdescription\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 85\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m {\n\u001b[1;32m 86\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtimestamp\u001b[39m\u001b[38;5;124m\"\u001b[39m: datetime\u001b[38;5;241m.\u001b[39mdatetime\u001b[38;5;241m.\u001b[39mnow(TZ_UTC),\n\u001b[1;32m 87\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mserverURL\u001b[39m\u001b[38;5;124m\"\u001b[39m: url,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 93\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdescription\u001b[39m\u001b[38;5;124m\"\u001b[39m: description,\n\u001b[1;32m 94\u001b[0m }\n", "File \u001b[0;32m~/jupyter_notebooks/MAG/MAG_LR_model_benchmark/benchmark.py:50\u001b[0m, in \u001b[0;36mmeasure_request_duration\u001b[0;34m(url, collection, start_time, end_time, auxiliaries, models, filters)\u001b[0m\n\u001b[1;32m 48\u001b[0m request\u001b[38;5;241m.\u001b[39madd_filter(filter_)\n\u001b[1;32m 49\u001b[0m request_start \u001b[38;5;241m=\u001b[39m time\u001b[38;5;241m.\u001b[39mperf_counter_ns()\n\u001b[0;32m---> 50\u001b[0m data \u001b[38;5;241m=\u001b[39m \u001b[43mrequest\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_between\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 51\u001b[0m \u001b[43m \u001b[49m\u001b[43mstart_time\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mstart_time\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 52\u001b[0m \u001b[43m \u001b[49m\u001b[43mend_time\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mend_time\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 53\u001b[0m \u001b[43m \u001b[49m\u001b[43masynchronous\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\u001b[43m,\u001b[49m\n\u001b[1;32m 54\u001b[0m \u001b[43m \u001b[49m\u001b[43mshow_progress\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\u001b[43m,\u001b[49m\n\u001b[1;32m 55\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 56\u001b[0m request_stop \u001b[38;5;241m=\u001b[39m time\u001b[38;5;241m.\u001b[39mperf_counter_ns()\n\u001b[1;32m 57\u001b[0m request_duration \u001b[38;5;241m=\u001b[39m (request_stop \u001b[38;5;241m-\u001b[39m request_start) \u001b[38;5;241m*\u001b[39m \u001b[38;5;241m1e-9\u001b[39m\n", "File \u001b[0;32m/opt/conda/lib/python3.9/site-packages/viresclient/_client.py:639\u001b[0m, in \u001b[0;36mClientRequest.get_between\u001b[0;34m(self, start_time, end_time, filetype, asynchronous, show_progress, show_progress_chunks, leave_intermediate_progress_bars, nrecords_limit, tmpdir)\u001b[0m\n\u001b[1;32m 637\u001b[0m _get_chunk(i, start_time_i, end_time_i)\n\u001b[1;32m 638\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m--> 639\u001b[0m \u001b[43m_get_chunk\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstart_time\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mend_time\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mleave_progress_bar\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m 641\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m retdatagroup\n", "File \u001b[0;32m/opt/conda/lib/python3.9/site-packages/viresclient/_client.py:609\u001b[0m, in \u001b[0;36mClientRequest.get_between.._get_chunk\u001b[0;34m(i, start_time_i, end_time_i, leave_progress_bar)\u001b[0m\n\u001b[1;32m 602\u001b[0m \u001b[38;5;66;03m# Make the request, as either asynchronous or synchronous\u001b[39;00m\n\u001b[1;32m 603\u001b[0m \u001b[38;5;66;03m# The response handler streams the data to the ReturnedData object\u001b[39;00m\n\u001b[1;32m 604\u001b[0m response_handler \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_response_handler(\n\u001b[1;32m 605\u001b[0m retdatafile,\n\u001b[1;32m 606\u001b[0m show_progress\u001b[38;5;241m=\u001b[39mshow_progress,\n\u001b[1;32m 607\u001b[0m leave_progress_bar\u001b[38;5;241m=\u001b[39mleave_progress_bar,\n\u001b[1;32m 608\u001b[0m )\n\u001b[0;32m--> 609\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_get\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 610\u001b[0m \u001b[43m \u001b[49m\u001b[43mrequest\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_request\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 611\u001b[0m \u001b[43m \u001b[49m\u001b[43masynchronous\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43masynchronous\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 612\u001b[0m \u001b[43m \u001b[49m\u001b[43mresponse_handler\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mresponse_handler\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 613\u001b[0m \u001b[43m \u001b[49m\u001b[43mmessage\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmessage\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 614\u001b[0m \u001b[43m \u001b[49m\u001b[43mshow_progress\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mshow_progress\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 615\u001b[0m \u001b[43m \u001b[49m\u001b[43mleave_progress_bar\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mleave_progress_bar\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 616\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n", "File \u001b[0;32m/opt/conda/lib/python3.9/site-packages/viresclient/_client.py:493\u001b[0m, in \u001b[0;36mClientRequest._get\u001b[0;34m(self, request, asynchronous, response_handler, message, show_progress, leave_progress_bar)\u001b[0m\n\u001b[1;32m 491\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_wps_service\u001b[38;5;241m.\u001b[39mretrieve(request, handler\u001b[38;5;241m=\u001b[39mresponse_handler)\n\u001b[1;32m 492\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m WPSError:\n\u001b[0;32m--> 493\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m(\n\u001b[1;32m 494\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mServer error. Or perhaps the request is invalid? \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 495\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mCheck the output of: print(request) and \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 496\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mprint(request._request.decode())\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 497\u001b[0m )\n\u001b[1;32m 498\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m AuthenticationError:\n\u001b[1;32m 499\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m AuthenticationError(AUTH_ERROR_TEXT)\n", "\u001b[0;31mRuntimeError\u001b[0m: Server error. Or perhaps the request is invalid? Check the output of: print(request) and print(request._request.decode())" ] } ], "source": [ "from benchmark import get_random_collection, run_benchmark_set, write_record\n", "\n", "SERVER_URL = \"https://testing.vires.services\"\n", "FILENAME = \"results/2022-11-14_testing_benchmark.log\"\n", "\n", "COLLECTIONS = [\"SW_OPER_MAGA_LR_1B\", \"SW_OPER_MAGB_LR_1B\", \"SW_OPER_MAGC_LR_1B\"]\n", "\n", "MODELS = [\n", " \"CHAOS-Core\",\n", " \"CHAOS-Static80 = 'CHAOS-Static'(max_degree=80)\",\n", " \"CHAOS-Static\",\n", " \"CHAOS-MMA-Primary\",\n", " \"CHAOS-MMA-Secondary\",\n", " \"CHAOS-MMA\",\n", " \"CHAOS80 = 'CHAOS-Core' + 'CHAOS-Static'(max_degree=80) + 'CHAOS-MMA-Primary' + 'CHAOS-MMA-Secondary'\",\n", " \"CHAOS\",\n", " \"MIO_SHA_2C-Primary\",\n", " \"MIO_SHA_2C-Secondary\",\n", " \"MIO_SHA_2C\",\n", "]\n", "\n", "TEST_CASES = [\n", " dict(description=\"plain request\"),\n", " dict(description=\"plain request (cached)\"),\n", " dict(description=\"filter: Flags_B != 255\", filters=[\"Flags_B != 255\"]),\n", " dict(description=\"aux.var.: MLT, QDLat\", auxiliaries=[\"MLT\", \"QDLat\"]),\n", " *(\n", " dict(description=f\"model: { model.partition('=')[0].strip() }\", models=[model])\n", " for model in MODELS \n", " ),\n", "]\n", "\n", "N_RUNS = 10\n", "\n", "SELECTION_TIMES = [\n", " \"P1D\",\n", " \"PT6H\",\n", " \"PT1H\",\n", " \"PT5M\",\n", "]\n", "\n", "\n", "with open(FILENAME, \"a\", encoding=\"utf8\") as log_file:\n", " for selection_time in SELECTION_TIMES:\n", " for idx in range(N_RUNS):\n", " print(f\"{selection_time} pass #{idx+1}\")\n", " collection = get_random_collection(COLLECTIONS)\n", " for record in run_benchmark_set(SERVER_URL, collection, selection_time, TEST_CASES):\n", " write_record(record, log_file)\n" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "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.9.7" } }, "nbformat": 4, "nbformat_minor": 5 }