diff --git a/docs/reference-Session.html b/docs/reference-Session.html index e7a40efe0..ced28a883 100644 --- a/docs/reference-Session.html +++ b/docs/reference-Session.html @@ -47,15 +47,13 @@

Table of contents

@@ -541,7 +539,6 @@ class session: public boost::noncopyable void pause (); bool is_paused () const; void set_load_function (user_load_function_t fun); - session_status status () const; void get_cache_info (cache_status* ret, torrent_handle h = torrent_handle(), int flags = 0) const; feed_handle add_feed (feed_settings const& feed); void remove_feed (feed_handle h); @@ -805,14 +802,6 @@ to send nor receive any data until the function call returns.

 void fun(sha1_hash const& info_hash, std::vector<char>& buf, error_code& ec);
 
-
-
-

status()

-
-session_status status () const;
-
-

returns session wide-statistics and status. For more information, see -the session_status struct.

get_cache_info()

@@ -893,7 +882,7 @@ void dht_get_item (sha1_hash const& target);

query the DHT for an immutable item at the target hash. the result is posted as a dht_immutable_item_alert.

-
+

dht_get_item()

 void dht_get_item (boost::array<char, 32> key
@@ -915,7 +904,7 @@ the returned hash is the key that is to be used to look the item
 up agan. It's just the sha-1 hash of the bencoded form of the
 structure.

-
+

dht_put_item()

 void dht_put_item (boost::array<char, 32> key
@@ -1492,12 +1481,14 @@ factor
 

dht_routing_bucket

Declared in "libtorrent/session_status.hpp"

-

holds dht routing table stats

+

TODO: 3 add accessors to query the DHT state (post the result as an alert) +holds dht routing table stats

 struct dht_routing_bucket
 {
    int num_nodes;
    int num_replacements;
+   int last_active;
 };
 
@@ -1506,245 +1497,9 @@ struct dht_routing_bucket
the total number of nodes and replacement nodes in the routing table
-
-
-

utp_status

-

Declared in "libtorrent/session_status.hpp"

-

holds counters and gauges for the uTP sockets

-
-struct utp_status
-{
-   int num_idle;
-   int num_syn_sent;
-   int num_connected;
-   int num_fin_sent;
-   int num_close_wait;
-};
-
- - - - -
-
num_idle num_syn_sent num_connected num_fin_sent num_close_wait
-
gauges. These are snapshots of the number of -uTP sockets in each respective state
-
-
-
-

session_status

-

Declared in "libtorrent/session_status.hpp"

-

contains session wide state and counters

-
-struct session_status
-{
-   bool has_incoming_connections;
-   int upload_rate;
-   int download_rate;
-   boost::int64_t total_download;
-   boost::int64_t total_upload;
-   int payload_upload_rate;
-   int payload_download_rate;
-   boost::int64_t total_payload_download;
-   boost::int64_t total_payload_upload;
-   int ip_overhead_upload_rate;
-   int ip_overhead_download_rate;
-   boost::int64_t total_ip_overhead_download;
-   boost::int64_t total_ip_overhead_upload;
-   int dht_upload_rate;
-   int dht_download_rate;
-   boost::int64_t total_dht_download;
-   boost::int64_t total_dht_upload;
-   int tracker_upload_rate;
-   int tracker_download_rate;
-   boost::int64_t total_tracker_download;
-   boost::int64_t total_tracker_upload;
-   boost::int64_t total_redundant_bytes;
-   boost::int64_t total_failed_bytes;
-   int num_peers;
-   int num_dead_peers;
-   int num_unchoked;
-   int allowed_upload_slots;
-   int up_bandwidth_queue;
-   int down_bandwidth_queue;
-   int up_bandwidth_bytes_queue;
-   int down_bandwidth_bytes_queue;
-   int optimistic_unchoke_counter;
-   int unchoke_counter;
-   int disk_write_queue;
-   int disk_read_queue;
-   int dht_nodes;
-   int dht_node_cache;
-   int dht_torrents;
-   boost::int64_t dht_global_nodes;
-   std::vector<dht_lookup> active_requests;
-   std::vector<dht_routing_bucket> dht_routing_table;
-   int dht_total_allocations;
-   utp_status utp_stats;
-   int peerlist_size;
-   int num_torrents;
-   int num_paused_torrents;
-};
-
-
-
has_incoming_connections
-
false as long as no incoming connections have been -established on the listening socket. Every time you change the listen port, this will -be reset to false.
-
- -
-
upload_rate download_rate
-
the total download and upload rates accumulated -from all torrents. This includes bittorrent protocol, DHT and an estimated TCP/IP -protocol overhead.
-
- -
-
total_download total_upload
-
the total number of bytes downloaded and -uploaded to and from all torrents. This also includes all the protocol overhead.
-
- -
-
payload_upload_rate payload_download_rate
-
the rate of the payload -down- and upload only.
-
- -
-
total_payload_download total_payload_upload
-
the total transfers of payload -only. The payload does not include the bittorrent protocol overhead, but only parts of the -actual files to be downloaded.
-
- - - -
-
ip_overhead_upload_rate ip_overhead_download_rate total_ip_overhead_download total_ip_overhead_upload
-
the estimated TCP/IP overhead in each direction.
-
- - - -
-
dht_upload_rate dht_download_rate total_dht_download total_dht_upload
-
the upload and download rate used by DHT traffic. Also the total number -of bytes sent and received to and from the DHT.
-
- - - -
-
tracker_upload_rate tracker_download_rate total_tracker_download total_tracker_upload
-
the upload and download rate used by tracker traffic. Also the total number -of bytes sent and received to and from trackers.
-
-
-
total_redundant_bytes
-
the number of bytes that has been received more than once. -This can happen if a request from a peer times out and is requested from a different -peer, and then received again from the first one. To make this lower, increase the -request_timeout and the piece_timeout in the session settings.
-
-
-
total_failed_bytes
-
the number of bytes that was downloaded which later failed -the hash-check.
-
-
-
num_peers
-
the total number of peer connections this session has. This includes -incoming connections that still hasn't sent their handshake or outgoing connections -that still hasn't completed the TCP connection. This number may be slightly higher -than the sum of all peers of all torrents because the incoming connections may not -be assigned a torrent yet.
-
-
-
num_unchoked
-
the current number of unchoked peers.
-
-
-
allowed_upload_slots
-
the current allowed number of unchoked peers.
-
- -
-
up_bandwidth_queue down_bandwidth_queue
-
the number of peers that are -waiting for more bandwidth quota from the torrent rate limiter.
-
- -
-
up_bandwidth_bytes_queue down_bandwidth_bytes_queue
-
count the number of -bytes the connections are waiting for to be able to send and receive.
-
- -
-
optimistic_unchoke_counter unchoke_counter
-
tells the number of -seconds until the next optimistic unchoke change and the start of the next -unchoke interval. These numbers may be reset prematurely if a peer that is -unchoked disconnects or becomes notinterested.
-
- -
-
disk_write_queue disk_read_queue
-
the number of peers currently -waiting on a disk write or disk read to complete before it receives or sends -any more data on the socket. It'a a metric of how disk bound you are.
-
- -
-
dht_nodes dht_node_cache
-
only available when -built with DHT support. They are all set to 0 if the DHT isn't running. When -the DHT is running, dht_nodes is set to the number of nodes in the routing -table. This number only includes active nodes, not cache nodes. The -dht_node_cache is set to the number of nodes in the node cache. These nodes -are used to replace the regular nodes in the routing table in case any of them -becomes unresponsive.
-
-
-
dht_torrents
-
the number of torrents tracked by the DHT at the moment.
-
-
-
dht_global_nodes
-
an estimation of the total number of nodes in the DHT -network.
-
-
-
active_requests
-
a vector of the currently running DHT lookups.
-
-
-
dht_routing_table
-
contains information about every bucket in the DHT routing -table.
-
-
-
dht_total_allocations
-
the number of nodes allocated dynamically for a -particular DHT lookup. This represents roughly the amount of memory used -by the DHT.
-
-
-
utp_stats
-
statistics on the uTP sockets.
-
-
-
peerlist_size
-
the number of known peers across all torrents. These are not necessarily -connected peers, just peers we know of.
-
- -
-
num_torrents num_paused_torrents
-
the number of torrents in the -session and the number of them that are currently paused, respectively.
+
+
last_active
+
number of seconds since last activity

find_metric_idx()

diff --git a/docs/stats_counters.rst b/docs/stats_counters.rst index d473deba5..95b7bf4cb 100644 --- a/docs/stats_counters.rst +++ b/docs/stats_counters.rst @@ -1755,6 +1755,41 @@ the number of bytes sent and received by the DHT uTP counters. Each counter represents the number of time each event has occurred. +.. _utp.num_utp_idle: + +.. _utp.num_utp_syn_sent: + +.. _utp.num_utp_connected: + +.. _utp.num_utp_fin_sent: + +.. _utp.num_utp_close_wait: + +.. raw:: html + + + + + + + ++------------------------+-------+ +| name | type | ++========================+=======+ +| utp.num_utp_idle | gauge | ++------------------------+-------+ +| utp.num_utp_syn_sent | gauge | ++------------------------+-------+ +| utp.num_utp_connected | gauge | ++------------------------+-------+ +| utp.num_utp_fin_sent | gauge | ++------------------------+-------+ +| utp.num_utp_close_wait | gauge | ++------------------------+-------+ + + +the number of uTP sockets in each respective state + .. _sock_bufs.socket_send_size3: .. _sock_bufs.socket_send_size4: diff --git a/docs/todo.html b/docs/todo.html index 287f938ef..be5fd2cf3 100644 --- a/docs/todo.html +++ b/docs/todo.html @@ -22,10 +22,10 @@

libtorrent todo-list

0 urgent -9 important -33 relevant +10 important +28 relevant 9 feasible -139 notes +140 notes
relevance 3../test/test_dht.cpp:436test obfuscated_get_peers
relevance 3../test/test_transfer.cpp:284factor out the disk-full test into its own unit test
relevance 3../test/test_transfer.cpp:288factor out the disk-full test into its own unit test
relevance 3../src/session_impl.cpp:5195deprecate this function. All of this functionality should be exposed as performance counters
relevance 3../src/torrent.cpp:7713if peer is a really good peer, maybe we shouldn't disconnect it
relevance 3../src/torrent.cpp:7713if peer is a really good peer, maybe we shouldn't disconnect it
relevance 3../src/web_peer_connection.cpp:596just make this peer not have the pieces associated with the file we just requested. Only when it doesn't have any of the file do the following
relevance 3../src/web_peer_connection.cpp:628just make this peer not have the pieces associated with the file we just requested. Only when it doesn't have any of the file do the following
relevance 3../src/kademlia/get_item.cpp:220we don't support CAS errors here! we need a custom observer
relevance 3../src/kademlia/get_item.cpp:220we don't support CAS errors here! we need a custom observer
relevance 3../include/libtorrent/block_cache.hpp:209could this be a scoped_array instead? does cached_piece_entry really need to be copyable? cached_piece_entry does need to be copyable since it's part of a container, but it's possible it could be a raw pointer or boost::unique_ptr perhaps
relevance 3../include/libtorrent/block_cache.hpp:209could this be a scoped_array instead? does cached_piece_entry really need to be copyable? cached_piece_entry does need to be copyable since it's part of a container, but it's possible it could be a raw pointer or boost::unique_ptr perhaps
relevance 2../test/test_resume.cpp:331test all other resume flags here too. This would require returning more than just the torrent_status from test_resume_flags. Also http seeds and trackers for instance
relevance 3../include/libtorrent/file_storage.hpp:49the file_entry should be deprecated and add_file() should be thought through a bit better
relevance 3../include/libtorrent/session_status.hpp:87add accessors to query the DHT state (post the result as an alert) holds dht routing table stats
relevance 2../test/test_resume.cpp:331test all other resume flags here too. This would require returning more than just the torrent_status from test_resume_flags. Also http seeds and trackers for instance
relevance 2../src/disk_io_thread.cpp:838should this be allocated on the stack?
relevance 2../src/disk_io_thread.cpp:876we're not flushing the read cache at all?
relevance 2../src/file.cpp:1501use vm_copy here, if available, and if buffers are aligned
relevance 2../src/file.cpp:1512use vm_copy here, if available, and if buffers are aligned
relevance 2../src/file_storage.cpp:480it would be nice if file_entry::filehash could be taken into account as well, and if the file_storage object could actually hold copies of filehash
relevance 2../src/file_storage.cpp:482it would be nice if file_entry::filehash could be taken into account as well, and if the file_storage object could actually hold copies of filehash
relevance 2../src/peer_connection.cpp:4596use a deadline_timer for timeouts. Don't rely on second_tick()! Hook this up to connect timeout as well. This would improve performance because of less work in second_tick(), and might let use remove ticking entirely eventually
relevance 2../src/session_impl.cpp:216find a better place for this function
relevance 2../src/session_impl.cpp:1807the udp socket(s) should be using the same generic mechanism and not be restricted to a single one we should open a one listen socket for each entry in the listen_interfaces list
relevance 2../src/session_impl.cpp:1807the udp socket(s) should be using the same generic mechanism and not be restricted to a single one we should open a one listen socket for each entry in the listen_interfaces list
relevance 2../src/session_impl.cpp:1902use bind_to_device in udp_socket
relevance 2../src/session_impl.cpp:1929use bind_to_device in udp_socket
relevance 2../src/session_impl.cpp:3392make a list for torrents that want to be announced on the DHT so we don't have to loop over all torrents, just to find the ones that want to announce
relevance 2../src/torrent.cpp:718post alert
relevance 2../src/torrent.cpp:718post alert
relevance 2../src/torrent.cpp:4719abort lookups this torrent has made via the session host resolver interface
relevance 2../src/torrent.cpp:4719abort lookups this torrent has made via the session host resolver interface
relevance 2../src/utp_stream.cpp:348it would be nice if not everything would have to be public here
relevance 2../src/web_peer_connection.cpp:687create a mapping of file-index to redirection URLs. Use that to form URLs instead. Support to reconnect to a new server without destructing this peer_connection
relevance 2../src/kademlia/node.cpp:67make this configurable in dht_settings
relevance 2../src/kademlia/node.cpp:67make this configurable in dht_settings
relevance 2../src/kademlia/node.cpp:495it would be nice to have a bias towards node-id prefixes that are missing in the bucket
relevance 2../src/kademlia/node.cpp:495it would be nice to have a bias towards node-id prefixes that are missing in the bucket
relevance 2../src/kademlia/node.cpp:892find_node should write directly to the response entry
relevance 2../src/kademlia/node.cpp:894find_node should write directly to the response entry
relevance 2../src/kademlia/node_id.cpp:134this could be optimized if SSE 4.2 is available. It could also be optimized given that we have a fixed length
relevance 2../src/kademlia/node_id.cpp:134this could be optimized if SSE 4.2 is available. It could also be optimized given that we have a fixed length
relevance 2../src/kademlia/routing_table.cpp:884move the lowest priority nodes to the replacement bucket
relevance 2../src/kademlia/routing_table.cpp:886move the lowest priority nodes to the replacement bucket
relevance 2../include/libtorrent/enum_net.hpp:137this could be done more efficiently by just looking up the interface with the given name, maybe even with if_nametoindex()
relevance 2../include/libtorrent/enum_net.hpp:137this could be done more efficiently by just looking up the interface with the given name, maybe even with if_nametoindex()
relevance 2../include/libtorrent/intrusive_ptr_base.hpp:44remove this class and transition over to using shared_ptr and make_shared instead
relevance 2../include/libtorrent/intrusive_ptr_base.hpp:44remove this class and transition over to using shared_ptr and make_shared instead
relevance 2../include/libtorrent/proxy_base.hpp:257use the resolver interface that has a built-in cache
relevance 2../include/libtorrent/proxy_base.hpp:257use the resolver interface that has a built-in cache
relevance 2../include/libtorrent/session.hpp:268the ip filter should probably be saved here too
relevance 2../include/libtorrent/session.hpp:271the ip filter should probably be saved here too
relevance 2../include/libtorrent/session_settings.hpp:55this type is only used internally now. move it to an internal header and make this type properly deprecated.
relevance 2../include/libtorrent/session_settings.hpp:55this type is only used internally now. move it to an internal header and make this type properly deprecated.
relevance 2../include/libtorrent/settings_pack.hpp:70add an API to query a settings_pack as well
relevance 2../include/libtorrent/socks5_stream.hpp:131fix error messages to use custom error_code category
relevance 2../include/libtorrent/socks5_stream.hpp:132add async_connect() that takes a hostname and port as well
relevance 2../include/libtorrent/socks5_stream.hpp:131add async_connect() that takes a hostname and port as well
relevance 2../include/libtorrent/tracker_manager.hpp:269this class probably doesn't need to have virtual functions.
relevance 2../include/libtorrent/tracker_manager.hpp:269this class probably doesn't need to have virtual functions.
relevance 2../include/libtorrent/tracker_manager.hpp:366this should be unique_ptr in the future
relevance 2../include/libtorrent/tracker_manager.hpp:366this should be unique_ptr in the future
relevance 2../include/libtorrent/aux_/session_interface.hpp:104the IP voting mechanism should be factored out to its own class, not part of the session
relevance 2../include/libtorrent/aux_/session_interface.hpp:104the IP voting mechanism should be factored out to its own class, not part of the session
relevance 2../include/libtorrent/aux_/session_settings.hpp:73make this a bitfield
relevance 2../include/libtorrent/aux_/session_settings.hpp:73make this a bitfield
relevance 1../src/disk_io_thread.cpp:233it would be nice to have the number of threads be set dynamically
relevance 1../src/disk_io_thread.cpp:233it would be nice to have the number of threads be set dynamically
relevance 1../src/http_seed_connection.cpp:124in chunked encoding mode, this assert won't hold. the chunk headers should be subtracted from the receive_buffer_size
relevance 1../src/http_seed_connection.cpp:124in chunked encoding mode, this assert won't hold. the chunk headers should be subtracted from the receive_buffer_size
relevance 1../src/session_impl.cpp:5166report the proper address of the router as the source IP of this understanding of our external address, instead of the empty address
relevance 1../src/session_impl.cpp:5194report the proper address of the router as the source IP of this understanding of our external address, instead of the empty address
relevance 1../src/session_impl.cpp:6326we only need to do this if our global IPv4 address has changed since the DHT (currently) only supports IPv4. Since restarting the DHT is kind of expensive, it would be nice to not do it unnecessarily
relevance 1../src/session_impl.cpp:6384we only need to do this if our global IPv4 address has changed since the DHT (currently) only supports IPv4. Since restarting the DHT is kind of expensive, it would be nice to not do it unnecessarily
relevance 1../src/torrent.cpp:1156make this depend on the error and on the filesystem the files are being downloaded to. If the error is no_space_left_on_device and the filesystem doesn't support sparse files, only zero the priorities of the pieces that are at the tails of all files, leaving everything up to the highest written piece in each file
relevance 1../src/torrent.cpp:1156make this depend on the error and on the filesystem the files are being downloaded to. If the error is no_space_left_on_device and the filesystem doesn't support sparse files, only zero the priorities of the pieces that are at the tails of all files, leaving everything up to the highest written piece in each file
relevance 1../src/torrent.cpp:6865save the send_stats state instead of throwing them away it may pose an issue when downgrading though
relevance 1../src/torrent.cpp:6865save the send_stats state instead of throwing them away it may pose an issue when downgrading though
relevance 1../src/torrent.cpp:7958should disconnect all peers that have the pieces we have not just seeds. It would be pretty expensive to check all pieces for all peers though
relevance 1../src/torrent.cpp:7958should disconnect all peers that have the pieces we have not just seeds. It would be pretty expensive to check all pieces for all peers though
relevance 1../include/libtorrent/ip_voter.hpp:122instead, have one instance per possible subnet, global IPv4, global IPv6, loopback, 192.168.x.x, 10.x.x.x, etc.
relevance 1../include/libtorrent/web_peer_connection.hpp:122if we make this be a disk_buffer_holder instead we would save a copy sometimes use allocate_disk_receive_buffer and release_disk_receive_buffer
relevance 0../test/test_block_cache.cpp:475test try_evict_blocks
relevance 0../test/test_block_cache.cpp:476test evicting volatile pieces, to see them be removed
relevance 0../test/test_block_cache.cpp:477test evicting dirty pieces
relevance 0../test/test_block_cache.cpp:478test free_piece
relevance 0../test/test_block_cache.cpp:479test abort_dirty
relevance 0../test/test_block_cache.cpp:480test unaligned reads
relevance 0../test/test_block_cache.cpp:475test try_evict_blocks
relevance 0../test/test_block_cache.cpp:476test evicting volatile pieces, to see them be removed
relevance 0../test/test_block_cache.cpp:477test evicting dirty pieces
relevance 0../test/test_block_cache.cpp:478test free_piece
relevance 0../test/test_block_cache.cpp:479test abort_dirty
relevance 0../test/test_block_cache.cpp:480test unaligned reads
relevance 0../test/test_metadata_extension.cpp:87it would be nice to test reversing which session is making the connection as well
relevance 0../test/test_metadata_extension.cpp:87it would be nice to test reversing which session is making the connection as well
relevance 0../test/test_peer_list.cpp:419test applying a port_filter
relevance 0../test/test_peer_list.cpp:420test erasing peers
relevance 0../test/test_peer_list.cpp:421test using port and ip filter
relevance 0../test/test_peer_list.cpp:422test incrementing failcount (and make sure we no longer consider the peer a connect canidate)
relevance 0../test/test_peer_list.cpp:423test max peerlist size
relevance 0../test/test_peer_list.cpp:424test logic for which connection to keep when receiving an incoming connection to the same peer as we just made an outgoing connection to
relevance 0../test/test_peer_list.cpp:425test update_peer_port with allow_multiple_connections_per_ip
relevance 0../test/test_peer_list.cpp:426test set_seed
relevance 0../test/test_peer_list.cpp:427test has_peer
relevance 0../test/test_peer_list.cpp:428test insert_peer with a full list
relevance 0../test/test_peer_list.cpp:429test add i2p peers
relevance 0../test/test_peer_list.cpp:430test allow_i2p_mixed
relevance 0../test/test_peer_list.cpp:431test insert_peer failing
relevance 0../test/test_peer_list.cpp:432test IPv6
relevance 0../test/test_peer_list.cpp:433test connect_to_peer() failing
relevance 0../test/test_peer_list.cpp:434test connection_closed
relevance 0../test/test_peer_list.cpp:435test recalculate connect candidates
relevance 0../test/test_peer_list.cpp:436add tests here
relevance 0../test/test_peer_list.cpp:419test applying a port_filter
relevance 0../test/test_peer_list.cpp:420test erasing peers
relevance 0../test/test_peer_list.cpp:421test using port and ip filter
relevance 0../test/test_peer_list.cpp:422test incrementing failcount (and make sure we no longer consider the peer a connect canidate)
relevance 0../test/test_peer_list.cpp:423test max peerlist size
relevance 0../test/test_peer_list.cpp:424test logic for which connection to keep when receiving an incoming connection to the same peer as we just made an outgoing connection to
relevance 0../test/test_peer_list.cpp:425test update_peer_port with allow_multiple_connections_per_ip
relevance 0../test/test_peer_list.cpp:426test set_seed
relevance 0../test/test_peer_list.cpp:427test has_peer
relevance 0../test/test_peer_list.cpp:428test insert_peer with a full list
relevance 0../test/test_peer_list.cpp:429test add i2p peers
relevance 0../test/test_peer_list.cpp:430test allow_i2p_mixed
relevance 0../test/test_peer_list.cpp:431test insert_peer failing
relevance 0../test/test_peer_list.cpp:432test IPv6
relevance 0../test/test_peer_list.cpp:433test connect_to_peer() failing
relevance 0../test/test_peer_list.cpp:434test connection_closed
relevance 0../test/test_peer_list.cpp:435test recalculate connect candidates
relevance 0../test/test_peer_list.cpp:436add tests here
relevance 0../test/test_primitives.cpp:213test the case where we have > 120 samples (and have the base delay actually be updated)
relevance 0../test/test_primitives.cpp:214test the case where a sample is lower than the history entry but not lower than the base
relevance 0../test/test_primitives.cpp:213test the case where we have > 120 samples (and have the base delay actually be updated)
relevance 0../test/test_primitives.cpp:214test the case where a sample is lower than the history entry but not lower than the base
relevance 0../test/test_rss.cpp:135verify some key state is saved in 'state'
relevance 0../test/test_rss.cpp:135verify some key state is saved in 'state'
relevance 0../test/test_ssl.cpp:377test using a signed certificate with the wrong info-hash in DN
relevance 0../test/test_ssl.cpp:369test using a signed certificate with the wrong info-hash in DN
relevance 0../test/test_ssl.cpp:475also test using a hash that refers to a valid torrent but that differs from the SNI hash
relevance 0../test/test_ssl.cpp:467also test using a hash that refers to a valid torrent but that differs from the SNI hash
relevance 0../test/test_torrent.cpp:133wait for an alert rather than just waiting 10 seconds. This is kind of silly
relevance 0../test/test_torrent.cpp:133wait for an alert rather than just waiting 10 seconds. This is kind of silly
relevance 0../test/test_torrent_parse.cpp:116test remap_files
relevance 0../test/test_torrent_parse.cpp:117merkle torrents. specifically torrent_info::add_merkle_nodes and torrent with "root hash"
relevance 0../test/test_torrent_parse.cpp:118torrent with 'p' (padfile) attribute
relevance 0../test/test_torrent_parse.cpp:119torrent with 'h' (hidden) attribute
relevance 0../test/test_torrent_parse.cpp:120torrent with 'x' (executable) attribute
relevance 0../test/test_torrent_parse.cpp:121torrent with 'l' (symlink) attribute
relevance 0../test/test_torrent_parse.cpp:122creating a merkle torrent (torrent_info::build_merkle_list)
relevance 0../test/test_torrent_parse.cpp:123torrent with multiple trackers in multiple tiers, making sure we shuffle them (how do you test shuffling?, load it multiple times and make sure it's in different order at least once)
relevance 0../test/test_torrent_parse.cpp:116test remap_files
relevance 0../test/test_torrent_parse.cpp:117merkle torrents. specifically torrent_info::add_merkle_nodes and torrent with "root hash"
relevance 0../test/test_torrent_parse.cpp:118torrent with 'p' (padfile) attribute
relevance 0../test/test_torrent_parse.cpp:119torrent with 'h' (hidden) attribute
relevance 0../test/test_torrent_parse.cpp:120torrent with 'x' (executable) attribute
relevance 0../test/test_torrent_parse.cpp:121torrent with 'l' (symlink) attribute
relevance 0../test/test_torrent_parse.cpp:122creating a merkle torrent (torrent_info::build_merkle_list)
relevance 0../test/test_torrent_parse.cpp:123torrent with multiple trackers in multiple tiers, making sure we shuffle them (how do you test shuffling?, load it multiple times and make sure it's in different order at least once)
relevance 0../test/test_tracker.cpp:198test parse peers6
relevance 0../test/test_tracker.cpp:199test parse tracker-id
relevance 0../test/test_tracker.cpp:200test parse failure-reason
relevance 0../test/test_tracker.cpp:201test all failure paths invalid bencoding not a dictionary no files entry in scrape response no info-hash entry in scrape response malformed peers in peer list of dictionaries uneven number of bytes in peers and peers6 string responses
relevance 0../test/test_tracker.cpp:198test parse peers6
relevance 0../test/test_tracker.cpp:199test parse tracker-id
relevance 0../test/test_tracker.cpp:200test parse failure-reason
relevance 0../test/test_tracker.cpp:201test all failure paths invalid bencoding not a dictionary no files entry in scrape response no info-hash entry in scrape response malformed peers in peer list of dictionaries uneven number of bytes in peers and peers6 string responses
relevance 0../test/test_upnp.cpp:100store the log and verify that some key messages are there
relevance 0../test/test_upnp.cpp:100store the log and verify that some key messages are there
relevance 0../test/web_seed_suite.cpp:374file hashes don't work with the new torrent creator reading async
relevance 0../test/web_seed_suite.cpp:364file hashes don't work with the new torrent creator reading async
relevance 0../src/block_cache.cpp:884it's somewhat expensive to iterate over this linked list. Presumably because of the random access of memory. It would be nice if pieces with no evictable blocks weren't in this list
relevance 0../src/block_cache.cpp:884it's somewhat expensive to iterate over this linked list. Presumably because of the random access of memory. It would be nice if pieces with no evictable blocks weren't in this list
relevance 0../src/block_cache.cpp:948this should probably only be done every n:th time
relevance 0../src/block_cache.cpp:1720create a holder for refcounts that automatically decrement
relevance 0../src/bt_peer_connection.cpp:663this could be optimized using knuth morris pratt
relevance 0../src/bt_peer_connection.cpp:663this could be optimized using knuth morris pratt
relevance 0../src/bt_peer_connection.cpp:2204if we're finished, send upload_only message
relevance 0../src/bt_peer_connection.cpp:2204if we're finished, send upload_only message
relevance 0../src/choker.cpp:332optimize this using partial_sort or something. We don't need to sort the entire list
relevance 0../src/choker.cpp:332optimize this using partial_sort or something. We don't need to sort the entire list
relevance 0../src/choker.cpp:335make the comparison function a free function and move it into this cpp file
relevance 0../src/choker.cpp:335make the comparison function a free function and move it into this cpp file
relevance 0../src/choker.cpp:340make configurable
relevance 0../src/choker.cpp:340make configurable
relevance 0../src/choker.cpp:354make configurable
relevance 0../src/disk_io_thread.cpp:880it would be nice to optimize this by having the cache pieces also ordered by
relevance 0../src/disk_io_thread.cpp:923instead of doing a lookup each time through the loop, save cached_piece_entry pointers with piece_refcount incremented to pin them
relevance 0../src/disk_io_thread.cpp:1123instead of doing this. pass in the settings to each storage_interface call. Each disk thread could hold its most recent understanding of the settings in a shared_ptr, and update it every time it wakes up from a job. That way each access to the settings won't require a mutex to be held.
relevance 0../src/disk_io_thread.cpp:1134instead of doing this. pass in the settings to each storage_interface call. Each disk thread could hold its most recent understanding of the settings in a shared_ptr, and update it every time it wakes up from a job. That way each access to the settings won't require a mutex to be held.
relevance 0../src/disk_io_thread.cpp:1151a potentially more efficient solution would be to have a special queue for retry jobs, that's only ever run when a job completes, in any thread. It would only work if counters::num_running_disk_jobs > 0
relevance 0../src/disk_io_thread.cpp:1162a potentially more efficient solution would be to have a special queue for retry jobs, that's only ever run when a job completes, in any thread. It would only work if counters::num_running_disk_jobs > 0
relevance 0../src/disk_io_thread.cpp:1165it should clear the hash state even when there's an error, right?
relevance 0../src/disk_io_thread.cpp:1176it should clear the hash state even when there's an error, right?
relevance 0../src/disk_io_thread.cpp:1860maybe the tailqueue_iterator should contain a pointer-pointer instead and have an unlink function
relevance 0../src/disk_io_thread.cpp:1871maybe the tailqueue_iterator should contain a pointer-pointer instead and have an unlink function
relevance 0../src/disk_io_thread.cpp:2115this is potentially very expensive. One way to solve it would be to have a fence for just this one piece.
relevance 0../src/disk_io_thread.cpp:2126this is potentially very expensive. One way to solve it would be to have a fence for just this one piece.
relevance 0../src/disk_io_thread.cpp:2376we should probably just hang the job on the piece and make sure the hasher gets kicked
relevance 0../src/disk_io_thread.cpp:2387we should probably just hang the job on the piece and make sure the hasher gets kicked
relevance 0../src/disk_io_thread.cpp:2446introduce a holder class that automatically increments and decrements the piece_refcount
relevance 0../src/disk_io_thread.cpp:2457introduce a holder class that automatically increments and decrements the piece_refcount
relevance 0../src/disk_io_thread.cpp:2688it would be nice to not have to lock the mutex every turn through this loop
relevance 0../src/disk_io_thread.cpp:2699it would be nice to not have to lock the mutex every turn through this loop
relevance 0../src/http_tracker_connection.cpp:93support authentication (i.e. user name and password) in the URL
relevance 0../src/http_tracker_connection.cpp:194support this somehow
relevance 0../src/http_tracker_connection.cpp:194support this somehow
relevance 0../src/lsd.cpp:84instead if writing to a file, post alerts. Or call a log callback
relevance 0../src/metadata_transfer.cpp:359this is not safe. The torrent could be unloaded while we're still sending the metadata
relevance 0../src/metadata_transfer.cpp:359this is not safe. The torrent could be unloaded while we're still sending the metadata
relevance 0../src/packet_buffer.cpp:176use compare_less_wrap for this comparison as well
relevance 0../src/packet_buffer.cpp:176use compare_less_wrap for this comparison as well
relevance 0../src/part_file.cpp:252what do we do if someone is currently reading from the disk from this piece? does it matter? Since we won't actively erase the data from disk, but it may be overwritten soon, it's probably not that big of a deal
relevance 0../src/part_file.cpp:252what do we do if someone is currently reading from the disk from this piece? does it matter? Since we won't actively erase the data from disk, but it may be overwritten soon, it's probably not that big of a deal
relevance 0../src/part_file.cpp:344instead of rebuilding the whole file header and flushing it, update the slot entries as we go
relevance 0../src/peer_connection.cpp:1022this should be the global download rate
relevance 0../src/peer_connection.cpp:1022this should be the global download rate
relevance 0../src/peer_connection.cpp:3229sort the allowed fast set in priority order
relevance 0../src/peer_connection.cpp:3229sort the allowed fast set in priority order
relevance 0../src/peer_connection.cpp:5891The stats checks can not be honored when authenticated encryption is in use because we may have encrypted data which we cannot authenticate yet
relevance 0../src/peer_connection.cpp:5891The stats checks can not be honored when authenticated encryption is in use because we may have encrypted data which we cannot authenticate yet
relevance 0../src/piece_picker.cpp:2407when expanding pieces for cache stripe reasons, the !downloading condition doesn't make much sense
relevance 0../src/piece_picker.cpp:2407when expanding pieces for cache stripe reasons, the !downloading condition doesn't make much sense
relevance 0../src/session_impl.cpp:508there's no rule here to make uTP connections not have the global or local rate limits apply to it. This used to be the default.
relevance 0../src/session_impl.cpp:507there's no rule here to make uTP connections not have the global or local rate limits apply to it. This used to be the default.
relevance 0../src/session_impl.cpp:1721instead of having a special case for this, just make the default listen interfaces be "0.0.0.0:6881,[::1]:6881" and use the generic path. That would even allow for not listening at all.
relevance 0../src/session_impl.cpp:1721instead of having a special case for this, just make the default listen interfaces be "0.0.0.0:6881,[::1]:6881" and use the generic path. That would even allow for not listening at all.
relevance 0../src/session_impl.cpp:2584should this function take a shared_ptr instead?
relevance 0../src/session_impl.cpp:2607should this function take a shared_ptr instead?
relevance 0../src/session_impl.cpp:2948have a separate list for these connections, instead of having to loop through all of them
relevance 0../src/session_impl.cpp:2971have a separate list for these connections, instead of having to loop through all of them
relevance 0../src/session_impl.cpp:2989this should apply to all bandwidth channels
relevance 0../src/session_impl.cpp:3012this should apply to all bandwidth channels
relevance 0../src/session_impl.cpp:3477these vectors could be copied from m_torrent_lists, if we would maintain them. That way the first pass over all torrents could be avoided. It would be especially efficient if most torrents are not auto-managed whenever we receive a scrape response (or anything that may change the rank of a torrent) that one torrent could re-sort itself in a list that's kept sorted at all times. That way, this pass over all torrents could be avoided alltogether.
relevance 0../src/session_impl.cpp:3500these vectors could be copied from m_torrent_lists, if we would maintain them. That way the first pass over all torrents could be avoided. It would be especially efficient if most torrents are not auto-managed whenever we receive a scrape response (or anything that may change the rank of a torrent) that one torrent could re-sort itself in a list that's kept sorted at all times. That way, this pass over all torrents could be avoided alltogether.
relevance 0../src/session_impl.cpp:3577allow extensions to sort torrents for queuing
relevance 0../src/session_impl.cpp:3750use a lower limit than m_settings.connections_limit to allocate the to 10% or so of connection slots for incoming connections
relevance 0../src/session_impl.cpp:3893post a message to have this happen immediately instead of waiting for the next tick
relevance 0../src/session_impl.cpp:3912this should be called for all peers!
relevance 0../src/session_impl.cpp:3940this should be called for all peers!
relevance 0../src/session_impl.cpp:4304it might be a nice feature here to limit the number of torrents to send in a single update. By just posting the first n torrents, they would nicely be round-robined because the torrent lists are always pushed back
relevance 0../src/session_impl.cpp:4332it might be a nice feature here to limit the number of torrents to send in a single update. By just posting the first n torrents, they would nicely be round-robined because the torrent lists are always pushed back
relevance 0../src/storage.cpp:719make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance maybe use the same format as .torrent files and reuse some code from torrent_info
relevance 0../src/storage.cpp:1027if everything moves OK, except for the partfile we currently won't update the save path, which breaks things. it would probably make more sense to give up on the partfile
relevance 0../src/storage.cpp:1015if everything moves OK, except for the partfile we currently won't update the save path, which breaks things. it would probably make more sense to give up on the partfile
relevance 0../src/torrent.cpp:507if the existing torrent doesn't have metadata, insert the metadata we just downloaded into it.
relevance 0../src/torrent.cpp:507if the existing torrent doesn't have metadata, insert the metadata we just downloaded into it.
relevance 0../src/torrent.cpp:658if the existing torrent doesn't have metadata, insert the metadata we just downloaded into it.
relevance 0../src/torrent.cpp:658if the existing torrent doesn't have metadata, insert the metadata we just downloaded into it.
relevance 0../src/torrent.cpp:1460is verify_peer_cert called once per certificate in the chain, and this function just tells us which depth we're at right now? If so, the comment makes sense. any certificate that isn't the leaf (i.e. the one presented by the peer) should be accepted automatically, given preverified is true. The leaf certificate need to be verified to make sure its DN matches the info-hash
relevance 0../src/torrent.cpp:1460is verify_peer_cert called once per certificate in the chain, and this function just tells us which depth we're at right now? If so, the comment makes sense. any certificate that isn't the leaf (i.e. the one presented by the peer) should be accepted automatically, given preverified is true. The leaf certificate need to be verified to make sure its DN matches the info-hash
relevance 0../src/torrent.cpp:1864instead of creating the picker up front here, maybe this whole section should move to need_picker()
relevance 0../src/torrent.cpp:1864instead of creating the picker up front here, maybe this whole section should move to need_picker()
relevance 0../src/torrent.cpp:2060there may be peer extensions relying on the torrent extension still being alive. Only do this if there are no peers. And when the last peer is disconnected, if the torrent is unloaded, clear the extensions m_extensions.clear();
relevance 0../src/torrent.cpp:2060there may be peer extensions relying on the torrent extension still being alive. Only do this if there are no peers. And when the last peer is disconnected, if the torrent is unloaded, clear the extensions m_extensions.clear();
relevance 0../src/torrent.cpp:2735this pattern is repeated in a few places. Factor this into a function and generalize the concept of a torrent having a dedicated listen port
relevance 0../src/torrent.cpp:3508add one peer per IP the hostname resolves to
relevance 0../src/torrent.cpp:3508add one peer per IP the hostname resolves to
relevance 0../src/torrent.cpp:4499update suggest_piece?
relevance 0../src/torrent.cpp:4642really, we should just keep the picker around in this case to maintain the availability counters
relevance 0../src/torrent.cpp:6614make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance maybe use the same format as .torrent files and reuse some code from torrent_info The mapped_files needs to be read both in the network thread and in the disk thread, since they both have their own mapped files structures which are kept in sync
relevance 0../src/torrent.cpp:6614make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance maybe use the same format as .torrent files and reuse some code from torrent_info The mapped_files needs to be read both in the network thread and in the disk thread, since they both have their own mapped files structures which are kept in sync
relevance 0../src/torrent.cpp:6732if this is a merkle torrent and we can't restore the tree, we need to wipe all the bits in the have array, but not necessarily we might want to do a full check to see if we have all the pieces. This is low priority since almost no one uses merkle torrents
relevance 0../src/torrent.cpp:6922make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance. using file_base
relevance 0../src/torrent.cpp:6922make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance. using file_base
relevance 0../src/torrent.cpp:8924add a flag to ignore stats, and only care about resume data for content. For unchanged files, don't trigger a load of the metadata just to save an empty resume data file
relevance 0../src/torrent.cpp:9886go through the pieces we have and count the total number of downloaders we have. Only count peers that are interested in us since some peers might not send have messages for pieces we have it num_interested == 0, we need to pick a new piece
relevance 0../src/torrent.cpp:9886go through the pieces we have and count the total number of downloaders we have. Only count peers that are interested in us since some peers might not send have messages for pieces we have it num_interested == 0, we need to pick a new piece
relevance 0../src/torrent.cpp:10532instead of resorting the whole list, insert the peers directly into the right place
relevance 0../src/torrent.cpp:10532instead of resorting the whole list, insert the peers directly into the right place
relevance 0../src/torrent_peer.cpp:176how do we deal with our external address changing?
relevance 0../src/udp_socket.cpp:286it would be nice to detect this on posix systems also
relevance 0../src/udp_socket.cpp:777use the system resolver_interface here
relevance 0../src/udp_socket.cpp:777use the system resolver_interface here
relevance 0../src/upnp.cpp:71listen_interface is not used. It's meant to bind the broadcast socket
relevance 0../src/upnp.cpp:71listen_interface is not used. It's meant to bind the broadcast socket
relevance 0../src/ut_metadata.cpp:316we really need to increment the refcounter on the torrent while this buffer is still in the peer's send buffer
relevance 0../src/ut_metadata.cpp:316we really need to increment the refcounter on the torrent while this buffer is still in the peer's send buffer
relevance 0../src/utp_stream.cpp:1628this loop may not be very efficient
relevance 0../src/utp_stream.cpp:1644this loop may not be very efficient
relevance 0../src/web_connection_base.cpp:73introduce a web-seed default class which has a low download priority
relevance 0../src/web_connection_base.cpp:73introduce a web-seed default class which has a low download priority
relevance 0../src/kademlia/dht_tracker.cpp:430ideally this function would be called when the put completes
relevance 0../src/kademlia/dht_tracker.cpp:437ideally this function would be called when the put completes
relevance 0../include/libtorrent/bitfield.hpp:158rename to data() ?
relevance 0../include/libtorrent/block_cache.hpp:218make this 32 bits and to count seconds since the block cache was created
relevance 0../include/libtorrent/config.hpp:334Make this count Unicode characters instead of bytes on windows
relevance 0../include/libtorrent/disk_buffer_pool.hpp:128try to remove the observers, only using the async_allocate handlers
relevance 0../include/libtorrent/file.hpp:169move this into a separate header file, TU pair
relevance 0../include/libtorrent/peer_connection.hpp:206make this a raw pointer (to save size in the first cache line) and make the constructor take a raw pointer. torrent objects should always outlive their peers
relevance 0../include/libtorrent/peer_connection.hpp:1059factor this out into its own class with a virtual interface torrent and session should implement this interface
relevance 0../include/libtorrent/peer_connection.hpp:1059factor this out into its own class with a virtual interface torrent and session should implement this interface
relevance 0../include/libtorrent/peer_connection_interface.hpp:45make this interface smaller!
relevance 0../include/libtorrent/peer_connection_interface.hpp:45make this interface smaller!
relevance 0../include/libtorrent/performance_counters.hpp:132should keepalives be in here too? how about dont-have, share-mode, upload-only
relevance 0../include/libtorrent/performance_counters.hpp:132should keepalives be in here too? how about dont-have, share-mode, upload-only
relevance 0../include/libtorrent/performance_counters.hpp:429some space could be saved here by making gauges 32 bits
relevance 0../include/libtorrent/performance_counters.hpp:430restore these to regular integers. Instead have one copy of the counters per thread and collect them at convenient synchronization points
relevance 0../include/libtorrent/performance_counters.hpp:439some space could be saved here by making gauges 32 bits
relevance 0../include/libtorrent/performance_counters.hpp:440restore these to regular integers. Instead have one copy of the counters per thread and collect them at convenient synchronization points
relevance 0../include/libtorrent/piece_picker.hpp:668should this be allocated lazily?
relevance 0../include/libtorrent/piece_picker.hpp:668should this be allocated lazily?
relevance 0../include/libtorrent/proxy_base.hpp:171it would be nice to remember the bind port and bind once we know where the proxy is m_sock.bind(endpoint, ec);
relevance 0../include/libtorrent/proxy_base.hpp:171it would be nice to remember the bind port and bind once we know where the proxy is m_sock.bind(endpoint, ec);
relevance 0../include/libtorrent/receive_buffer.hpp:260Detect when the start of the next crpyto packet is aligned with the start of piece data and the crpyto packet is at least as large as the piece data. With a little extra work we could receive directly into a disk buffer in that case.
relevance 0../include/libtorrent/receive_buffer.hpp:255Detect when the start of the next crpyto packet is aligned with the start of piece data and the crpyto packet is at least as large as the piece data. With a little extra work we could receive directly into a disk buffer in that case.
relevance 0../include/libtorrent/session.hpp:851add get_peer_class_type_filter() as well
relevance 0../include/libtorrent/session.hpp:856add get_peer_class_type_filter() as well
relevance 0../include/libtorrent/settings_pack.hpp:1106deprecate this ``max_rejects`` is the number of piece requests we will reject in a row while a peer is choked before the peer is considered abusive and is disconnected.
relevance 0../include/libtorrent/settings_pack.hpp:1104deprecate this ``max_rejects`` is the number of piece requests we will reject in a row while a peer is choked before the peer is considered abusive and is disconnected.
relevance 0../include/libtorrent/torrent.hpp:1254this wastes 5 bits per file
relevance 0../include/libtorrent/torrent.hpp:1254this wastes 5 bits per file
relevance 0../include/libtorrent/torrent.hpp:1313These two bitfields should probably be coalesced into one
relevance 0../include/libtorrent/torrent.hpp:1313These two bitfields should probably be coalesced into one
relevance 0../include/libtorrent/torrent_info.hpp:123include the number of peers received from this tracker, at last announce
relevance 0../include/libtorrent/torrent_info.hpp:123include the number of peers received from this tracker, at last announce
relevance 0../include/libtorrent/torrent_info.hpp:270there may be some opportunities to optimize the size if torrent_info. specifically to turn some std::string and std::vector into pointers
relevance 0../include/libtorrent/upnp.hpp:108support using the windows API for UPnP operations as well
relevance 0../include/libtorrent/upnp.hpp:108support using the windows API for UPnP operations as well
relevance 0../include/libtorrent/utp_stream.hpp:395implement blocking write. Low priority since it's not used (yet)
relevance 0../include/libtorrent/utp_stream.hpp:395implement blocking write. Low priority since it's not used (yet)
relevance 0../include/libtorrent/kademlia/item.hpp:61since this is a public function, it should probably be moved out of this header and into one with other public functions.
relevance 0../include/libtorrent/kademlia/item.hpp:61since this is a public function, it should probably be moved out of this header and into one with other public functions.
relevance 0../include/libtorrent/aux_/session_impl.hpp:367move the login info into the tracker_request object
relevance 0../include/libtorrent/aux_/session_impl.hpp:367move the login info into the tracker_request object
relevance 0../include/libtorrent/aux_/session_impl.hpp:830should this be renamed m_outgoing_interfaces?
relevance 0../include/libtorrent/aux_/session_impl.hpp:833should this be renamed m_outgoing_interfaces?
relevance 0../include/libtorrent/aux_/session_impl.hpp:884replace this by a proper asio timer
relevance 0../include/libtorrent/aux_/session_impl.hpp:884replace this by a proper asio timer
relevance 0../include/libtorrent/aux_/session_impl.hpp:889replace this by a proper asio timer
relevance 0../include/libtorrent/aux_/session_impl.hpp:889replace this by a proper asio timer
relevance 0../include/libtorrent/aux_/session_impl.hpp:896replace this by a proper asio timer
relevance 0../include/libtorrent/aux_/session_impl.hpp:896replace this by a proper asio timer
relevance 0../include/libtorrent/aux_/session_interface.hpp:199it would be nice to not have this be part of session_interface
relevance 0../include/libtorrent/aux_/session_interface.hpp:199it would be nice to not have this be part of session_interface