Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
#!/bin/bash
base_url="http://fedoraAdmin:fedoraAdmin@localhost:8080/fedora"
num=0

RuntimePrint()
{
 duration=$(echo "scale=3;(${m2t}-${m1t})/(1*10^09)"|bc|sed 's/^\./0./')
 echo -e "${duration}\tsec"
 echo -e "${i} ${duration}" >> /data/fcrepo3-total-create-object-time
}

if [ ! -d /data/tmp ]; then
  mkdir /data/tmp
fi

cd /data/tmp

for i in $( cat /data/object_ids ); do 
  num=$[$num +1]
  echo "($num): $i"
  mkdir /data/tmp/$i

  scp lyberadmin@salt-data-prod:/data/assets/$i/* /data/tmp/$i &> /dev/null
  m1t=$(date +%s%N); m1l=$LINENO
    curl -X POST "$base_url/objects/druid:$i" &> /dev/null
    cd /data/tmp/$i

    for f in $( ls ); do
      ate-datastream-time curl -X POST --data-binary @$f "$base_url/objects/druid:$i/datastreams/$f?controlGroup=M"  &> /dev/null
    done

  m2t=$(date +%s%N); m2l=$LINENO; RuntimePrint
    rm -rf /data/tmp/$i
done

 

Test 1b: Iteration

 

 

Test 1c: 8-thread test

 

 

Test 1d: 8-thread iteration test

 

Test 2: Simple Ingest into Fedora 4

...