Server instance.
All the HTTP endpoints are protected by basic authentication with user
admin
and password Server.serverSecret.
A Stats class instance.
The file path that will be used to serve the /view/page.log
requests.
An optional path that the HTTP server will expose with the /data endpoint.
Readonly
serverThe server listening port.
Readonly
serverThe basic auth secret.
Readonly
serverIf HTTPS protocol should be used.
A Stats class instance.
Private
deleteDELETE /session endpoint.
Delete the Session instance identified by the body.id
param.
Private
deleteDELETE /sessions endpoint.
Delete the Session instances specified by the body.ids
array.
Private
getPrivate
getGET /collected-stats endpoint.
Returns a JSON array of the last statistics collected from external running tools.
Private
getGET /data/* endpoint.
Returns the file content relative to the Config serverData
path.
If the requested path points to a directory, it returns the directory
content in tar.gz format.
Private
getPrivate
getGET /view/docker.log endpoint.
Returns the Docker logs related to the container running the tool. It requires to run the Docker container with the following options:
--cidfile /tmp/docker.id
-v /tmp/docker.id:/root/.webrtcperf/docker.id:ro
-v /var/lib/docker:/var/lib/docker:ro
Private
getPrivate
getGET /view/page.log endpoint.
Returns the page log file content as specified in Config pageLogPath
.
Private
getGET /screenshot/
Returns the page screenshot running inside the Session identified
by sessionID
.
Additional query params:
page
: the page number (starting from 0
) running inside the Session.format
: the image format (jpeg
, png
, webp
). Default: webp
.Private
getPrivate
getPrivate
putPUT /collected-stats endpoint.
Allows to inject Stats metrics coming from an external tool.
Private
putPUT /session endpoint.
Starts a new Session. The request body format will be parsed as a SessionParams object.
Private
putPUT /sessions endpoint.
Starts multiple Session instances as specified into the
body.sessions
value.
The request body will be parsed as a SessionParams object.
Starts the Server instance.
Private
startStops the Server instance.
Private
stopStops a new Session instance.
The session unique id.
An HTTP server instance that allows to control the tool using a REST interface. Moreover, it allows to aggregate stats data coming from multiple running tool instances.