Remove grouping separator in Network.xml (yacystats will woork without it) and format a few more numbers.

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4163 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
fuchsi 17 years ago
parent 06e6a1ff62
commit 3352474dd8

@ -175,16 +175,16 @@ public class Network {
// overall results: Network statistics
if (iAmActive) conCount++; else if (mySeedType.equals(yacySeed.PEERTYPE_JUNIOR)) potCount++;
prop.put("table_active-count", conCount);
prop.put("table_active-count", yFormatter.number(conCount));
prop.put("table_active-links", yFormatter.number(accActLinks));
prop.put("table_active-words", yFormatter.number(accActWords));
prop.put("table_passive-count", disconCount);
prop.put("table_passive-count", yFormatter.number(disconCount));
prop.put("table_passive-links", yFormatter.number(accPassLinks));
prop.put("table_passive-words", yFormatter.number(accPassWords));
prop.put("table_potential-count", potCount);
prop.put("table_potential-count", yFormatter.number(potCount));
prop.put("table_potential-links", yFormatter.number(accPotLinks));
prop.put("table_potential-words", yFormatter.number(accPotWords));
prop.put("table_all-count", (conCount + disconCount + potCount));
prop.put("table_all-count", yFormatter.number(conCount + disconCount + potCount));
prop.put("table_all-links", yFormatter.number(accActLinks + accPassLinks + accPotLinks));
prop.put("table_all-words", yFormatter.number(accActWords + accPassWords + accPotWords));

@ -341,16 +341,16 @@ public class Status {
prop.put("loaderQueueMax", Integer.toString(loaderMaxCount));
prop.put("loaderQueuePercent", (loaderPercent>100)?"100":Integer.toString(loaderPercent));
prop.put("localCrawlQueueSize", Integer.toString(sb.getThread(plasmaSwitchboard.CRAWLJOB_LOCAL_CRAWL).getJobCount()));
prop.put("localCrawlQueueSize", yFormatter.number(sb.getThread(plasmaSwitchboard.CRAWLJOB_LOCAL_CRAWL).getJobCount()));
prop.put("localCrawlPaused",sb.crawlJobIsPaused(plasmaSwitchboard.CRAWLJOB_LOCAL_CRAWL)?1:0);
prop.put("remoteTriggeredCrawlQueueSize", Integer.toString(sb.getThread(plasmaSwitchboard.CRAWLJOB_REMOTE_TRIGGERED_CRAWL).getJobCount()));
prop.put("remoteTriggeredCrawlQueueSize", yFormatter.number(sb.getThread(plasmaSwitchboard.CRAWLJOB_REMOTE_TRIGGERED_CRAWL).getJobCount()));
prop.put("remoteTriggeredCrawlPaused",sb.crawlJobIsPaused(plasmaSwitchboard.CRAWLJOB_REMOTE_TRIGGERED_CRAWL)?1:0);
prop.put("globalCrawlTriggerQueueSize", Integer.toString(sb.getThread(plasmaSwitchboard.CRAWLJOB_GLOBAL_CRAWL_TRIGGER).getJobCount()));
prop.put("globalCrawlTriggerQueueSize", yFormatter.number(sb.getThread(plasmaSwitchboard.CRAWLJOB_GLOBAL_CRAWL_TRIGGER).getJobCount()));
prop.put("globalCrawlTriggerPaused",sb.crawlJobIsPaused(plasmaSwitchboard.CRAWLJOB_GLOBAL_CRAWL_TRIGGER)?1:0);
prop.put("stackCrawlQueueSize", Integer.toString(sb.sbStackCrawlThread.size()));
prop.put("stackCrawlQueueSize", yFormatter.number(sb.sbStackCrawlThread.size()));
// return rewrite properties
prop.put("date",(new Date()).toString());

@ -70,12 +70,9 @@ public final class yFormatter {
public static void setLocale(String lang) {
String l = (lang.equalsIgnoreCase("default") ? "en" : lang.toLowerCase());
if (l.equals("none")) {
// TODO fix the following without breaking yacystats and similar.
// special format for backwards compatibility in .xml files
// #.###.## (dots for grouping + decimal separator)
DecimalFormatSymbols dfs = new DecimalFormatSymbols(Locale.ENGLISH);
dfs.setGroupingSeparator('.');
numForm = new DecimalFormat("#,###.##", dfs);
dfs.setGroupingSeparator('.'); // not used
numForm = new DecimalFormat("####.##", dfs);
} else {
setLocale(new Locale(l));
initDefaults();

Loading…
Cancel
Save