WD
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QNetworkAccessManagerTracer Class Reference

#include <qnetwork_access_manager_tracer.h>

Inheritance diagram for QNetworkAccessManagerTracer:
Collaboration diagram for QNetworkAccessManagerTracer:

Public Member Functions

 QNetworkAccessManagerTracer (webdriver::Session *session, QObject *parent=0)
 
virtual ~QNetworkAccessManagerTracer ()
 

Protected Slots

void writeReply (QNetworkReply *reply)
 

Protected Member Functions

virtual QNetworkReply * createRequest (Operation op, const QNetworkRequest &req, QIODevice *outgoingData=0)
 

Detailed Description

Auxiliary class for performance logging support.
Limitation: It is currently not supported to change the network access manager after the QWebPage has used it.

Constructor & Destructor Documentation

QNetworkAccessManagerTracer::QNetworkAccessManagerTracer ( webdriver::Session session,
QObject parent = 0 
)

Create custom network access manager.

Parameters
sessionpointer to Session object.
parentset as the parent object.
virtual QNetworkAccessManagerTracer::~QNetworkAccessManagerTracer ( )
virtual

Member Function Documentation

virtual QNetworkReply* QNetworkAccessManagerTracer::createRequest ( Operation  op,
const QNetworkRequest &  req,
QIODevice *  outgoingData = 0 
)
protectedvirtual

Overrided, additional write a JSON entry for every received reply.

void QNetworkAccessManagerTracer::writeReply ( QNetworkReply *  reply)
protectedslot

Create single log entry and add it to session's performance log.
Currently WebDriver supports only Performance Log of Network.

Each entry is a JSON string of the following structure:

{
"webview": "class_name",
"message": {
"args": {
"file": "file_path/name",
"method": "HTTP_method",
"status": "HTTP_status_code",
},
"tid": "thread_id",
"ts": "timestamp",
"tts": "thread-specific_CPU-time"
}
}
Parameters
replypointer to reply, that contains the data which will be written to PerfLog.

The documentation for this class was generated from the following file: