jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Lin <wool...@gmail.com>
Subject Re: Want to see stats on bandwidth / page sizes
Date Fri, 10 Sep 2004 14:16:03 GMT
sweet. hopefully either mike or I will get to it in the next few days
and check it into CVS. thanks for whipping up the patch so quickly.
gotta say, that's why I love open source.  making a change is far
easier than asking company X, "add this feature"

peter


On Fri, 10 Sep 2004 10:04:25 -0400, Ed Randall
<ed.randall@wallstreetsystems.com> wrote:
> It has just taken me approx 30 minutes to get the source, configure eclipse,
> 
> and quickly hack through the code to find TableDataModel, I added an extra
> column to it et voila!  I have a nice table with all of the numbers
> for the requests.  Then another 30 mins to do the necessary to attach
> the patch diff and write this message!
> 
> I guess it's not exactly the nicest way to do it but it was quick and it
> worked :-)
> It would be more flexible if addNewSample simply added the SampleResult
> given by addSample
> then the model would have full access to everything, the panel containing
> the
> table could then have a load of tick boxes for "what do you want to show".
> 
> Cheers
> 
> Ed
> 
> $ diff -C2 -w TableDataModel.java TableDataModel2.java
> *** TableDataModel.java Thu Feb 12 19:48:46 2004
> --- TableDataModel2.java        Fri Sep 10 15:02:57 2004
> ***************
> *** 46,49 ****
> --- 46,50 ----
> 
>      List urlList = new ArrayList();
> +     List respSizeList = new ArrayList();
> 
>      /**
> ***************
> *** 69,72 ****
> --- 70,74 ----
>          super.clear();
>          urlList.clear();
> +         respSizeList.clear();
>      }
> 
> ***************
> *** 85,93 ****
>          long timeStamp,
>          boolean success,
> !         String url)
>      {
>          Sample s = super.addNewSample(time, timeStamp, success);
> 
>          urlList.add(url);
>          return s;
>      }
> --- 87,97 ----
>          long timeStamp,
>          boolean success,
> !         String url,
> !         long respSize)
>      {
>          Sample s = super.addNewSample(time, timeStamp, success);
> 
>          urlList.add(url);
> +         respSizeList.add(new Long(respSize));
>          return s;
>      }
> ***************
> *** 96,100 ****
>      {
>          Sample s = addNewSample(e.getTime(), e.getTimeStamp(),
> e.isSuccessful(),
> !                 (String) e.getSampleLabel());
> 
>          fireDataChanged();
> --- 100,104 ----
>      {
>          Sample s = addNewSample(e.getTime(), e.getTimeStamp(),
> e.isSuccessful(),
> !                 (String) e.getSampleLabel(), e.getResponseData().length);
> 
>          fireDataChanged();
> ***************
> *** 112,116 ****
>      {
>          // We have two columns : sampleNo and sampleValue
> !         return 4;
>      }
> 
> --- 116,120 ----
>      {
>          // We have 5 columns
> !         return 5;
>      }
> 
> ***************
> *** 131,134 ****
> --- 135,141 ----
>              return JMeterUtils.getResString("Success?");
> 
> +         case 4:
> +             return "Response size";
> +
>          default:
>              return null;
> ***************
> *** 154,157 ****
> --- 161,168 ----
>              return Boolean.class;
>          }
> +         else if (columnIndex == 4)
> +         {
> +             return Long.class;
> +         }
>          else
>          {
> ***************
> *** 198,201 ****
> --- 209,219 ----
>              }
>          }
> +         else if (columnIndex == 4)
> +         {
> +             if ((rowIndex >= 0) && (rowIndex < respSizeList.size()))
> +             {
> +                 return (Long)respSizeList.get(rowIndex);
> +             }
> +         }
>          return null;
>      }
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message