You are viewing a plain text version of this content. The canonical link for it is here.
Posted to olio-commits@incubator.apache.org by ak...@apache.org on 2009/01/28 19:10:32 UTC
svn commit: r738586 -
/incubator/olio/workload/php/trunk/src/com/sun/web20/driver/UIDriver.java
Author: akara
Date: Wed Jan 28 19:10:31 2009
New Revision: 738586
URL: http://svn.apache.org/viewvc?rev=738586&view=rev
Log:
Fix for issue OLIO-41: Added checks for images with size less than 1024 bytes. Logs warnings when it happens.
Modified:
incubator/olio/workload/php/trunk/src/com/sun/web20/driver/UIDriver.java
Modified: incubator/olio/workload/php/trunk/src/com/sun/web20/driver/UIDriver.java
URL: http://svn.apache.org/viewvc/incubator/olio/workload/php/trunk/src/com/sun/web20/driver/UIDriver.java?rev=738586&r1=738585&r2=738586&view=diff
==============================================================================
--- incubator/olio/workload/php/trunk/src/com/sun/web20/driver/UIDriver.java (original)
+++ incubator/olio/workload/php/trunk/src/com/sun/web20/driver/UIDriver.java Wed Jan 28 19:10:31 2009
@@ -686,7 +686,13 @@
// Loads image only if not cached, means we can add to cache.
if (cachedURLs.add(image)) {
logger.finer("Loading image " + image);
- imgBytes += http.readURL(image);
+ int imgSize = http.readURL(image);
+ if (imgSize < 1024) {
+ logger.warning("Image at " + image + " size of " +
+ imgSize + " bytes is too small. " +
+ "Image may not exist");
+ }
+ imgBytes += imgSize;
++imagesLoaded;
} else {
logger.finer("Image already cached: Not loading " + image);