<commit_before>#!/bin/bash
set -e

./docker-webapp.sh --clean

#create an api key for submitting test sampletab documents
docker-compose run --rm mongo mongo --eval 'db.mongoSampleTabApiKey.insert({"_id" : "fooqwerty", "_class" : "uk.ac.ebi.biosamples.mongo.model.MongoSampleTabApiKey", "userName" : "BioSamples", "publicEmail" : "", "publicUrl" : "", "contactName" : "", "contactEmail" : "", "aapDomain" : "<KEY>" });' mongo:27017/biosamples

#create an API key like:
#"".join([random.choice("<KEY>") for x in xrange(16)])
#


docker-compose up -d biosamples-agents-solr


#--spring.profiles.active=default,big

for X in 1 2 3 4 5
do
  #java -jar integration/target/integration-4.0.0-SNAPSHOT.jar --phase=$X $ARGS $@
  docker-compose run --rm --service-ports biosamples-integration java -jar integration-4.0.9-SNAPSHOT.jar --phase=$X $ARGS $@
  sleep 30 #solr is configured to commit every 5 seconds

done

#leave the agent up at the end
docker-compose up -d biosamples-agents-solr

echo "Successfully completed"
<commit_msg>enable local mongo perf logging on testing<commit_after>#!/bin/bash
set -e

./docker-webapp.sh --clean

#create an api key for submitting test sampletab documents
docker-compose run --rm mongo mongo --eval 'db.mongoSampleTabApiKey.insert({"_id" : "fooqwerty", "_class" : "uk.ac.ebi.biosamples.mongo.model.MongoSampleTabApiKey", "userName" : "BioSamples", "publicEmail" : "", "publicUrl" : "", "contactName" : "", "contactEmail" : "", "aapDomain" : "<KEY>" });' mongo:27017/biosamples
#profile any queries that take longer than 100 ms
docker-compose run --rm mongo mongo --eval 'db.setProfilingLevel(1)' mongo:27017/biosamples

#create an API key like:
#"".join([random.choice("<KEY>") for x in xrange(16)])
#

docker-compose up -d biosamples-agents-solr

#ARGS=--spring.profiles.active=big
for X in 1 2 3 4 5
do
  #java -jar integration/target/integration-4.0.0-SNAPSHOT.jar --phase=$X $ARGS $@
  docker-compose run --rm --service-ports biosamples-integration java -jar integration-4.0.9-SNAPSHOT.jar --phase=$X $ARGS $@
  sleep 30 #solr is configured to commit every 5 seconds

done

#leave the agent up at the end
docker-compose up -d biosamples-agents-solr

echo "Successfully completed"

{'fraction_non_alphanumeric': 0.15110509697789806, 'fraction_numerical': 0.023004059539918808, 'mean_word_length': 4.383495145631068, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1510148', 'n_tokens_mistral': 835, 'n_tokens_neox': 766, 'n_words': 217}