Provides all of the main functional classes for analyzing HAR files
Bases: object
An object representing one page of a HAR resource
Returns the first entry object that does not have a redirect status, indicating that it is the actual page we care about (after redirects).
Returns a list of entry objects based on the filter criteria.
Parameters: |
|
---|
This method can return the TOTAL load time for the assets or the ACTUAL load time, the difference being that the actual load time takes asyncronys transactions into account. So, if you want the total load time, set async=False.
EXAMPLE:
I want to know the load time for images on a page that has two images, each of which took 2 seconds to download, but the browser downloaded them at the same time.
self.get_load_time(content_types=[‘image’]) (returns 2) self.get_load_time(content_types=[‘image’], async=False) (returns 4)
Bases: object
A Basic HAR parser that also adds helpful stuff for analyzing the performance of a web page.
Returns a dict of the timeline for the requested assets. The key is a datetime object (down to the millisecond) of ANY time where at least one of the requested assets was loaded. The value is a list of ALL assets that were loading at that time.
Parameters: | asset_list – list of the assets to create a timeline for. |
---|
Function to match headers.
Since the output of headers might use different case, like:
‘content-type’ vs ‘Content-Type’
This function is case-insensitive
Parameters: |
|
---|---|
Returns: | a bool indicating whether a match was found |
Helper function that returns entries with a request type matching the given request_type argument.
Parameters: |
|
---|
Helper function that returns entries with a status code matching then given status_code argument.
NOTE: This is doing a STRING comparison NOT NUMERICAL
Parameters: |
|
---|
Module for analyzing web pages using HAR files