summaryrefslogtreecommitdiff
path: root/apps/JAWS/stress_testing/http_tester.cpp
diff options
context:
space:
mode:
authorsumedh <sumedh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-04-30 00:21:23 +0000
committersumedh <sumedh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-04-30 00:21:23 +0000
commit0316c73980c00b8bd22adbfaedccf8f9dd7a21fc (patch)
treea15292d871170fb2d9a9c75fd8b135e623217ab0 /apps/JAWS/stress_testing/http_tester.cpp
parentabf76a8b63d673c4c78efffeb00f1b667a6a8c3c (diff)
downloadATCD-0316c73980c00b8bd22adbfaedccf8f9dd7a21fc.tar.gz
Changed code to avoid using pow (), to avoid having to link -lm
Diffstat (limited to 'apps/JAWS/stress_testing/http_tester.cpp')
-rw-r--r--apps/JAWS/stress_testing/http_tester.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/JAWS/stress_testing/http_tester.cpp b/apps/JAWS/stress_testing/http_tester.cpp
index e5ad4a0e565..e7000b32764 100644
--- a/apps/JAWS/stress_testing/http_tester.cpp
+++ b/apps/JAWS/stress_testing/http_tester.cpp
@@ -57,7 +57,7 @@ static void *client_thread(void *data) {
ACE_Profile_Timer::ACE_Elapsed_Time et;
throughput_timer.stop();
throughput_timer.elapsed_time(et);
- throughput = (8 * total_read/et.real_time) / pow(10,6) ;
+ throughput = (8 * total_read/et.real_time) / (1000 * 1000); //pow(10,6) ;
cp->stats->log(cp->id, throughput, latency);
webserver.close();
return NULL;
@@ -74,7 +74,7 @@ int driver(char *id, int total_num, float requests_sec, char *url1, float p1, ch
int missed_deadlines = 0;
// sleep_time is in microseconds, and requests_sec is per second, hence the pow(10,6)
- float sleep_time = (1/requests_sec) * pow(10,6);
+ float sleep_time = (1/requests_sec) * (1000 * 1000); // pow(10,6);
float delta = 0;
srand(time(NULL));
for(int i = 0; i < total_num; i++) { // i is used as a id for threads
@@ -104,7 +104,7 @@ int driver(char *id, int total_num, float requests_sec, char *url1, float p1, ch
timer.stop();
ACE_Profile_Timer::ACE_Elapsed_Time et;
timer.elapsed_time(et);
- delta = ( (0.4 * fabs(et.real_time * pow(10,6))) + (0.6 * delta) );
+ delta = ( (0.4 * fabs(et.real_time * (1000 * 1000))) + (0.6 * delta) ); // pow(10,6)
}
// Join the other threads..