Type: Integer
Default value: 0 (no cutoff)
The SpeedCheckMaxBpsCutoff property (specified in bits per second) tells BrowserHawk to use a shortened version of the speed test, if it detects that a visitor's download speed meets a minimum threshold. In such a case the result is returned faster and the test uses less bandwidth. Although the value returned by the ConnectionSpeed property will often be largely overstated in exchange for these benefits when the test can be cut early, you can still rely on the visitor's speed being at least what your threshold is set at in these cases.
For example, if you set this property to 3,000,000 (3Mbps) and ConnectionSpeed returns 7,500,000, you cannot trust that the speed was actually 7,500,000 bits/sec, but you can trust that it was at least 3,000,000. Likewise if the value returned is less than the threshold, you can trust that the full speed measurement was taken (that it was not cut off). As a comparison, had the SpeedCheckMaxBpsCutoff property not been set, then the 7,500,000 reading would be trusted.
In summary:
Do use SpeedCheckMaxBpsCutoff if you only want to know if a visitor's download speed is at least a certain threshold, and are not concerned about what their speed actually is. Doing so will make the ConnectionSpeed test run faster and use less bandwidth in some cases.
Do compare SpeedCheckMaxBpsCutoff in your code to see if a visitor is either over or under a single threshold (i.e. "if bh.ConnectionSpeed >= x").
Do NOT use SpeedCheckMaxBpsCutoff if you plan to do something with the returned ConnectionSpeed result other than comparing it to a single threshold. For example, do not use this property if you are displaying it to a user, using the result for analytics, comparing the result to multiple thresholds (i.e. "if (speed >= a AND speed <=b) else if (speed >=c AND speed <=d)"), using the result to estimate download times, etc.
Note: This property applies only when using the Progressive testing method.
To understand how this property can be helpful and when it may make sense to use it, we first need to understand how the speed test is performed.
When BrowserHawk performs a speed test, it first uses a small amount of data to get a quick, rough approximation of the download speed (pass 1). When the SpeedCheckMaxBpsCutoff property is not set, or if it is set but the threshold is not met, BrowserHawk then proceeds to perform a second speed test with a larger sample size of data (pass 2). It is this pass 2 of the speed check where the fine accuracy of the speed measurement is obtained.
In some circumstances, however, you may not be concerned specifically with the actual connection speed. Rather, you may just want to know whether a visitor's speed is above a certain threshold. In this case you can optimize the speed test by setting this threshold in the SpeedCheckMaxBpsCutoff property, in bits per second.
When this value is set, in some circumstances when the visitor's speed is above your threshold, BrowserHawk will be able to determine this from pass 1 alone. In this case, it skips pass 2 and returns a result which is greater than or equal to the visitor's download speed. This results in shorter testing time and far less bandwidth used by the test (for example, 50KB instead of potentially up to 5MB).
The trade off in this case is that the actual results of the speed test returned in the ConnectionSpeed property may be very significantly higher than their actual speed, but the result will not be lower than your threshold (recall that BrowserHawk exited the test early only because it determined the speed at least met your threshold). However, in this case the returned result does not matter because BrowserHawk did indeed determine the speed met your threshold.
It is also important to note that in some cases there will still be times where the measured speed exceeds your threshold, yet BrowserHawk is not able to determine this from pass 1 alone, and therefore goes on to perform pass 2. Think of this property as a way of telling BrowserHawk that if it can detect that the speed is greater than your threshold early on, then it should keep the test super quick and use very little bandwidth, and that in exchange for that you know that the returned speed will likely be overstated. And in those cases where it cannot determine whether the threshold is met from pass 1 alone, that it should go ahead and perform the full test as if the SpeedCheckMaxBpsCutoff property had not been set.
Now that we have an understanding of what the SpeedCheckMaxBpsCutoff property is used for, let's take a look at an example that demonstrates how it should be used. In this example we assume that we want to check the visitor's download speed to see if it is at least around 3Mbps or higher. Further, assume we are not concerned at all about what the actual speed is - just as long as its 3Mbps or higher.
In this case we would set the SpeedCheckMaxBpsCutoff property to 3000000. Then after performing the extended property check we simply would check to see if the ConnectionSpeed property is greater than or equal to 3000000. As discussed previously in this topic, it is important to recognize that if you set the SpeedCheckMaxBpsCutoff property, you should not display the result of the ConnectionSpeed property, nor use it to estimate download speeds, nor use it as the basis for anything except knowing the speed is at least the speed specified by the SpeedCheckMaxBpsCutoff.
Note: If setting this property, you must do so prior to calling the GetExtendedBrowser method.
See Also:
ConnectionSpeed Property (.NET)
ConnectionLatency Property (.NET)
SpeedCheckMaxWait Property (.NET)
SpeedCheckTestSeconds Property (.NET)
SpeedCheckType Property (.NET)
SupportFilesRoot Property (.NET)
Progressive Versus Original Speed Tests