Skip to content

Average bandwidth not being calculated correctly inside 'fetchMountInfo'

Inside OStoreDB::fetchMountInfo (see link), we have:

tmdi.existingOrNextMounts.back().averageBandwidth = driveState.filesTransferedInSession.value() / driveState.sessionElapsedTime.value();

This is obviously wrong (using number of files instead of byte count), and should be:

tmdi.existingOrNextMounts.back().averageBandwidth = driveState.bytesTransferedInSession.value() / driveState.sessionElapsedTime.value();

This may be the reason for the bug reported in the CTA Community post: https://cta-community.web.cern.ch/t/bandwidth-not-showing-in-cta-sq-and-cta-json-dr-ls/200

Edited by Joao Afonso