Am 19.12.2012 17:33, schrieb Christoph Viebig: > Dear Saros Community, > > in our university course about software processes at Freie Universität > Berlin we are now working on Goal Question Metrics (GQM). > > As part of our exercise course we have to elaborate a study on GQM in an > open source project which we would like to conduct at the Saros > project. Therefore we have written down some ideas. > > GQM is a software metric model and therefore aims to measure metrics of > software processes and products to allow comparison and evaluation of > such. As a result either changes can be suggested or current procedure > can be confirmed. > > Our first idea regards the continuous integration service. As far as we > know GUI Tests with STF are only run nightly on the master branch. All > other JUnit Tests are run on any patch set submitted to code review. > This might result in Gerrit patch sets passing regular JUnit tests and > therefore get marked as verified by Jenkins CI although they break STF > test cases. Hence the first goal is to analyze the schedule and results > of automated test runs. > > Goal: Analyze schedule and results of automated test runs > Object of study: Unit- and STF-Test-Results of all (accepted) patch sets > Focus: Number of broken test cases in all (accepted) patch sets > Stakeholder: Saros developers > > Questions to answer for this goal: > - Is the current schedule of automated test runs adequate? > - For which patch sets or branches and at which time are test runs > useful? > > Our second goal targets Saros code quality and is a very general one. > > Goal: Improve code quality > Object of study: Saros source code > Focus: Code complexity > Stakeholder: Saros developers > > Questions to answer for this goal: > - Is it possible to improve code quality and reduce code complexity? > - Is it possible to improve the maintainability of the source code?
Well just look at the network layer (I bet that you want to touch any line :P) Completly overoptimized ... it is so overoptimized that it is to dumb to detect broken network connections. Concurrent connecting (Alice connects to Bob in the same time as Bob connects to Alice) results in a non defined state. Network traffic is send over multiple interfaces (as Message or via IBB or Socks5 Mediated) depending on the size on the packet. Result: about 1000 lines of code only to reimplement a "TCP" Layer. See ActivitySequencer class. And not taken into account that a direct Socks5 connection with 80 KB/s upload (ADSL6000) is not faster than a Socks5 Mediatited connection where the proxy also offers 80 KB/s througput. "Benefit:" Others may see that you have changed your actual color a few seconds earlier, as there are only a few activities that can be executed out of order from the actual activity sequence chain. Two methods of creating packet extensions. Someone had added the XStreamExtensionProvider class to easen the creation of packet extensions but never updated existing packet extensions to use the new provider. The network layer is doing business logic (e.g adding or removing a user from a session or just stop the session) The ITransmitter interface offers methods to receive data ... The flow on how activities are dispatched is somewhat (unecessary complex). If you think a BinaryChannel class has its own receiver thread that pushes incoming packets to a dispatcher you are wrong, so here is the actual receive dispatch flow: The BinaryChannelConnection class currently has the receiver thread which calls BinaryChannel.receiveIncomingTransferObject . The method does not even return actual data. It returns when a new (possible fragmented) packet had arrived. The BinaryChannelConnection now passes this object to its installed listener which is always the DataTransferManager. The DataTransferManager then calls: // ask upper layer to accept dispatchThreadContext.executeAsDispatch(new Runnable() { public void run() { receiver.processIncomingTransferObject(description, transferObjectData); } }); Passing the transferObject do the XMPPReceiver. The XMPPReceiver now calls: extensionDownloadThreadPool.execute(Utils.wrapSafe(log, new Runnable() { public void run() { processTransferObjectToPacket(description, incomingTransferObject); } })); Which calls: protected void processTransferObjectToPacket( TransferDescription description, IncomingTransferObject transferObject) { .... wait until the packet is fully transmitted then extract data etc. pp dispatchThreadContext.executeAsDispatch(new Runnable() { public void run() { processPacket(packet); } }); Which will finally dispatch the packet to the ActivitiesHandler (that passes the activites to the ActivitySequences which will pass the activites to the current Saros session) because it had registered a packet listener to the XMMPReceiver. Instead of two threads (receiver + dispatcher) we have three threads. receiver -> dispatcher -> decoder -> dispatcher If you ask why: well, the project archive was send over this Binary Channel too. Thats the only reason we needed a third thread. Classical architecture WTF. Extend a API to handle a specific case instead of using the actual API to solve the problem (pre splitting the project into chunks and reassemble them in the right place). If you have to much time, you can compare the Saros Network Layer with the Saros Light Network Layer http://dpp.git.sourceforge.net/git/gitweb.cgi?p=dpp/saros;a=tree;f=de.fu_berlin.inf.dpp/src/de/fu_berlin/inf/dpp/net;h=c2046f19cabf60b42528d51670316d80a3c833a1;hb=HEAD http://dpp.git.sourceforge.net/git/gitweb.cgi?p=dpp/saros-light;a=tree;f=de.fu_berlin.inf.dpp/src/de/fu_berlin/inf/dpp/net;h=b20d776904f172688eb3024843eca021d104f17f;hb=HEAD BR, Stefan > As this is still a draft we would like to ask if you have comments on > the proposed goals and questions. We are not familiar with Saros for a > long time yet so it might happen that some of our goals or questions are > not very useful to be asked. Please tell us! Are there any which would > be more important to the project? > > To further investigate possible metrics to answer our questions > regarding CI test workloads we have setup an instance of Jenkins. We are > now at the point where we have to configure Jenkins to run JUnit and > STF-Tests on specific branches of our Saros repository. > What actions are needed to configure this? Can you give us the > configuration you use? Would it be possible to run STF-Tests without > Jenkins, i.e. from the Shell as well? > > Thank you very much in advance! > > Best regards > Thomas Benndorf and Christoph Viebig > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > DPP-Devel mailing list > DPP-Devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/dpp-devel ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ DPP-Devel mailing list DPP-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dpp-devel