This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HibernateScannUtil { | |
public static void scanAndAddAnnotatedClasses(Configuration configuration) { | |
ClassLoader classLoader = User.class.getClassLoader(); | |
URL url = ClasspathUrlFinder.findClassBase(User.class); | |
try { | |
AnnotationDB db = new AnnotationDB(); | |
db.setScanClassAnnotations(true); | |
db.setScanFieldAnnotations(false); | |
db.scanArchives(url); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Updagrade to lastest | |
sudo npm cache clean -f | |
sudo npm install -g n | |
sudo n stable | |
Downgrade to version | |
sudo npm cache clean -f | |
sudo npm install -g n | |
sudo n <version> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM java:8 | |
RUN wget http://mirror.nbtelecom.com.br/apache//jmeter/binaries/apache-jmeter-3.2.tgz | |
RUN tar -xvzf apache-jmeter-3.2.tgz | |
RUN rm apache-jmeter-3.2.tgz | |
RUN mv apache-jmeter-3.2 /jmeter | |
ENV JMETER_HOME /jmeter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM jmeter-base | |
WORKDIR $JMETER_HOME | |
# Ports to be exposed from the container for JMeter Master | |
RUN mkdir scripts | |
EXPOSE 60000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM jmeter-base | |
# Ports to be exposed from the container for JMeter Slaves/Server | |
EXPOSE 1099 50000 | |
# Application to run on starting the container | |
ENTRYPOINT $JMETER_HOME/bin/jmeter-server \ | |
-Dserver.rmi.localport=50000 \ | |
-Dserver_port=1099 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
master: | |
build: ./jmeter-master | |
container_name: master | |
tty: true # tty true make the docker image stay up even with nothing running | |
networks: | |
- jmeter-network | |
slave: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
COUNT=${1-1} | |
docker build -t jmeter-base jmeter-base | |
docker-compose build | |
docker-compose up -d | |
docker-compose scale master=1 slave=$COUNT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SLAVE_IP=$(docker inspect -f '{{.Name}} {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq) | grep slave | awk -F' ' '{print $2}' | tr '\n' ',' | sed 's/.$//') | |
WDIR=`docker exec -it master /bin/pwd | tr -d '\r'` | |
mkdir -p results | |
for filename in scripts/*.jmx; do | |
NAME=$(basename $filename) | |
NAME="${NAME%.*}" | |
eval "docker cp $filename master:$WDIR/scripts/" | |
eval "docker exec -it master /bin/bash -c 'mkdir $NAME && cd $NAME && ../bin/jmeter -n -t ../$filename -R$SLAVE_IP'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker-compose stop | |
docker-compose rm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker-machine create --driver virtualbox node1 | |
docker-machine create --driver virtualbox node2 |
OlderNewer