github.com/uvalib/orcid-access-ws@v0.0.0-20250612130209-7d062dbabf9d/scripts/load/basic.ksh (about)

     1  #
     2  # basic load test
     3  #
     4  
     5  if [ -z "$ORCIDACCESS_URL" ]; then
     6     echo "ERROR: ORCIDACCESS_URL is not defined"
     7     exit 1
     8  fi
     9  
    10  if [ -z "$API_TOKEN" ]; then
    11     echo "ERROR: API_TOKEN is not defined"
    12     exit 1
    13  fi
    14  
    15  LT=../../bin/bombardier
    16  if [ ! -f "$LT" ]; then
    17     echo "ERROR: Bombardier is not available"
    18     exit 1
    19  fi
    20  
    21  # set the test parameters
    22  endpoint=$ORCIDACCESS_URL
    23  concurrent=10
    24  count=1000
    25  url=cid/dpg3k?auth=$API_TOKEN
    26  
    27  CMD="$LT -c $concurrent -n $count -l $endpoint/$url"
    28  echo "Host = $endpoint, count = $count, concurrency = $concurrent"
    29  echo $CMD
    30  $CMD
    31  exit $?
    32  
    33  #
    34  # end of file
    35  #