benchmark.sh 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/sh
  2. # Here we test the limit of the number of layers
  3. # @preprocess
  4. # The region setting should work for UTM and LL test locations
  5. # temporary disabled test for performance reason
  6. g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
  7. export GRASS_OVERWRITE=1
  8. MAP_LIST="map_list.txt"
  9. rm ${MAP_LIST}
  10. NUM_MAPS=50000
  11. count=1
  12. while [ $count -lt ${NUM_MAPS} ]; do
  13. name="test_bench_${count}"
  14. r.mapcalc --quiet expr="${name} = ${count}"
  15. echo ${name} >> ${MAP_LIST}
  16. count=$((count + 1))
  17. done
  18. t.create type=strds temporaltype=absolute output=benchmark1 title="Benchmark1" descr="Benchmark1 dataset"
  19. t.create type=strds temporaltype=absolute output=benchmark2 title="Benchmark2" descr="Benchmark2 dataset"
  20. echo "### Register maps"
  21. time t.register -i input=benchmark1 file=${MAP_LIST} start="2001-01-01 00:00:00" increment="1 hours"
  22. time t.register -i input=benchmark2 file=${MAP_LIST} start="2001-01-01 00:00:00" increment="1 hours"
  23. echo "### List maps"
  24. time t.rast.list input=benchmark1 column=name,start_time > "/dev/null"
  25. time t.rast.list input=benchmark2 column=name,start_time > "/dev/null"
  26. echo "### Remove STRDS and maps"
  27. time t.remove -rf type=strds input=benchmark1
  28. echo "### Remove STRDS"
  29. time t.remove type=strds input=benchmark2