Statistics

class Tribler.Core.Modules.restapi.statistics_endpoint.StatisticsCommunitiesEndpoint(session)[source]

This class handles requests regarding Dispersy communities statistics.

render_GET(request)[source]
GET /statistics/communities

A GET request to this endpoint returns general statistics of active Dispersy communities.

Example request:

curl -X GET http://localhost:8085/statistics/communities

Example response:

{
    "dispersy_community_statistics": [{
        "identifier": "48d04e922dec4430daf22400c9d4cc5a3a53b27d",
        "member": "a66ebac9d88a239ef348a030d5ed3837868fc06d",
        "candidates": 43,
        "global_time": 42,
        "classification", "ChannelCommunity",
        "packets_sent": 43,
        "packets_received": 89,
        ...
    }, { ... }]
}
class Tribler.Core.Modules.restapi.statistics_endpoint.StatisticsDispersyEndpoint(session)[source]

This class handles requests regarding Dispersy statistics.

render_GET(request)[source]
GET /statistics/dispersy

A GET request to this endpoint returns general statistics in Dispersy. The returned runtime is the amount of seconds that Dispersy is active. The total uploaded and total downloaded statistics are in bytes.

Example request:

curl -X GET http://localhost:8085/statistics/dispersy

Example response:

{
    "dispersy_statistics": {
        "wan_address": "123.321.456.654:1234",
        "lan_address": "192.168.1.2:1435",
        "connection": "unknown",
        "runtime": 859.34,
        "total_downloaded": 538.53,
        "total_uploaded": 983.24,
        "packets_sent": 43,
        "packets_received": 89,
        ...
    }
}
class Tribler.Core.Modules.restapi.statistics_endpoint.StatisticsEndpoint(session)[source]

This endpoint is responsible for handing requests regarding statistics in Tribler.

class Tribler.Core.Modules.restapi.statistics_endpoint.StatisticsIPv8Endpoint(session)[source]

This class handles requests regarding IPv8 statistics.

render_GET(request)[source]
GET /statistics/ipv8

A GET request to this endpoint returns general statistics of IPv8.

Example request:

curl -X GET http://localhost:8085/statistics/ipv8

Example response:

{
    "ipv8_statistics": {
        "total_up": 3424324,
        "total_down": 859484
    }
}
class Tribler.Core.Modules.restapi.statistics_endpoint.StatisticsTriblerEndpoint(session)[source]

This class handles requests regarding Tribler statistics.

render_GET(request)[source]
GET /statistics/tribler

A GET request to this endpoint returns general statistics in Tribler. The size of the Tribler database is in bytes.

Example request:

curl -X GET http://localhost:8085/statistics/tribler

Example response:

{
    "tribler_statistics": {
        "num_channels": 1234,
        "database_size": 384923,
        "torrent_queue_stats": [{
            "failed": 2,
            "total": 9,
            "type": "TFTP",
            "pending": 1,
            "success": 6
        }, ...]
    }
}