Skip to content

Commit

Permalink
Merge branch 'candidate-7.0.8' into candidate-7.2.0
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
  • Loading branch information
richardkchapman committed Jan 7, 2019
2 parents a4a0dd6 + 87003c1 commit 665506d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
19 changes: 19 additions & 0 deletions esp/tools/soapplus/http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ HttpStat::HttpStat()
totalreqlen = 0;
totalresplen = 0;
numrequests = 0;
numfails = 0;
}

void HttpStat::printStat(FILE* ofile)
Expand All @@ -93,6 +94,7 @@ void HttpStat::printStat(FILE* ofile)
fprintf(ofile, "%s", sepstr);
fprintf(ofile, "Number of Threads: %d\n", threads);
fprintf(ofile, "Total hits: %" I64F "d\n", numrequests);
fprintf(ofile, "Total fails: %" I64F "d\n", numfails);
fprintf(ofile, "Run length(millisecond): %d\n", duration);
if(duration > 0)
fprintf(ofile, "Hits per second: %3.1f\n", numrequests/(duration*0.001));
Expand Down Expand Up @@ -1033,6 +1035,7 @@ int HttpClient::sendStressRequests(HttpStat* overall_stat)
overall_stat->totalreqlen += stat->totalreqlen;
overall_stat->totalresplen += stat->totalresplen;
overall_stat->numrequests += stat->numrequests;
overall_stat->numfails += stat->numfails;
if(overall_stat->fastest > stat->fastest)
overall_stat->fastest = stat->fastest;
if(overall_stat->slowest < stat->slowest)
Expand Down Expand Up @@ -1286,6 +1289,8 @@ int HttpClient::sendStressRequest(StringBuffer& request, HttpStat* stat, Owned<C
int ret = sock->connect(m_serveraddr.get());
if (ret < 0)
{
if (stat)
stat->numfails++;
return -1;
}
}
Expand Down Expand Up @@ -1313,7 +1318,15 @@ int HttpClient::sendStressRequest(StringBuffer& request, HttpStat* stat, Owned<C
fprintf(m_logfile, "%s", recvbuf);
}
else
{
if (total_len == 0)
{
if (stat)
stat->numfails++;
return -1;
}
break;
}
}
}
else
Expand Down Expand Up @@ -1362,6 +1375,8 @@ int HttpClient::sendStressRequest(StringBuffer& request, HttpStat* stat, Owned<C
else
{
sock->close();
if (stat)
stat->numfails++;
return -1;
}
}
Expand All @@ -1378,6 +1393,8 @@ int HttpClient::sendStressRequest(StringBuffer& request, HttpStat* stat, Owned<C
else
{
sock->close();
if (stat && len < 0)
stat->numfails++;
return -1;
}
}
Expand All @@ -1389,6 +1406,8 @@ int HttpClient::sendStressRequest(StringBuffer& request, HttpStat* stat, Owned<C
{
fprintf(m_logfile, "Failed to send request.\n");
sock->close();
if (stat)
stat->numfails++;
return -1;
}

Expand Down
1 change: 1 addition & 0 deletions esp/tools/soapplus/http.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class HttpStat : public CInterface, implements IInterface
__int64 totalreqlen;
__int64 totalresplen;
__int64 numrequests;
__int64 numfails;

public:
IMPLEMENT_IINTERFACE;
Expand Down
4 changes: 2 additions & 2 deletions thorlcr/slave/slavmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1139,12 +1139,12 @@ class CKJService : public CSimpleInterfaceOf<IKJService>, implements IThreaded,
{
if (activeKManagersByHandle.size())
{
WARNLOG("KJService: clearing active %lu key manager container(s), that were not closed cleanly", activeKManagersByHandle.size());
WARNLOG("KJService: clearing active %u key manager container(s), that were not closed cleanly", (unsigned)activeKManagersByHandle.size());
activeKManagersByHandle.clear();
}
if (activeFetchContextsByHandle.size())
{
WARNLOG("KJService: clearing %lu fetch context(s), that were not closed cleanly", activeFetchContextsByHandle.size());
WARNLOG("KJService: clearing %u fetch context(s), that were not closed cleanly", (unsigned)activeFetchContextsByHandle.size());
activeFetchContextsByHandle.clear();
}
cachedKMs.clear();
Expand Down

0 comments on commit 665506d

Please sign in to comment.