Tatsuhiro Tsujikawa
6ee913b0bc
Simplified PieceStatMan and RarestPieceSelector.
...
Simplified PieceStatMan and RarestPieceSelector, but computation order
to select piece index is still O(N) and unchanged. Updating piece
stat is improved to O(N) for bitfield update and O(1) for single
index update, while old implementation needs O(NlogN) and O(N)
respectively.
2011-08-10 21:29:01 +09:00
Tatsuhiro Tsujikawa
9103fb6105
Refactored PieceStatMan::updatePieceStats().
2010-12-07 01:08:11 +09:00
Tatsuhiro Tsujikawa
1372ac51ad
2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added .cc file for classes/structs that only provided by header
file. Defined non-POD classes' ctor, dtor in .cc file. Moved
implementation code in header file to .cc file for major
classes/strucsts.
2010-11-14 07:17:55 +00:00
Tatsuhiro Tsujikawa
bc98e39fe5
2010-11-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
To match the behavior of friend operator functions in
SharedHandle.h to std::tr1::shared_ptr, we intentionally broke
these functions and modified code so that our code does not depend
on old behavior.
* src/AbstractCommand.cc
* src/DHTAbstractNodeLookupTask.h
* src/DHTBucket.cc
* src/DHTMessageReceiver.cc
* src/DHTNodeLookupEntry.cc
* src/DHTRoutingTable.cc
* src/DefaultBtRequestFactory.cc
* src/DefaultPeerStorage.cc
* src/DefaultPieceStorage.cc
* src/DownloadContext.cc
* src/EpollEventPoll.cc
* src/Event.h
* src/HttpConnection.cc
* src/KqueueEventPoll.cc
* src/MultiDiskAdaptor.cc
* src/PeerAbstractCommand.cc
* src/PieceStatMan.cc
* src/PollEventPoll.cc
* src/PortEventPoll.cc
* src/SegmentMan.cc
* src/SelectEventPoll.cc
* src/SelectEventPoll.h
* src/ServerStatMan.cc
* src/SharedHandle.h
* src/UnknownLengthPieceStorage.cc
* src/a2functional.h
* src/option_processing.cc
* src/version_usage.cc
* test/BNodeTest.cc
* test/DHTAnnouncePeerMessageTest.cc
* test/DHTBucketTest.cc
* test/DHTFindNodeMessageTest.cc
* test/DHTGetPeersMessageTest.cc
* test/DHTIDCloserTest.cc
* test/DHTMessageFactoryImplTest.cc
* test/DHTPingMessageTest.cc
* test/DefaultBtRequestFactoryTest.cc
* test/DefaultPeerStorageTest.cc
* test/SequentialPickerTest.cc
* test/SingletonHolderTest.cc
2010-11-11 07:33:43 +00:00
Tatsuhiro Tsujikawa
6ecfa4aad1
2010-10-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added '// namespace' after end of unnamed namespace.
* src/AbstractCommand.cc
* src/AnnounceList.cc
* src/BtSeederStateChoke.cc
* src/ConsoleStatCalc.cc
* src/CookieStorage.cc
* src/DHTBucket.cc
* src/DHTPeerAnnounceEntry.cc
* src/DHTPeerAnnounceStorage.cc
* src/DHTTaskQueueImpl.cc
* src/DefaultBtMessageDispatcher.cc
* src/DefaultBtRequestFactory.cc
* src/DefaultPeerStorage.cc
* src/DefaultPieceStorage.cc
* src/ExpatMetalinkProcessor.cc
* src/ExpatXmlRpcRequestProcessor.cc
* src/FeedbackURISelector.cc
* src/FileEntry.cc
* src/GZipEncoder.cc
* src/Metalink2RequestGroup.cc
* src/MetalinkEntry.cc
* src/MetalinkParserStateV3Impl.cc
* src/MetalinkParserStateV4Impl.cc
* src/Metalinker.cc
* src/MultiDiskAdaptor.cc
* src/Netrc.cc
* src/NsCookieParser.cc
* src/OptionParser.cc
* src/PieceStatMan.cc
* src/RarestPieceSelector.cc
* src/RequestGroupMan.cc
* src/SegmentMan.cc
* src/ServerStatMan.cc
* src/SocketCore.cc
* src/XML2SAXMetalinkProcessor.cc
* src/Xml2XmlRpcRequestProcessor.cc
* src/XmlRpcMethodImpl.cc
* src/cookie_helper.cc
* src/download_helper.cc
* src/messageDigest.cc
* src/util.cc
2010-10-30 14:53:40 +00:00
Tatsuhiro Tsujikawa
94482144f2
2010-08-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Enclosed classes and structs declared in *.cc files unnamed
namespace. Added static keyword for function template in *.cc
files(TODO we should use unnamed namespace instead of static).
* src/AbstractCommand.cc
* src/AnnounceList.cc
* src/BtLeecherStateChoke.cc
* src/BtLeecherStateChoke.h
* src/BtSeederStateChoke.cc
* src/BtSeederStateChoke.h
* src/ConsoleStatCalc.cc
* src/ContentTypeRequestGroupCriteria.cc
* src/CookieStorage.cc
* src/DHTBucket.cc
* src/DHTPeerAnnounceEntry.cc
* src/DHTPeerAnnounceStorage.cc
* src/DefaultBtMessageDispatcher.cc
* src/DefaultBtRequestFactory.cc
* src/DefaultPeerStorage.cc
* src/DefaultPieceStorage.cc
* src/ExpatMetalinkProcessor.cc
* src/ExpatXmlRpcRequestProcessor.cc
* src/FeedbackURISelector.cc
* src/FileEntry.cc
* src/Metalink2RequestGroup.cc
* src/MetalinkEntry.cc
* src/Metalinker.cc
* src/MultiDiskAdaptor.cc
* src/Netrc.cc
* src/OptionParser.cc
* src/PieceStatMan.cc
* src/RarestPieceSelector.cc
* src/RequestGroupMan.cc
* src/SegmentMan.cc
* src/ServerStatMan.cc
* src/XML2SAXMetalinkProcessor.cc
* src/Xml2XmlRpcRequestProcessor.cc
* src/XmlRpcResponse.cc
* src/a2algo.h
* src/download_helper.cc
2010-08-31 13:33:05 +00:00
Tatsuhiro Tsujikawa
ca4940622c
2010-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Changed naming standards for class member variable: now it looks
like var_ instead of _var.
2010-06-21 13:51:56 +00:00
Tatsuhiro Tsujikawa
8477e463e9
2010-03-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Simplified code using lastByteMask
* src/BitfieldMan.cc
* src/PieceStatMan.cc
2010-03-24 14:25:18 +00:00
Tatsuhiro Tsujikawa
72e475dfde
2010-03-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Avoid to calculate end() iterator in each loop. std::deque is
particularly slow. Make sure that recalculate end iterator if
element is erased during loop.
2010-02-28 16:04:52 +00:00
Tatsuhiro Tsujikawa
4db349c1f3
2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Untabify. Fixed one line in copyright which is longer than 80
columns.
* src
* test
2010-01-05 16:01:46 +00:00
Tatsuhiro Tsujikawa
8b6da1ee36
2009-05-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Implemented getter methods in header files to give them more
chance of optimization.
Return const reference for SharadHandle if possible.
* src/AbstractAuthResolver.cc
* src/AbstractAuthResolver.h
* src/AbstractBtMessage.cc
* src/AbstractBtMessage.h
* src/AbstractSingleDiskAdaptor.cc
* src/AbstractSingleDiskAdaptor.h
* src/AsyncNameResolver.cc
* src/AsyncNameResolver.h
* src/BNode.cc
* src/BNode.h
* src/BitfieldMan.cc
* src/BitfieldMan.h
* src/BtAbortOutstandingRequestEvent.h
* src/BtExtendedMessage.cc
* src/BtExtendedMessage.h
* src/BtSeederStateChoke.cc
* src/BtSeederStateChoke.h
* src/Cookie.cc
* src/Cookie.h
* src/DHTBucket.cc
* src/DHTBucket.h
* src/DHTConnectionImpl.cc
* src/DHTConnectionImpl.h
* src/DHTFindNodeReplyMessage.cc
* src/DHTFindNodeReplyMessage.h
* src/DHTGetPeersReplyMessage.cc
* src/DHTGetPeersReplyMessage.h
* src/DHTInteractionCommand.cc
* src/DHTMessage.cc
* src/DHTMessage.h
* src/DHTMessageDispatcherImpl.cc
* src/DHTMessageEntry.cc
* src/DHTMessageReceiver.cc
* src/DHTMessageReceiver.h
* src/DHTMessageTrackerEntry.cc
* src/DHTMessageTrackerEntry.h
* src/DHTPeerAnnounceEntry.cc
* src/DHTPeerAnnounceEntry.h
* src/DHTPeerLookupTask.cc
* src/DHTPeerLookupTask.h
* src/DHTRoutingTableDeserializer.cc
* src/DHTRoutingTableDeserializer.h
* src/DefaultBtAnnounce.cc
* src/DefaultBtAnnounce.h
* src/DefaultBtMessageDispatcher.cc
* src/DefaultBtMessageDispatcher.h
* src/DefaultBtRequestFactory.cc
* src/DefaultBtRequestFactory.h
* src/DiskAdaptor.cc
* src/DiskAdaptor.h
* src/DownloadContext.cc
* src/DownloadContext.h
* src/DownloadEngine.cc
* src/DownloadEngine.h
* src/EpollEventPoll.cc
* src/EpollEventPoll.h
* src/FtpConnection.cc
* src/FtpConnection.h
* src/HttpConnection.cc
* src/HttpConnection.h
* src/HttpHeader.cc
* src/HttpHeader.h
* src/HttpRequest.cc
* src/HttpRequest.h
* src/HttpResponse.cc
* src/HttpResponse.h
* src/LibsslTLSContext.cc
* src/LibsslTLSContext.h
* src/MSEHandshake.cc
* src/MSEHandshake.h
* src/MetalinkEntry.cc
* src/MetalinkEntry.h
* src/MetalinkParserController.cc
* src/MetalinkParserController.h
* src/MetalinkParserStateMachine.cc
* src/MetalinkParserStateMachine.h
* src/MultiDiskAdaptor.cc
* src/MultiDiskAdaptor.h
* src/NetrcAuthResolver.cc
* src/NetrcAuthResolver.h
* src/Peer.cc
* src/Peer.h
* src/PeerSessionResource.cc
* src/PeerSessionResource.h
* src/Piece.cc
* src/Piece.h
* src/PieceStatMan.cc
* src/PieceStatMan.h
* src/Request.cc
* src/Request.h
* src/RequestGroup.cc
* src/RequestGroup.h
* src/RequestGroupMan.cc
* src/RequestGroupMan.h
* src/RequestSlot.cc
* src/RequestSlot.h
* src/SegmentMan.cc
* src/SegmentMan.h
* src/SelectEventPoll.cc
* src/SelectEventPoll.h
* src/ServerStat.cc
* src/ServerStat.h
* src/Signature.cc
* src/Signature.h
* src/URIResult.cc
* src/URIResult.h
* src/UTPexExtensionMessage.cc
* src/UTPexExtensionMessage.h
2009-05-29 12:12:22 +00:00
Tatsuhiro Tsujikawa
4da631bef6
2009-05-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Moved piece statistics stuff to new PieceStatMan class.
Refactored PieceSelector interface.
* src/DefaultPieceStorage.cc
* src/DefaultPieceStorage.h
* src/LongestSequencePieceSelector.cc
* src/LongestSequencePieceSelector.h
* src/Makefile.am
* src/PieceSelector.h
* src/PieceStatMan.cc
* src/PieceStatMan.h
* src/RarestPieceSelector.cc
* src/RarestPieceSelector.h
* src/RequestGroup.cc
* test/DefaultPieceStorageTest.cc
* test/InOrderPieceSelector.h
* test/Makefile.am
* test/PieceStatManTest.cc
* test/RarestPieceSelectorTest.cc
2009-05-06 07:49:22 +00:00