-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Andrew Fleenor
committed
Aug 23, 2010
1 parent
476b817
commit 5abd10b
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
''' | ||
Parses a list of HTTPFlows into data suitable for writing to a HAR file. | ||
''' | ||
|
||
class Page: | ||
def __init__(self, title, startedDateTime): | ||
self.title = title | ||
self.startedDateTime = startedDateTime | ||
|
||
class Entry: | ||
def __init__(self, request, response): | ||
self.request = request | ||
self.response = response | ||
self.total_time = (response.end_time - request.start_time) + startup_time | ||
|
||
def extract_data(httpdata): | ||
''' | ||
Extracts http data from the httpdata and converts it into a python dict | ||
suitable for writing straight out as a HAR. | ||
Args: | ||
httpflows = [http.MessagePair] | ||
Returns: | ||
{} = HAR data | ||
''' |