DescartesResearch / TeaStore

A micro-service reference test application for model extraction, cloud management, energy efficiency, power prediction, single- and multi-tier auto-scaling
https://se.informatik.uni-wuerzburg.de
Apache License 2.0
120 stars 141 forks source link

Scaling of Images #150

Closed ksg1998 closed 4 years ago

ksg1998 commented 4 years ago

In ImageScaler.java there's a parameter called scaling factor. We are trying to re-scale the size of images and monitor how teastore performs but when we tried changing the value of the scaling factor and re-building teastore there's some problem.

kasokz commented 4 years ago

Can you please provide information about what kind of problem occurs? Does it not build or do you experience some kind of runtime problem? In what environment are you running the TeaStore? Docker, Kubernetes or Tomcat?

ksg1998 commented 4 years ago

We are running TeaStore on docker. For example the front-page teastore logo gets scaled to 600 x 437 by default. So we wanted to change this and tried to set a default value to scalingFactor parameter in ImageScaler.java. After doing this we ran mvn clean install to rebuild teastore. While doing this the build stops at the Image Provider throwing an error. It looks like some maven error not sure what it is. Screenshot from 2020-04-24 17-51-45

SimonEismann commented 4 years ago

Hey @ksg1998, It seems that something is amiss int the ImageScaler file. Could you post the content of your modfied version?

Does a clean checkout of the master branch build?

ksg1998 commented 4 years ago

I haven't added much and yes without the changes that we made it works properly and the build is successful.

Screenshot from 2020-04-24 18-32-16 As it can be seen in the above screenshot just adding 1 to the scalingFactor. It might be an error from our side. If this isnt't the right place to change the scaling factor wanted to know how it could be done. Without the above change it builds perfectly as seen below.

Screenshot from 2020-04-24 18-21-18

SimonEismann commented 4 years ago

So I am not sure if this is actually the problem, but my first guess is that the checkstyle complains about the indentation of the scalingFactor = scalingFactor + 1; line. Could you try if this fixes the issue?

When it comes to if this is actually what you want to do, this I'll forward this question to @NSchmittUniWue as he knows more about the image provider.

ksg1998 commented 4 years ago

Thanks a lot @SimonEismann @kasokz will check it out.

SimonEismann commented 4 years ago

Closing due to inactivity, feel free to reopen if the issue still persists :-)