-
Notifications
You must be signed in to change notification settings - Fork 35
/
test_xml.sh
executable file
·54 lines (47 loc) · 2.2 KB
/
test_xml.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
set -e
#FILES=`ls xml/*.xml xml/*.xml.bz2 xml/*.xml.gz`
FILES=`ls xml/*.xml xml/*.xml.gz`
for f in $FILES
do
echo ""
echo ""
echo ""
echo "=================================================================="
echo "Processing file $f"
echo ""
echo "Go code generation"
/usr/bin/time -f "%E %M" ./chidley -W $f > test/Test.go
cd test
go build
echo "Generated code: convert to JSON"
/usr/bin/time -f "%E %M" ./test -j > /dev/null
echo "Generated code: convert to JSON, streaming"
/usr/bin/time -f "%E %M" ./test -j -s > /dev/null
echo "Generated code: convert to XML"
/usr/bin/time -f "%E %M" ./test -x > /dev/null
echo "Generated code: convert to XML, streamingb"
/usr/bin/time -f "%E %M" ./test -x -s > /dev/null
cd ..
echo "Java code generation"
/usr/bin/time -f "%E %M" ./chidley -J $f
cd java
mvn package
export CLASSPATH=target/jaxb-1.0-SNAPSHOT.jar:$CLASSPATH:/home/gnewton/.m2/repository
echo "Running Java/JAXB XML -> JSON"
/usr/bin/time -f "%E %M" java ca.gnewton.chidley.jaxb.Main > /dev/null
cd ..
done
# From: http://www.ncbi.nlm.nih.gov/books/NBK25500/ and from openstreetmap.org
declare -a URLS=('http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=science[journal]+AND+breast+cancer+AND+2008[pdat]' 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=science[journal]+AND+breast+cancer+AND+2008[pdat]&usehistory=y' 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=protein&id=6678417,9507199,28558982,28558984,28558988,28558990' 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=protein&db=protein&id=15718680&term=rat[orgn]+AND+srcdb+refseq[prop]&cmd=neighbor_history' 'http://eutils.ncbi.nlm.nih.gov/gquery?term=mouse[orgn]&retmode=xml' 'http://api06.dev.openstreetmap.org/api/capabilities' 'http://api.openstreetmap.org/api/0.6/trackpoints?bbox=0,51.5,0.25,51.75&page=0')
# for u in "${URLS[@]}"
# do
# echo "#=================================================================="
# echo "# $u "
# ./chidley -V -u -s "" -p "T_" -a "Att_" "$u"
# cd chidleyVerity
# go build
# ./chidleyVerity
# cd ..
# echo "#"
# done