From ee7bc23d854a663bca8b440e96c2519e81f3f2ac Mon Sep 17 00:00:00 2001
From: Horst Schirmeier <horst.schirmeier@tu-dortmund.de>
Date: Sat, 18 Jan 2014 20:56:57 +0100
Subject: [PATCH] jobclient: bugfix: initialize timing statistics

If we don't properly initialize the job timing statistics, the number
of jobs to be requested in the second request to the server is based
on the wrong timings.  In our test case, CLIENT_JOB_LIMIT jobs were
requested at once.

Change-Id: I7e9d8ab6fe14e4488b3a74baf061d9a07f3a77c4
---
 src/core/efw/JobClient.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/core/efw/JobClient.cc b/src/core/efw/JobClient.cc
index 153c863d..2bb89f80 100644
--- a/src/core/efw/JobClient.cc
+++ b/src/core/efw/JobClient.cc
@@ -19,6 +19,8 @@ JobClient::JobClient(const std::string& server, int port)
 	}
 	srand(time(NULL)); // needed for random backoff (see connectToServer)
 	m_server_runid = 0; // server accepts this for virgin clients
+	m_job_total = 0;
+	m_job_runtime_total = 0;
 	m_job_throughput = 1; // client gets only one job at the first request
 }
 
-- 
GitLab