Posts

Showing posts from September, 2012

REST load testing with siege

Siege is a pretty nifty linux utility for HTTP/HTTPS load testing it can be downloaded here : siege homepage
Siege allows you to write a list of URLs in a file (one URL per line) the utility will then parse the file and execute the load tests according to your configuration file .siegerc or the command's arguments. The only thing I do not like about siege is the fact that I would like to have stats per URL; when siege parses the url file it will write a log file with global statics for the siege session Something like so : 2012-09-21 12:03:52, 1813, 121.43, 19, 0.49, 14.93, 0.16, 7.38, 1813, 0 which to my taste is not very clear While executing the tests siege prints out statistics that are not found in the siege log file (which in my case are more useful) but if you have multiple URLs you don't know for which URL the printed stats are. So I decided to handle the situation differently using awk and a bash script Note that…

MongoDB & Spring Data remove Elements from Arrays

In this blogpost I will be showing how to execute a Mongo Query using Spring Data in order to "pull" multiple items in a object's collection. The model : @Document(collection="Book") public class Book{ private String ISBN; private String bookTitle; private List< String > categories; //SETTERS - GETTERS } public class Category{ private String categoryId; private String categoryName; } A typical Mongo Document would be something like : { "isbn" : "11111111", "bookTitle" : "My Book Title", "categories" :[ { "categoryId" : "cat1", "categoryName": "My Category 1" }, { "categoryId" : "cat2", "categoryName": "My Category 2" } ] } { "isbn…