Last active
August 19, 2016 05:45
-
-
Save Kevin-Bronsdijk/90647926f11cc293fb50fead24730613 to your computer and use it in GitHub Desktop.
GTmetrix-net version 6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = new TestRequest( | |
new Uri("http://devslice.net"), | |
Locations.London, | |
Browsers.Chrome) | |
{ | |
// Optional settings | |
EnableAdBlock = true, | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new TestRequest(new Uri(TestData.TestWebsite)) | |
{ | |
Browser = 3, | |
ConnectionSpeed = "5000/1000/30", | |
Location = 2 | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var client = Client(connection); | |
var request = new TestRequest( | |
new Uri("http://devslice.net"), | |
Locations.London, | |
Browsers.Chrome) | |
{ | |
// Optional settings | |
EnableAdBlock = true, | |
}; | |
var response = client.SubmitTestAsync(request); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var response = client.GetTestAsync(result.Body.TestId); | |
var result = response.Result; | |
if (result.StatusCode == HttpStatusCode.OK && | |
result.Body.State == ResultStates.Completed) | |
{ | |
var pageLoadTime = result.Body.Results.PageLoadTime; | |
... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var response = client.DownloadResource("test_id", ResourceTypes.PageSpeed); | |
if(response.Result.StatusCode == HttpStatusCode.OK) | |
{ | |
File.WriteAllBytes("c:\\test\\PageSpeed.json", response.Result.Body); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment