github.com/unigraph-dev/dgraph@v1.1.1-0.20200923154953-8b52b426f765/query/benchmark/README.md (about) 1 ```shell 2 dgraph -dumpsg dumpsg -port 8912 3 ``` 4 5 # Actors query 6 7 We increase the number of actors until we hit just a little below the max. 8 9 ```shell 10 rm -Rf dumpsg 11 12 NUMS="10 56 300" 13 14 for NUM in $NUMS; do 15 curl localhost:8912/query -XPOST -d "{ 16 me(_xid_:m.08624h) { 17 type.object.name.en 18 film.actor.film(first: $NUM) { 19 film.performance.film { 20 type.object.name.en 21 } 22 } 23 } 24 }" 2>/dev/null | python -m json.tool | wc -l 25 done 26 27 n=0 28 for S in dumpsg/*.gob; do 29 echo $S 30 cp -f $S /tmp/actor.${n}.gob 31 n=$(($n+1)) 32 done 33 ``` 34 35 # Directors query 36 37 We increase the number of directors until we hit just a little below the max. 38 39 ```shell 40 rm -Rf dumpsg 41 42 NUMS="10 31 100" 43 44 for NUM in $NUMS; do 45 curl localhost:8912/query -XPOST -d "{ 46 me(_xid_:m.05dxl_) { 47 type.object.name.en 48 film.director.film(first: $NUM) { 49 film.film.genre { 50 type.object.name.en 51 } 52 } 53 } 54 }" 2>/dev/null | python -m json.tool | wc -l 55 done 56 57 n=0 58 for S in dumpsg/*.gob; do 59 echo $S 60 cp -f $S /tmp/director.${n}.gob 61 n=$(($n+1)) 62 done 63 ``` 64 65 # Copy to benchmarks directory 66 67 ```shell 68 cp -vf /tmp/*.gob ./ 69 ``` 70 71 Just run `run.sh` to regenerate these gob files. These gob files are just 72 serialized SubGraph objects. 73 74 Just two things to note before running `run.sh`: 75 76 1. Run it in this directory so that it generates the files here. 77 1. Remember to specify `DATADIR`. This is the location of your posting list data after running `dgraph-live-loader`.