firethorn

changeset 4256:6a2034c6020a

Added some notes on testing TAP
author Stelios <stv@roe.ac.uk>
date Sun Jun 23 22:04:41 2019 +0100 (2019-06-23)
parents 1e066fd64fd9
children eab2fb94dea8
files doc/notes/stv/20190613-Testing.txt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/doc/notes/stv/20190613-Testing.txt	Sun Jun 23 22:04:41 2019 +0100
     1.3 @@ -0,0 +1,54 @@
     1.4 +#
     1.5 +# <meta:header>
     1.6 +#   <meta:licence>
     1.7 +#     Copyright (c) 2018, ROE (http://www.roe.ac.uk/)
     1.8 +#
     1.9 +#     This information is free software: you can redistribute it and/or modify
    1.10 +#     it under the terms of the GNU General Public License as published by
    1.11 +#     the Free Software Foundation, either version 3 of the License, or
    1.12 +#     (at your option) any later version.
    1.13 +#
    1.14 +#     This information is distributed in the hope that it will be useful,
    1.15 +#     but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.16 +#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.17 +#     GNU General Public License for more details.
    1.18 +#
    1.19 +#     You should have received a copy of the GNU General Public License
    1.20 +#     along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1.21 +#   </meta:licence>
    1.22 +# </meta:header>
    1.23 +#
    1.24 +#
    1.25 +
    1.26 +## Run 10 TAP queries in Parallel using stilts.jar
    1.27 +## Try to emulate what the Japanese validator is doing
    1.28 +for run in {1..10}
    1.29 +do
    1.30 +  java -jar stilts.jar tapquery tapurl=http://tap.roe.ac.uk/vsa sync=true adql="SELECT TOP 1 * from UKIDSSDR4PLUS.UKIDSSDetection" &;
    1.31 +done
    1.32 +
    1.33 +
    1.34 +
    1.35 +## --------------------------------------------------------------------
    1.36 +
    1.37 +
    1.38 +## Run  20 TAP Validators in Paralle
    1.39 +## Causes the Firethorn Container to stop responding, but not consistently
    1.40 +
    1.41 +python3
    1.42 +
    1.43 +
    1.44 +import os                                                                       
    1.45 +from multiprocessing import Pool                                                
    1.46 +
    1.47 +process_list = range(100)
    1.48 +	
    1.49 +def run_process(process_counter):                                                             
    1.50 +    print ("Starting RUN # " + str(process_counter))
    1.51 +    os.system('python3 -c "import firethorn_utils.tap_validator as validator;validator.main()" -ft=http://tap.roe.ac.uk/firethorn -r=60 -u= -p= -g= -mode=sync')                                       
    1.52 +    print ("Ended RUN # " + str(process_counter))
    1.53 +
    1.54 +
    1.55 +pool = Pool(processes=20)                                                        
    1.56 +pool.map(run_process, process_list)   
    1.57 +