idsperf

idsperf profile performance of access layer operations on dataset. timing and performance information for different types of operations on IDS data with the IMAS Python Access Layer

Syntax idsperf

$ idsperf -h
Usage: idsperf [-h] -u URI [-t SLICE_TIME [SLICE_TIME ...] | -a] [-m]
               [--repeat REPEAT] [--verbose] [--show-stats] [--profile]
               [-o OUTPUT_RUN] [-uri-out URI_OUT]
               [ids ...]

This script gives simple timing and performance information for different
types ofoperations on IDS data with the IMAS Python Access Layer
(get/get_slice/put depending on selected options)

Positional Arguments:
  ids                   IDS name(s) (leave empty to select all IDSs with
                        default occurrence, orappend "/n" to copy a specific
                        occurrence "n")

Options:
  -h, --help            show this help message and exit
  -u, --uri URI         URI of the dataentry (e.g, imas:hdf5?path=./testdb or
                        ./testpulse.nc)
  -t, --slice-time SLICE_TIME [SLICE_TIME ...]
                        Use get_slice with selected time(s)
  -a, --all_slices      Use get_slice with all available times
  -m, --memory-backend  Use MEMORY_BACKEND for this test (involve reading from
                        file and loading in memory first)
  --repeat REPEAT       Repeat timing n times (default: 1)
  --verbose             Verbose mode, prints additional information
  --show-stats          Print addition stats for timings
  --profile             Also do full profile of the selected operation, via
                        cProfile
  -o, --output-run OUTPUT_RUN
                        Output run number for checking perf of put
  -uri-out, --uri-out URI_OUT
                        uri out (default=None)

Example idsperf (all idses)

$ idsperf --uri "imas:mdsplus?user=public;pulse=134174;run=117;database=ITER;version=3"
 core_profiles best time = 0.6623046789318323 s
 core_sources best time = 1.94440508633852 s
 core_transport best time = 1.0141447838395834 s
 edge_profiles best time = 53.781732397153974 s
 edge_sources best time = 46.661303512752056 s
 edge_transport best time = 42.719197848811746 s
 equilibrium best time = 1.617150105535984 s
 summary best time = 0.11679761670529842 s

Example idsperf (one ids)

$ idsperf --uri "imas:mdsplus?user=public;pulse=134174;run=117;database=ITER;version=3" equilibrium
equilibrium best time = 0.594751663506031 s

Example idsperf (Show statistics –phowStats –repeat)

$ idsperf --uri "imas:mdsplus?user=public;pulse=134174;run=117;database=ITER;version=3" equilibrium --show-stats --repeat 2
All timings  = [0.6099375672638416, 0.37836710922420025]
Mean         = 0.49415233824402094
Standard dev = 0.1637450412023053
Variance     = 0.026812438518344653
equilibrium best time = 0.37836710922420025 s

Example idsperf (All slices get_slice performance)

$ idsperf --uri "imas:mdsplus?user=public;pulse=134174;run=117;database=ITER;version=3" equilibrium  -a
equilibrium best time = 0.6877284124493599 s

Example idsperf (single SLICETIME get_slice performance)

$ idsperf --uri "imas:mdsplus?user=public;pulse=134174;run=117;database=ITER;version=3" equilibrium  -t 50
equilibrium best time = 0.24298583157360554 s

Example idsperf (put operation)

$ idsperf --uri "imas:mdsplus?user=public;pulse=134174;run=117;database=ITER;version=3" equilibrium --uri-out "imas:mdsplus?user=<username>;pulse=134174;run=412;database=ITER;version=3"
equilibrium best time = 0.5934083554893732 s

Example idsperf (memory backend)

$ idsperf --uri "imas:mdsplus?user=public;pulse=134174;run=117;database=ITER;version=3" equilibrium  -t 50 -m
First import data into memory...
equilibrium best time = 0.003830520436167717 s