本文整理汇总了C++中nsCString::AppendPrintf方法的典型用法代码示例。如果您正苦于以下问题:C++ nsCString::AppendPrintf方法的具体用法?C++ nsCString::AppendPrintf怎么用?C++ nsCString::AppendPrintf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nsCString
的用法示例。
在下文中一共展示了nsCString::AppendPrintf方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CanDirectlyActivate
void
nsHttpConnection::PrintDiagnostics(nsCString &log)
{
log.AppendPrintf(" CanDirectlyActivate = %d\n", CanDirectlyActivate());
log.AppendPrintf(" npncomplete = %d setupNPNCalled = %d\n",
mNPNComplete, mSetupNPNCalled);
log.AppendPrintf(" spdyVersion = %d reportedSpdy = %d everspdy = %d\n",
mUsingSpdyVersion, mReportedSpdy, mEverUsedSpdy);
log.AppendPrintf(" iskeepalive = %d dontReuse = %d isReused = %d\n",
IsKeepAlive(), mDontReuse, mIsReused);
log.AppendPrintf(" mTransaction = %d mSpdySession = %d\n",
!!mTransaction.get(), !!mSpdySession.get());
PRIntervalTime now = PR_IntervalNow();
log.AppendPrintf(" time since last read = %ums\n",
PR_IntervalToMilliseconds(now - mLastReadTime));
log.AppendPrintf(" max-read/read/written %lld/%lld/%lld\n",
mMaxBytesRead, mTotalBytesRead, mTotalBytesWritten);
log.AppendPrintf(" rtt = %ums\n", PR_IntervalToMilliseconds(mRtt));
log.AppendPrintf(" idlemonitoring = %d transactionCount=%d\n",
mIdleMonitoring, mHttp1xTransactionCount);
log.AppendPrintf(" supports pipeline = %d classification = 0x%x\n",
mSupportsPipelining, mClassification);
if (mSpdySession)
mSpdySession->PrintDiagnostics(log);
}
示例2:
void
nsHttpConnectionMgr::PendingTransactionInfo::PrintDiagnostics(nsCString &log)
{
log.AppendPrintf(" ::: Pending transaction\n");
mTransaction->PrintDiagnostics(log);
RefPtr<nsHalfOpenSocket> halfOpen = do_QueryReferent(mHalfOpen);
log.AppendPrintf(" Waiting for half open sock: %p or connection: %p\n",
halfOpen.get(), mActiveConn.get());
}
示例3: nsCAutoString
void
nsHttpTransaction::PrintDiagnostics(nsCString &log)
{
if (!mRequestHead)
return;
log.AppendPrintf(" ::: uri = %s\n",
nsCAutoString(mRequestHead->RequestURI()).get());
log.AppendPrintf(" caps = 0x%x\n", mCaps);
log.AppendPrintf(" priority = %d\n", mPriority);
log.AppendPrintf(" restart count = %u\n", mRestartCount);
log.AppendPrintf(" classification = 0x%x\n", mClassification);
}
示例4: AppendPrintf
void DDLifetime::AppendPrintf(nsCString& aString) const {
if (!mDerivedObject.Pointer()) {
mObject.AppendPrintf(aString);
aString.AppendPrintf("#%" PRIi32, mTag);
} else {
mDerivedObject.AppendPrintf(aString);
aString.AppendPrintf("#%" PRIi32 " (as ", mTag);
if (mObject.Pointer() == mDerivedObject.Pointer()) {
aString.Append(mObject.TypeName());
} else {
mObject.AppendPrintf(aString);
}
aString.Append(")");
}
}
示例5: HasConnected
void
nsHttpConnectionMgr::nsHalfOpenSocket::PrintDiagnostics(nsCString &log)
{
log.AppendPrintf(" has connected = %d, isSpeculative = %d\n",
HasConnected(), IsSpeculative());
TimeStamp now = TimeStamp::Now();
if (mPrimarySynStarted.IsNull())
log.AppendPrintf(" primary not started\n");
else
log.AppendPrintf(" primary started %.2fms ago\n",
(mPrimarySynStarted - now).ToMilliseconds());
if (mBackupSynStarted.IsNull())
log.AppendPrintf(" backup not started\n");
else
log.AppendPrintf(" backup started %ldms ago\n",
(mBackupSynStarted - now).ToMilliseconds());
log.AppendPrintf(" primary transport %d, backup transport %d\n",
!!mSocketTransport.get(), !!mBackupTransport.get());
}
示例6: CanReuse
void
SpdySession2::PrintDiagnostics(nsCString &log)
{
log.AppendPrintf(" ::: SPDY VERSION 2\n");
log.AppendPrintf(" shouldgoaway = %d mClosed = %d CanReuse = %d nextID=0x%X\n",
mShouldGoAway, mClosed, CanReuse(), mNextStreamID);
log.AppendPrintf(" concurrent = %d maxconcurrent = %d\n",
mConcurrent, mMaxConcurrent);
log.AppendPrintf(" roomformorestreams = %d roomformoreconcurrent = %d\n",
RoomForMoreStreams(), RoomForMoreConcurrent());
log.AppendPrintf(" transactionHashCount = %d streamIDHashCount = %d\n",
mStreamTransactionHash.Count(),
mStreamIDHash.Count());
log.AppendPrintf(" Queued Stream Size = %d\n", mQueuedStreams.GetSize());
PRIntervalTime now = PR_IntervalNow();
log.AppendPrintf(" Ping Threshold = %ums next ping id = 0x%X\n",
PR_IntervalToMilliseconds(mPingThreshold),
mNextPingID);
log.AppendPrintf(" Ping Timeout = %ums\n",
PR_IntervalToMilliseconds(gHttpHandler->SpdyPingTimeout()));
log.AppendPrintf(" Idle for Any Activity (ping) = %ums\n",
PR_IntervalToMilliseconds(now - mLastReadEpoch));
log.AppendPrintf(" Idle for Data Activity = %ums\n",
PR_IntervalToMilliseconds(now - mLastDataReadEpoch));
if (mPingSentEpoch)
log.AppendPrintf(" Ping Outstanding (ping) = %ums, expired = %d\n",
PR_IntervalToMilliseconds(now - mPingSentEpoch),
now - mPingSentEpoch >= gHttpHandler->SpdyPingTimeout());
else
log.AppendPrintf(" No Ping Outstanding\n");
}