diff -r -c openload-0.1.2/debian/changelog openload-0.1.2-jws/debian/changelog
*** openload-0.1.2/debian/changelog	2007-11-06 16:50:42.000000000 -0600
--- openload-0.1.2-jws/debian/changelog	2007-11-06 16:26:49.000000000 -0600
***************
*** 1,3 ****
--- 1,9 ----
+ openload (0.1.2-1.1-jws1) unstable; urgency=low
+ 
+   * Add bits/second
+ 
+  -- Jim Studt <jstudt@debian.org>  Thu, 6 Nov 2007 16:59:50 +0200
+ 
  openload (0.1.2-1.1) unstable; urgency=low
  
    * NMU as part of the GCC 4.1 transition.
diff -r -c openload-0.1.2/src/http_test.cpp openload-0.1.2-jws/src/http_test.cpp
*** openload-0.1.2/src/http_test.cpp	2001-06-26 05:56:29.000000000 -0500
--- openload-0.1.2-jws/src/http_test.cpp	2007-11-06 16:47:20.000000000 -0600
***************
*** 63,68 ****
--- 63,71 ----
  long g_totalCount = 0;
  long g_lastReportTime;
  long g_count = 0;
+ long g_bytes = 0;
+ long g_totalBytes = 0;
+ long g_maBps = 0;
  long g_errorCount = 0;
  long g_totalErrorCount = 0;
  long g_duration = 0;
***************
*** 126,131 ****
--- 129,135 ----
  
      // Update counters
      g_count++;
+     g_bytes += pContext->m_pResp->m_Len;
      g_duration += duration;
      if(duration > g_maxDuration)
      {
***************
*** 138,143 ****
--- 142,149 ----
          g_totalCount += g_count;
          g_totalDuration += g_duration;
          g_totalErrorCount += g_errorCount;
+ 	g_totalBytes += g_bytes;
+ 	long bps = (long)(g_bytes / ((endTime - g_lastReportTime) / 1000.0f) * 8);
          float tps = g_count / ((endTime - g_lastReportTime) / 1000.0f);
          float respTime = g_duration / 1000.0f / g_count;
  
***************
*** 147,159 ****
          else
              g_maTps += (tps - g_maTps) * 0.1f;
      
          fprintf(stderr, "MaTps %6.2f, Tps %6.2f, Resp Time %6.3f, Err %3ld%%, "
!            "Count %5ld\n",
             g_maTps, tps, respTime, g_errorCount * 100 / g_count,
!            g_totalCount);
  
          g_lastReportTime = endTime;
          g_count = 0;
          g_errorCount = 0;
          g_duration = 0;
      }
--- 153,172 ----
          else
              g_maTps += (tps - g_maTps) * 0.1f;
      
+         // Calculate moving average of BPS
+         if(g_maBps < 10)
+             g_maBps = bps;
+         else
+             g_maBps += (bps - g_maBps) / 10;
+     
          fprintf(stderr, "MaTps %6.2f, Tps %6.2f, Resp Time %6.3f, Err %3ld%%, "
!            "Count %5ld, MaBps %9d, Bps %9d\n",
             g_maTps, tps, respTime, g_errorCount * 100 / g_count,
!            g_totalCount, g_maBps, bps);
  
          g_lastReportTime = endTime;
          g_count = 0;
+ 	g_bytes = 0;
          g_errorCount = 0;
          g_duration = 0;
      }
***************
*** 327,338 ****
--- 340,353 ----
          long now = getMsTime();
  
          float tps = g_totalCount /((now - g_startTime) / 1000.0f);
+ 	long bps = (long)(g_totalBytes / ((now - g_startTime) / 1000.0f) * 8);
          float respTime = 0;
          if(g_totalCount > 0)
              respTime = g_totalDuration / 1000.0f / g_totalCount;
          if(oMode == OM_NORMAL)
          {
              printf("Total TPS: %6.2f\n", tps);
+             printf("Total BPS: %9d\n", bps);
              printf("Avg. Response time: %6.3f sec.\n", respTime);
              printf("Max Response time:  %6.3f sec\n", g_maxDuration / 1000.0f);
              printf("Total Requests: %7ld\n", g_totalCount);
***************
*** 340,347 ****
          }
          if(oMode == OM_CSV)
          {
!             printf("http://%s:%d%s,%d,%.2f,%.3f,%.3f,%d\n", url.host, url.port, url.path,
!                 clients, tps, respTime, g_maxDuration / 1000.0f, g_totalCount);
          }
      }
  
--- 355,362 ----
          }
          if(oMode == OM_CSV)
          {
!             printf("http://%s:%d%s,%d,%.2f,%.3f,%.3f,%d,%d\n", url.host, url.port, url.path,
!                 clients, tps, respTime, g_maxDuration / 1000.0f, g_totalCount,bps);
          }
      }
  
