Skip to content

Commit

Permalink
Replace msec with ms
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref committed Mar 8, 2023
1 parent 2ace8bd commit 9273c94
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions pdns/dnsbulktest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ struct SendReceive
{
(*d_acc)(usec/1000.0);
// if(usec > 1000000)
// cerr<<"Slow: "<<domain<<" ("<<usec/1000.0<<" msec)\n";
// cerr<<"Slow: "<<domain<<" ("<<usec/1000.0<<" ms)\n";
if(!g_quiet) {
cout<<domain.name<<"|"<<DNSRecordContent::NumberToType(domain.type)<<": ("<<usec/1000.0<<"msec) rcode: "<<dr.rcode;
cout<<domain.name<<"|"<<DNSRecordContent::NumberToType(domain.type)<<": ("<<usec/1000.0<<" ms) rcode: "<<dr.rcode;
for(const ComboAddress& ca : dr.ips) {
cout<<", "<<ca.toString();
}
Expand Down Expand Up @@ -351,9 +351,9 @@ try
cerr<< datafmt % "Total " % (sr.d_oks + sr.d_errors + sr.d_nodatas + sr.d_nxdomains + sr.d_unknowns + inflighter.getTimeouts()) % "" % "";

cerr<<"\n";
cerr<< "Mean response time: "<<mean(*sr.d_acc) << " msec"<<", median: "<<median(*sr.d_acc)<< " msec\n";
cerr<< "Mean response time: "<<mean(*sr.d_acc) << " ms"<<", median: "<<median(*sr.d_acc)<< " ms\n";

boost::format statfmt("Time < %6.03f msec %|30t|%6.03f%% cumulative\n");
boost::format statfmt("Time < %6.03f ms %|30t|%6.03f%% cumulative\n");

for (unsigned int i = 0; i < sr.d_probs.size(); ++i) {
cerr << statfmt % extended_p_square(*sr.d_acc)[i] % (100*sr.d_probs[i]);
Expand Down
4 changes: 2 additions & 2 deletions pdns/dnsdist-lua-actions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class DelayAction : public DNSAction
}
std::string toString() const override
{
return "delay by "+std::to_string(d_msec)+ " msec";
return "delay by "+std::to_string(d_msec)+ " ms";
}
private:
int d_msec;
Expand Down Expand Up @@ -1755,7 +1755,7 @@ class DelayResponseAction : public DNSResponseAction
}
std::string toString() const override
{
return "delay by "+std::to_string(d_msec)+ " msec";
return "delay by "+std::to_string(d_msec)+ " ms";
}
private:
int d_msec;
Expand Down
4 changes: 2 additions & 2 deletions pdns/dnsdist-lua-inspection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -589,14 +589,14 @@ void setupLuaInspection(LuaContext& luaCtx)
return;
}

g_outputBuffer = (boost::format("Average response latency: %.02f msec\n") % (0.001*totlat/size)).str();
g_outputBuffer = (boost::format("Average response latency: %.02f ms\n") % (0.001*totlat/size)).str();
double highest=0;

for(auto iter = histo.cbegin(); iter != histo.cend(); ++iter) {
highest=std::max(highest, iter->second*1.0);
}
boost::format fmt("%7.2f\t%s\n");
g_outputBuffer += (fmt % "msec" % "").str();
g_outputBuffer += (fmt % "ms" % "").str();

for(auto iter = histo.cbegin(); iter != histo.cend(); ++iter) {
int stars = (70.0 * iter->second/highest);
Expand Down
4 changes: 2 additions & 2 deletions pdns/dnsreplay.cc
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,9 @@ static void emitFlightTimes()
cout.precision(2);
for(unsigned int i =0 ; i < sizeof(limits)/sizeof(limits[0]); ++i) {
if(limits[i]!=flightTimes.size())
cout<<"Within "<<limits[i]<<" msec: ";
cout<<"Within "<<limits[i]<<" ms: ";
else
cout<<"Beyond "<<limits[i]-2<<" msec: ";
cout<<"Beyond "<<limits[i]-2<<" ms: ";
uint64_t here = countLessThan(limits[i]);
cout<<100.0*here/totals<<"% ("<<100.0*(here-sofar)/totals<<"%)"<<endl;
sofar=here;
Expand Down
4 changes: 2 additions & 2 deletions pdns/dnsscope.cc
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ try
if(j->first < 1024)
cout<< perc <<"% of questions answered within " << j->first << " usec (";
else
cout<< perc <<"% of questions answered within " << j->first/1000.0 << " msec (";
cout<< perc <<"% of questions answered within " << j->first/1000.0 << " ms (";

cout<<perc-lastperc<<"%)\n";
lastperc=sum*100.0/totpairs;
Expand All @@ -496,7 +496,7 @@ try
if(j->first < 1024)
cout<< perc <<"% of questions answered within " << j->first << " usec (";
else
cout<< perc <<"% of questions answered within " << j->first/1000.0 << " msec (";
cout<< perc <<"% of questions answered within " << j->first/1000.0 << " ms (";

cout<<perc-lastperc<<"%)\n";
lastperc=sum*100.0/totpairs;
Expand Down
2 changes: 1 addition & 1 deletion pdns/dnstcpbench.cc
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ try
if(g_verbose) {
cout<<"Sending queries to: "<<g_dest.toStringWithPort()<<endl;
cout<<"Attempting UDP first: " << (g_onlyTCP ? "no" : "yes") <<endl;
cout<<"Timeout: "<< g_timeoutMsec<<"msec"<<endl;
cout<<"Timeout: "<< g_timeoutMsec<<" ms"<<endl;
cout << "Using TCP_NODELAY: "<<g_tcpNoDelay<<endl;
}

Expand Down
6 changes: 3 additions & 3 deletions pdns/recursordist/syncres.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5110,7 +5110,7 @@ bool SyncRes::doResolveAtThisIP(const std::string& prefix, const DNSName& qname,
if (s_addExtendedResolutionDNSErrors) {
extendedError = EDNSExtendedError{static_cast<uint16_t>(EDNSExtendedError::code::NoReachableAuthority), "Timeout waiting for answer(s)"};
}
throw ImmediateServFailException("Too much time waiting for " + qname.toLogString() + "|" + qtype.toString() + ", timeouts: " + std::to_string(d_timeouts) + ", throttles: " + std::to_string(d_throttledqueries) + ", queries: " + std::to_string(d_outqueries) + ", " + std::to_string(d_totUsec / 1000) + "msec");
throw ImmediateServFailException("Too much time waiting for " + qname.toLogString() + "|" + qtype.toString() + ", timeouts: " + std::to_string(d_timeouts) + ", throttles: " + std::to_string(d_throttledqueries) + ", queries: " + std::to_string(d_outqueries) + ", " + std::to_string(d_totUsec / 1000) + " ms");
}

if (doTCP) {
Expand Down Expand Up @@ -5172,7 +5172,7 @@ bool SyncRes::doResolveAtThisIP(const std::string& prefix, const DNSName& qname,
if (resolveret == LWResult::Result::Timeout) {
/* Time out */

LOG(prefix << qname << ": Timeout resolving after " << lwr.d_usec / 1000.0 << "msec " << (doTCP ? "over TCP" : "") << endl);
LOG(prefix << qname << ": Timeout resolving after " << lwr.d_usec / 1000.0 << " ms " << (doTCP ? "over TCP" : "") << endl);
d_timeouts++;
t_Counters.at(rec::Counter::outgoingtimeouts)++;

Expand Down Expand Up @@ -5661,7 +5661,7 @@ int SyncRes::doResolveAt(NsSet& nameservers, DNSName auth, bool flawedNSSet, con
if(remoteIP->sin4.sin_family==AF_INET6)
lwr.d_usec/=3;
*/
// cout<<"msec: "<<lwr.d_usec/1000.0<<", "<<g_avgLatency/1000.0<<'\n';
// cout<<"ms: "<<lwr.d_usec/1000.0<<", "<<g_avgLatency/1000.0<<'\n';

s_nsSpeeds.lock()->find_or_enter(tns->first.empty() ? DNSName(remoteIP->toStringWithPort()) : tns->first, d_now).submit(*remoteIP, lwr.d_usec, d_now);

Expand Down
4 changes: 2 additions & 2 deletions pdns/tools/rrd/makegraphs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ function makeGraphs()
LINE1:alloutqueries#00ff00:"outqueries/s"

rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/qa-latency-$2.png -w $WSIZE -h $HSIZE -l 0 \
-t "Questions/answer latency in milliseconds" \
-v "msec" \
-t "Questions/answer latency in ms" \
-v "ms" \
DEF:qalatency=pdns_recursor.rrd:qa-latency:AVERAGE \
CDEF:mqalatency=qalatency,1000,/ \
LINE1:mqalatency#ff0000:"questions/s"
Expand Down

0 comments on commit 9273c94

Please sign in to comment.