@Test
public void testBenchmarkMediumImages() {
try {
Timer t = new Timer();
t.start();
ImageBean bean = new ImageBean(new WebImage(new URL(
"http://www.alteiar.net/images/cartes/Carte_du_monde.jpg")));
UniqueID id = bean.getId();
CampaignClient.getInstance().addBean(bean);
t.end("server sended");
bean = CampaignClient.getInstance().getBean(id, time10second);
if (bean != null) {
BufferedImage img = bean.getImage().restoreImage();
t.end("server received 3.81 Mo (" + img.getWidth() + "x"
+ img.getHeight() + ") ");
} else {
System.out.println("server take more than 10 second");
}
t.start();
CampaignClient.getInstance().addBean(
new ImageBean(new SerializableImage(new File(
"./test/ressources/medium.jpg"))));
t.end("transfert sended");
bean = CampaignClient.getInstance().getBean(id, time10second);
if (bean != null) {
BufferedImage img = bean.getImage().restoreImage();
t.end("transfert received 3.81 Mo (" + img.getWidth() + "x"
+ img.getHeight() + ") ");
} else {
System.out.println("transfert take more than 10 second");
}