120 code, 160 comments (shendaras)
This commit is contained in:
@ -97,8 +97,8 @@ public class ClientConfig {
|
|||||||
* @param comment describe this test
|
* @param comment describe this test
|
||||||
* @param averagePeriods list of minutes to summarize over
|
* @param averagePeriods list of minutes to summarize over
|
||||||
*/
|
*/
|
||||||
public ClientConfig(Destination peer, Destination us, String statFile, int duration, int statFreq, int sendFreq, int sendSize, int numHops, String comment,
|
public ClientConfig(Destination peer, Destination us, String statFile, int duration, int statFreq, int sendFreq,
|
||||||
int averagePeriods[]) {
|
int sendSize, int numHops, String comment, int averagePeriods[]) {
|
||||||
_peer = peer;
|
_peer = peer;
|
||||||
_us = us;
|
_us = us;
|
||||||
_statFile = statFile;
|
_statFile = statFile;
|
||||||
@ -310,8 +310,8 @@ public class ClientConfig {
|
|||||||
String commentVal = clientConfig.getProperty(PROP_PREFIX + peerNum + PROP_COMMENT);
|
String commentVal = clientConfig.getProperty(PROP_PREFIX + peerNum + PROP_COMMENT);
|
||||||
String periodsVal = clientConfig.getProperty(PROP_PREFIX + peerNum + PROP_AVERAGEPERIODS);
|
String periodsVal = clientConfig.getProperty(PROP_PREFIX + peerNum + PROP_AVERAGEPERIODS);
|
||||||
|
|
||||||
if ((peerVal == null) || (statFileVal == null) || (statDurationVal == null) || (statFrequencyVal == null) || (sendFrequencyVal == null)
|
if ((peerVal == null) || (statFileVal == null) || (statDurationVal == null) || (statFrequencyVal == null)
|
||||||
|| (sendSizeVal == null)) {
|
|| (sendFrequencyVal == null) || (sendSizeVal == null)) {
|
||||||
if (_log.shouldLog(Log.DEBUG)) {
|
if (_log.shouldLog(Log.DEBUG)) {
|
||||||
_log.debug("Peer number " + peerNum + " does not exist");
|
_log.debug("Peer number " + peerNum + " does not exist");
|
||||||
}
|
}
|
||||||
@ -326,8 +326,9 @@ public class ClientConfig {
|
|||||||
|
|
||||||
if ((duration <= 0) || (statFreq <= 0) || (sendFreq <= 0) || (sendSize <= 0)) {
|
if ((duration <= 0) || (statFreq <= 0) || (sendFreq <= 0) || (sendSize <= 0)) {
|
||||||
if (_log.shouldLog(Log.WARN)) {
|
if (_log.shouldLog(Log.WARN)) {
|
||||||
_log.warn("Invalid client config: duration [" + statDurationVal + "] stat frequency [" + statFrequencyVal + "] send frequency ["
|
_log.warn("Invalid client config: duration [" + statDurationVal + "] stat frequency ["
|
||||||
+ sendFrequencyVal + "] send size [" + sendSizeVal + "]");
|
+ statFrequencyVal + "] send frequency [" + sendFrequencyVal + "] send size ["
|
||||||
|
+ sendSizeVal + "]");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -389,7 +390,8 @@ public class ClientConfig {
|
|||||||
* @return true if it was stored correctly, false if there were errors
|
* @return true if it was stored correctly, false if there were errors
|
||||||
*/
|
*/
|
||||||
public boolean store(Properties clientConfig, int peerNum) {
|
public boolean store(Properties clientConfig, int peerNum) {
|
||||||
if ((_peer == null) || (_sendFrequency <= 0) || (_sendSize <= 0) || (_statDuration <= 0) || (_statFrequency <= 0) || (_statFile == null)) { return false; }
|
if ((_peer == null) || (_sendFrequency <= 0) || (_sendSize <= 0) || (_statDuration <= 0)
|
||||||
|
|| (_statFrequency <= 0) || (_statFile == null)) { return false; }
|
||||||
|
|
||||||
String comment = _comment;
|
String comment = _comment;
|
||||||
if (comment == null) {
|
if (comment == null) {
|
||||||
|
Reference in New Issue
Block a user