1
0
Fork 0

some figures output

This commit is contained in:
Jan Steemann 2012-09-18 18:55:46 +02:00
parent 614187c885
commit 876b9219cc
1 changed files with 13 additions and 7 deletions

View File

@ -26,16 +26,14 @@
////////////////////////////////////////////////////////////////////////////////
#include <stdio.h>
#include <fstream>
#include <iomanip>
#include "build.h"
#include "ArangoShell/ArangoClient.h"
#include "Basics/FileUtils.h"
#include "Basics/ProgramOptions.h"
#include "Basics/ProgramOptionsDescription.h"
#include "Basics/StringUtils.h"
#include "BasicsC/files.h"
#include "BasicsC/init.h"
#include "BasicsC/logging.h"
#include "BasicsC/strings.h"
@ -196,7 +194,6 @@ int main (int argc, char* argv[]) {
SharedCounter<unsigned long> operationsCounter(0, Operations);
ConditionVariable startCondition;
std::cout << "Concurrency: " << Concurrency << endl;
vector<Endpoint*> endpoints;
vector<BenchmarkThread*> threads;
for (int i = 0; i < Concurrency; ++i) {
@ -215,7 +212,10 @@ int main (int argc, char* argv[]) {
thread->start();
}
usleep(100000);
usleep(500000);
Timing timer(Timing::TI_WALLCLOCK);
{
ConditionLocker guard(&startCondition);
@ -229,10 +229,16 @@ int main (int argc, char* argv[]) {
break;
}
std::cout << "cycling " << numOperations << "\n";
usleep(100000);
usleep(50000);
}
double time = ((double) timer.time()) / 1000000.0;
cout << "Total number of operations: " << Operations << ", batch size: " << BatchSize << ", concurrency level: " << Concurrency << endl;
cout << "Total duration: " << fixed << time << " s" << endl;
cout << "Duration per operation: " << fixed << (time / Operations) << " s" << endl;
cout << "Duration per operation per thread: " << fixed << (time / Operations * (double) Concurrency) << " s" << endl << endl;
for (int i = 0; i < Concurrency; ++i) {
threads[i]->join();
delete threads[i];