mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1189645 - remove spdy telem r=hurley
This commit is contained in:
parent
4b5ec1512e
commit
38acce4a2d
@ -798,20 +798,6 @@ SpdySession31::GenerateSettings()
|
||||
numberOfEntries++;
|
||||
}
|
||||
|
||||
nsRefPtr<nsHttpConnectionInfo> ci;
|
||||
uint32_t cwnd = 0;
|
||||
GetConnectionInfo(getter_AddRefs(ci));
|
||||
if (ci)
|
||||
cwnd = gHttpHandler->ConnMgr()->GetSpdyCWNDSetting(ci);
|
||||
if (cwnd) {
|
||||
packet[12 + 8 * numberOfEntries] = PERSISTED_VALUE;
|
||||
packet[15 + 8 * numberOfEntries] = SETTINGS_TYPE_CWND;
|
||||
LOG(("SpdySession31::GenerateSettings %p sending CWND %u\n", this, cwnd));
|
||||
cwnd = PR_htonl(cwnd);
|
||||
memcpy(packet + 16 + 8 * numberOfEntries, &cwnd, 4);
|
||||
numberOfEntries++;
|
||||
}
|
||||
|
||||
// Advertise the Push RWIN and on each client SYN_STREAM pipeline
|
||||
// a window update with it in order to use larger initial windows with pulled
|
||||
// streams.
|
||||
@ -1445,41 +1431,12 @@ SpdySession31::HandleSettings(SpdySession31 *self)
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case SETTINGS_TYPE_UPLOAD_BW:
|
||||
Telemetry::Accumulate(Telemetry::SPDY_SETTINGS_UL_BW, value);
|
||||
break;
|
||||
|
||||
case SETTINGS_TYPE_DOWNLOAD_BW:
|
||||
Telemetry::Accumulate(Telemetry::SPDY_SETTINGS_DL_BW, value);
|
||||
break;
|
||||
|
||||
case SETTINGS_TYPE_RTT:
|
||||
Telemetry::Accumulate(Telemetry::SPDY_SETTINGS_RTT, value);
|
||||
break;
|
||||
|
||||
case SETTINGS_TYPE_MAX_CONCURRENT:
|
||||
self->mMaxConcurrent = value;
|
||||
Telemetry::Accumulate(Telemetry::SPDY_SETTINGS_MAX_STREAMS, value);
|
||||
self->ProcessPending();
|
||||
break;
|
||||
|
||||
case SETTINGS_TYPE_CWND:
|
||||
if (flags & PERSIST_VALUE)
|
||||
{
|
||||
nsRefPtr<nsHttpConnectionInfo> ci;
|
||||
self->GetConnectionInfo(getter_AddRefs(ci));
|
||||
if (ci)
|
||||
gHttpHandler->ConnMgr()->ReportSpdyCWNDSetting(ci, value);
|
||||
}
|
||||
Telemetry::Accumulate(Telemetry::SPDY_SETTINGS_CWND, value);
|
||||
break;
|
||||
|
||||
case SETTINGS_TYPE_DOWNLOAD_RETRANS_RATE:
|
||||
Telemetry::Accumulate(Telemetry::SPDY_SETTINGS_RETRANS, value);
|
||||
break;
|
||||
|
||||
case SETTINGS_TYPE_INITIAL_WINDOW:
|
||||
Telemetry::Accumulate(Telemetry::SPDY_SETTINGS_IW, value >> 10);
|
||||
{
|
||||
int32_t delta = value - self->mServerInitialStreamWindow;
|
||||
self->mServerInitialStreamWindow = value;
|
||||
|
@ -747,67 +747,6 @@ nsHttpConnectionMgr::ReportSpdyConnection(nsHttpConnection *conn,
|
||||
PostEvent(&nsHttpConnectionMgr::OnMsgProcessAllSpdyPendingQ);
|
||||
}
|
||||
|
||||
void
|
||||
nsHttpConnectionMgr::ReportSpdyCWNDSetting(nsHttpConnectionInfo *ci,
|
||||
uint32_t cwndValue)
|
||||
{
|
||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||
|
||||
if (!gHttpHandler->UseSpdyPersistentSettings())
|
||||
return;
|
||||
|
||||
if (!ci)
|
||||
return;
|
||||
|
||||
nsConnectionEntry *ent = mCT.Get(ci->HashKey());
|
||||
if (!ent)
|
||||
return;
|
||||
|
||||
ent = GetSpdyPreferredEnt(ent);
|
||||
if (!ent) // just to be thorough - but that map should always exist
|
||||
return;
|
||||
|
||||
cwndValue = std::max(2U, cwndValue);
|
||||
cwndValue = std::min(128U, cwndValue);
|
||||
|
||||
ent->mSpdyCWND = cwndValue;
|
||||
ent->mSpdyCWNDTimeStamp = TimeStamp::Now();
|
||||
return;
|
||||
}
|
||||
|
||||
// a value of 0 means no setting is available
|
||||
uint32_t
|
||||
nsHttpConnectionMgr::GetSpdyCWNDSetting(nsHttpConnectionInfo *ci)
|
||||
{
|
||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||
|
||||
if (!gHttpHandler->UseSpdyPersistentSettings())
|
||||
return 0;
|
||||
|
||||
if (!ci)
|
||||
return 0;
|
||||
|
||||
nsConnectionEntry *ent = mCT.Get(ci->HashKey());
|
||||
if (!ent)
|
||||
return 0;
|
||||
|
||||
ent = GetSpdyPreferredEnt(ent);
|
||||
if (!ent) // just to be thorough - but that map should always exist
|
||||
return 0;
|
||||
|
||||
if (ent->mSpdyCWNDTimeStamp.IsNull())
|
||||
return 0;
|
||||
|
||||
// For privacy tracking reasons, and the fact that CWND is not
|
||||
// meaningful after some time, we don't honor stored CWND after 8
|
||||
// hours.
|
||||
TimeDuration age = TimeStamp::Now() - ent->mSpdyCWNDTimeStamp;
|
||||
if (age.ToMilliseconds() > (1000 * 60 * 60 * 8))
|
||||
return 0;
|
||||
|
||||
return ent->mSpdyCWND;
|
||||
}
|
||||
|
||||
nsHttpConnectionMgr::nsConnectionEntry *
|
||||
nsHttpConnectionMgr::GetSpdyPreferredEnt(nsConnectionEntry *aOriginalEntry)
|
||||
{
|
||||
@ -3669,7 +3608,6 @@ nsConnectionEntry::nsConnectionEntry(nsHttpConnectionInfo *ci)
|
||||
, mYellowConnection(nullptr)
|
||||
, mGreenDepth(kPipelineOpen)
|
||||
, mPipeliningPenalty(0)
|
||||
, mSpdyCWND(0)
|
||||
, mUsingSpdy(false)
|
||||
, mTestedSpdy(false)
|
||||
, mInPreferredHash(false)
|
||||
|
@ -242,11 +242,6 @@ public:
|
||||
// bit different.
|
||||
void ReportSpdyConnection(nsHttpConnection *, bool usingSpdy);
|
||||
|
||||
// A spdy server can supply cwnd information for the session that is used
|
||||
// in future sessions to speed up the opening portions of the connection.
|
||||
void ReportSpdyCWNDSetting(nsHttpConnectionInfo *host, uint32_t cwndValue);
|
||||
uint32_t GetSpdyCWNDSetting(nsHttpConnectionInfo *host);
|
||||
|
||||
bool SupportsPipelining(nsHttpConnectionInfo *);
|
||||
|
||||
bool GetConnectionData(nsTArray<HttpRetParams> *);
|
||||
@ -366,11 +361,6 @@ private:
|
||||
//
|
||||
nsTArray<nsCString> mCoalescingKeys;
|
||||
|
||||
// The value of a recevied SPDY settings type 5 previously received
|
||||
// for this connection entry and the time it was set.
|
||||
uint32_t mSpdyCWND;
|
||||
TimeStamp mSpdyCWNDTimeStamp;
|
||||
|
||||
// To have the UsingSpdy flag means some host with the same connection
|
||||
// entry has done NPN=spdy/* at some point. It does not mean every
|
||||
// connection is currently using spdy.
|
||||
|
@ -1456,7 +1456,7 @@
|
||||
"description": "SPDY: KB read per connection"
|
||||
},
|
||||
"SPDY_SETTINGS_UL_BW": {
|
||||
"expires_in_version": "never",
|
||||
"expires_in_version": "42",
|
||||
"kind": "exponential",
|
||||
"high": "10000",
|
||||
"n_buckets": 100,
|
||||
@ -1464,7 +1464,7 @@
|
||||
"description": "SPDY: Settings Upload Bandwidth"
|
||||
},
|
||||
"SPDY_SETTINGS_DL_BW": {
|
||||
"expires_in_version": "never",
|
||||
"expires_in_version": "42",
|
||||
"kind": "exponential",
|
||||
"high": "10000",
|
||||
"n_buckets": 100,
|
||||
@ -1472,7 +1472,7 @@
|
||||
"description": "SPDY: Settings Download Bandwidth"
|
||||
},
|
||||
"SPDY_SETTINGS_RTT": {
|
||||
"expires_in_version": "never",
|
||||
"expires_in_version": "42",
|
||||
"kind": "exponential",
|
||||
"high": "1000",
|
||||
"n_buckets": 100,
|
||||
@ -1485,10 +1485,10 @@
|
||||
"high": "5000",
|
||||
"n_buckets": 100,
|
||||
"extended_statistics_ok": true,
|
||||
"description": "SPDY: Settings Max Streams parameter"
|
||||
"description": "H2: Settings Max Streams parameter"
|
||||
},
|
||||
"SPDY_SETTINGS_CWND": {
|
||||
"expires_in_version": "never",
|
||||
"expires_in_version": "42",
|
||||
"kind": "exponential",
|
||||
"high": "500",
|
||||
"n_buckets": 50,
|
||||
@ -1496,7 +1496,7 @@
|
||||
"description": "SPDY: Settings CWND (packets)"
|
||||
},
|
||||
"SPDY_SETTINGS_RETRANS": {
|
||||
"expires_in_version": "never",
|
||||
"expires_in_version": "42",
|
||||
"kind": "exponential",
|
||||
"high": "100",
|
||||
"n_buckets": 50,
|
||||
@ -1509,7 +1509,7 @@
|
||||
"high": "1000",
|
||||
"n_buckets": 50,
|
||||
"extended_statistics_ok": true,
|
||||
"description": "SPDY: Settings IW (rounded to KB)"
|
||||
"description": "H2: Settings Initial Window (rounded to KB)"
|
||||
},
|
||||
"DISK_CACHE_CORRUPT_DETAILS": {
|
||||
"expires_in_version": "40",
|
||||
|
Loading…
Reference in New Issue
Block a user