Changeset a0b4b7db


Ignore:
Timestamp:
Nov 7, 2009 7:32:00 PM (11 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
f85d8f70
Parents:
827a92e
Message:
  • Console:
    • countries.txt: Convert to mixed case, include in update
    • netdb.jsp: Hide all routers by default, sort and tag country names
    • oldstats.jsp: Move to stats.jsp
    • profiles.jsp: Show new DBH times instead of counts
  • Profiles:
    • Track last good and bad lookup times and last good and bad store times, to prep for floodfill changes
    • Don't reset last-heard-about at router startup
  • Checklist and Android readme fixups
Files:
17 edited
1 moved

Legend:

Unmodified
Added
Removed
  • android/README.txt

    r827a92e ra0b4b7db  
    1 These instructions are for the 1.5 SDK.
     1These instructions are for the 1.5 Android SDK.
    22The build file is not compatible with the 1.1 SDK any more.
     31.6 and 2.0 SDKs are untested.
    34
    45#Unzip the android SDK in ../../
    56#So then the android tools will be in ../../android-sdk-linux_x86-1.5_r2/tools/
     7
     8# create a file local.properties with the following line:
     9# sdk-location=/path/to/your/android-sdk-linux_x86-1.5_r2
    610
    711#then build the android apk file:
  • apps/routerconsole/java/bmsg.sh

    r827a92e ra0b4b7db  
    2020export TZ=UTC
    2121
     22#
     23# generate strings/Countries.java from ../../../installer/resources/countries.txt
     24#
     25CFILE=../../../installer/resources/countries.txt
     26JFILE=build/Countries.java
     27if [ $CFILE -nt $JFILE -o ! -s $JFILE ]
     28then
     29        mkdir -p build
     30        echo '// Automatically generated pseudo-java for xgettext - do not edit' > $JFILE
     31        echo '// Translators may wish to translate a few of these, do not bother to translate all of them!!' >> $JFILE
     32        sed 's/..,\(..*\)/_("\1");/' $CFILE >> $JFILE
     33fi
     34
     35JPATHS="src ../jsp/WEB-INF strings $JFILE"
    2236for i in ../locale/messages_*.po
    2337do
     
    2741
    2842        # make list of java files newer than the .po file
    29         find src ../jsp/WEB-INF strings -name *.java -newer $i > $TMPFILE
     43        find $JPATHS -name *.java -newer $i > $TMPFILE
    3044        if [ -s build/obj/net/i2p/router/web/messages_$LG.class -a \
    3145             build/obj/net/i2p/router/web/messages_$LG.class -nt $i -a \
     
    4963        # To start a new translation, copy the header from an old translation to the new .po file,
    5064        # then ant distclean updater.
    51         find src ../jsp/WEB-INF strings -name *.java > $TMPFILE
     65        find $JPATHS -name *.java > $TMPFILE
    5266        xgettext -f $TMPFILE -F -L java --from-code=UTF-8 \
    5367                 --keyword=_ --keyword=_x --keyword=intl._ --keyword=intl.title \
  • apps/routerconsole/java/bundle-messages.sh

    r827a92e ra0b4b7db  
    99export TZ=UTC
    1010
     11#
     12# generate strings/Countries.java from ../../../installer/resources/countries.txt
     13#
     14CFILE=../../../installer/resources/countries.txt
     15JFILE=build/Countries.java
     16if [ $CFILE -nt $JFILE -o ! -s $JFILE ]
     17then
     18        mkdir -p build
     19        echo '// Automatically generated pseudo-java for xgettext - do not edit' > $JFILE
     20        echo '// Translators may wish to translate a few of these, do not bother to translate all of them!!' >> $JFILE
     21        sed 's/..,\(..*\)/_("\1");/' $CFILE >> $JFILE
     22fi
     23
     24JPATHS="src ../jsp/WEB-INF strings $JFILE"
    1125for i in ../locale/messages_*.po
    1226do
     
    1630
    1731        # make list of java files newer than the .po file
    18         find src ../jsp/WEB-INF strings -name *.java -newer $i > $TMPFILE
     32        find $JPATHS -name *.java -newer $i > $TMPFILE
    1933        if [ -s build/obj/net/i2p/router/web/messages_$LG.class -a \
    2034             build/obj/net/i2p/router/web/messages_$LG.class -nt $i -a \
     
    3852        # To start a new translation, copy the header from an old translation to the new .po file,
    3953        # then ant distclean updater.
    40         find src ../jsp/WEB-INF strings -name *.java > $TMPFILE
     54        find $JPATHS -name *.java > $TMPFILE
    4155        xgettext -f $TMPFILE -F -L java --from-code=UTF-8 \
    4256                 --keyword=_ --keyword=_x --keyword=intl._ --keyword=intl.title \
  • apps/routerconsole/java/src/net/i2p/router/web/NetDbHelper.java

    r827a92e ra0b4b7db  
    88public class NetDbHelper extends HelperBase {
    99    private String _routerPrefix;
    10     private boolean _full = false;
     10    private int _full;
    1111    private boolean _lease = false;
    1212   
     
    1414   
    1515    public void setRouter(String r) { _routerPrefix = r; }
    16     public void setFull(String f) { _full = "1".equals(f); }
     16    public void setFull(String f) {
     17        try {
     18            _full = Integer.parseInt(f);
     19        } catch (NumberFormatException nfe) {}
     20    }
    1721    public void setLease(String l) { _lease = "1".equals(l); }
    1822   
  • apps/routerconsole/java/src/net/i2p/router/web/NetDbRenderer.java

    r827a92e ra0b4b7db  
    7676        out.write(buf.toString());
    7777        out.flush();
    78     }
    79 
    80     public void renderStatusHTML(Writer out) throws IOException {
    81         renderStatusHTML(out, true);
    8278    }
    8379
     
    132128    }
    133129
    134     public void renderStatusHTML(Writer out, boolean full) throws IOException {
     130    /**
     131     *  @param mode 0: our info and charts only; 1: full routerinfos and charts; 2: abbreviated routerinfos and charts
     132     */
     133    public void renderStatusHTML(Writer out, int mode) throws IOException {
    135134        out.write("<h2>" + _("Network Database Contents") + " (<a href=\"netdb.jsp?l=1\">" + _("View LeaseSets") + "</a>)</h2>\n");
    136135        if (!_context.netDb().isInitialized()) {
     
    140139        }
    141140       
     141        boolean full = mode == 1;
     142        boolean shortStats = mode == 2;
     143        boolean showStats = full || shortStats;
    142144        Hash us = _context.routerHash();
    143145        out.write("<a name=\"routers\" ></a><h3>" + _("Routers") + " (<a href=\"netdb.jsp");
    144         if (full)
    145             out.write("#routers\" >" + _("view without"));
     146        if (full || !showStats)
     147            out.write("?f=2#routers\" >" + _("Show all routers"));
    146148        else
    147             out.write("?f=1#routers\" >" + _("view with"));
    148         out.write(' ' + _("stats") + "</a>)</h3>\n");
     149            out.write("?f=1#routers\" >" + _("Show all routers with full stats"));
     150        out.write("</a>)</h3>\n");
    149151       
    150152        StringBuilder buf = new StringBuilder(8192);
     
    164166            boolean isUs = key.equals(us);
    165167            if (!isUs) {
    166                 renderRouterInfo(buf, ri, false, full);
    167                 out.write(buf.toString());
    168                 buf.setLength(0);
     168                if (showStats) {
     169                    renderRouterInfo(buf, ri, false, full);
     170                    out.write(buf.toString());
     171                    buf.setLength(0);
     172                }
    169173                String routerVersion = ri.getOption("router.version");
    170174                if (routerVersion != null)
     
    195199        List<String> countryList = new ArrayList(countries.objects());
    196200        if (countryList.size() > 0) {
    197             Collections.sort(countryList);
     201            Collections.sort(countryList, new CountryComparator());
    198202            buf.append("<table>\n");
    199203            buf.append("<tr><th align=\"left\">" + _("Country") + "</th><th>" + _("Count") + "</th></tr>\n");
     
    202206                buf.append("<tr><td><img height=\"11\" width=\"16\" alt=\"").append(country.toUpperCase()).append("\"");
    203207                buf.append(" src=\"/flags.jsp?c=").append(country).append("\"> ");
    204                 buf.append(_context.commSystem().getCountryName(country));
     208                buf.append(_(_context.commSystem().getCountryName(country)));
    205209                buf.append("</td><td align=\"center\">").append(num).append("</td></tr>\n");
    206210            }
     
    212216    }
    213217   
     218    /** sort by translated country name */
     219    private class CountryComparator implements Comparator {
     220         public int compare(Object l, Object r) {
     221             return _(_context.commSystem().getCountryName((String)l))
     222                    .compareTo(_(_context.commSystem().getCountryName((String)r)));
     223        }
     224    }
     225
    214226    /**
    215227     *  Be careful to use stripHTML for any displayed routerInfo data
  • apps/routerconsole/java/src/net/i2p/router/web/ProfileOrganizerRenderer.java

    r827a92e ra0b4b7db  
    172172        buf.append("<h2>").append(_("Floodfill and Integrated Peers")).append("</h2>\n");
    173173        buf.append("<table>");
    174                    buf.append("<tr>");
    175                    buf.append("<th class=\"smallhead\">Peer</th>");
    176                    buf.append("<th class=\"smallhead\">Caps</th>");
    177                    buf.append("<th class=\"smallhead\">Integ. Value</th>");
    178                    buf.append("<th class=\"smallhead\">Last Heard About</th>");
    179                    buf.append("<th class=\"smallhead\">Last Heard From</th>");
    180 //                   "<th class=\"smallhead\">Last Successful Send</th>" +
    181                    buf.append("<th class=\"smallhead\">Last Good Send</th>");       
    182 //                   "<th class=\"smallhead\">Last Failed Send</th>" +
    183                    buf.append("<th class=\"smallhead\">Last Bad Send</th>");
    184                    buf.append("<th class=\"smallhead\">10m Resp. Time</th>");
    185                    buf.append("<th class=\"smallhead\">1h Resp. Time</th>");
    186                    buf.append("<th class=\"smallhead\">1d Resp. Time</th>");
    187 //                   "<th class=\"smallhead\">Successful Lookups</th>" +
    188                    buf.append("<th class=\"smallhead\">Good Lookups</th>");
    189 //                   "<th>Failed Lookups</th>" +
    190                    buf.append("<th class=\"smallhead\">Bad Lookups</th>");       
    191                    buf.append("<th class=\"smallhead\">New Stores</th>");
    192                    buf.append("<th class=\"smallhead\">Old Stores</th>");
    193                    buf.append("<th class=\"smallhead\">1h Fail Rate</th>");
    194                    buf.append("<th class=\"smallhead\">1d Fail Rate</th>");
    195                    buf.append("</tr>");
     174        buf.append("<tr>");
     175        buf.append("<th class=\"smallhead\">").append(_("Peer")).append("</th>");
     176        buf.append("<th class=\"smallhead\">").append(_("Caps")).append("</th>");
     177        buf.append("<th class=\"smallhead\">").append(_("Integ. Value")).append("</th>");
     178        buf.append("<th class=\"smallhead\">").append(_("Last Heard About")).append("</th>");
     179        buf.append("<th class=\"smallhead\">").append(_("Last Heard From")).append("</th>");
     180        buf.append("<th class=\"smallhead\">").append(_("Last Good Send")).append("</th>");       
     181        buf.append("<th class=\"smallhead\">").append(_("Last Bad Send")).append("</th>");
     182        buf.append("<th class=\"smallhead\">").append(_("10m Resp. Time")).append("</th>");
     183        buf.append("<th class=\"smallhead\">").append(_("1h Resp. Time")).append("</th>");
     184        buf.append("<th class=\"smallhead\">").append(_("1d Resp. Time")).append("</th>");
     185        buf.append("<th class=\"smallhead\">").append(_("Last Good Lookup")).append("</th>");
     186        buf.append("<th class=\"smallhead\">").append(_("Last Bad Lookup")).append("</th>");       
     187        buf.append("<th class=\"smallhead\">").append(_("Last Good Store")).append("</th>");
     188        buf.append("<th class=\"smallhead\">").append(_("Last Bad Store")).append("</th>");
     189        buf.append("<th class=\"smallhead\">").append(_("1h Fail Rate")).append("</th>");
     190        buf.append("<th class=\"smallhead\">").append(_("1d Fail Rate")).append("</th>");
     191        buf.append("</tr>");
    196192        for (Iterator iter = integratedPeers.iterator(); iter.hasNext();) {
    197193            PeerProfile prof = (PeerProfile)iter.next();
     
    222218            DBHistory dbh = prof.getDBHistory();
    223219            if (dbh != null) {
    224                 buf.append("<td align=\"right\">").append(dbh.getSuccessfulLookups()).append("</td>");
    225                 buf.append("<td align=\"right\">").append(dbh.getFailedLookups()).append("</td>");
    226                 buf.append("<td align=\"right\">").append(dbh.getUnpromptedDbStoreNew()).append("</td>");
    227                 buf.append("<td align=\"right\">").append(dbh.getUnpromptedDbStoreOld()).append("</td>");
     220                time = now - dbh.getLastLookupSuccessful();
     221                buf.append("<td align=\"right\">").append(DataHelper.formatDuration(time)).append("</td>");
     222                time = now - dbh.getLastLookupFailed();
     223                buf.append("<td align=\"right\">").append(DataHelper.formatDuration(time)).append("</td>");
     224                time = now - dbh.getLastStoreSuccessful();
     225                buf.append("<td align=\"right\">").append(DataHelper.formatDuration(time)).append("</td>");
     226                time = now - dbh.getLastStoreFailed();
     227                buf.append("<td align=\"right\">").append(DataHelper.formatDuration(time)).append("</td>");
    228228                buf.append("<td align=\"right\">").append(davg(dbh, 60*60*1000l)).append("</td>");
    229229                buf.append("<td align=\"right\">").append(davg(dbh, 24*60*60*1000l)).append("</td>");
     
    243243           .append(" (").append(integrated).append(' ').append(_(" well integrated peers")).append(")</p>");
    244244        buf.append("<h3>").append(_("Definitions")).append(":</h3><ul>");
    245                    buf.append("<li><b>").append(_("groups")).append("</b>: ").append(_("as determined by the profile organizer")).append("</li>");
    246                    buf.append("<li><b>").append(_("caps")).append("</b>: ").append(_("capabilities in the netDb, not used to determine profiles")).append("</li>");
    247                    buf.append("<li><b>").append(_("speed")).append("</b>: ").append(_("peak throughput (bytes per second) over a 1 minute period that the peer has sustained in a single tunnel")).append("</li>");
    248                    buf.append("<li><b>").append(_("capacity")).append("</b>: ").append(_("how many tunnels can we ask them to join in an hour?")).append("</li>");
    249                    buf.append("<li><b>").append(_("integration")).append("</b>: ").append(_("how many new peers have they told us about lately?")).append("</li>");
    250                    buf.append("<li><b>").append(_("status")).append("</b>: ").append(_("is the peer banned, or unreachable, or failing tunnel tests?")).append("</li>");
    251                    buf.append("</ul></i>");
     245        buf.append("<li><b>").append(_("groups")).append("</b>: ").append(_("as determined by the profile organizer")).append("</li>");
     246        buf.append("<li><b>").append(_("caps")).append("</b>: ").append(_("capabilities in the netDb, not used to determine profiles")).append("</li>");
     247        buf.append("<li><b>").append(_("speed")).append("</b>: ").append(_("peak throughput (bytes per second) over a 1 minute period that the peer has sustained in a single tunnel")).append("</li>");
     248        buf.append("<li><b>").append(_("capacity")).append("</b>: ").append(_("how many tunnels can we ask them to join in an hour?")).append("</li>");
     249        buf.append("<li><b>").append(_("integration")).append("</b>: ").append(_("how many new peers have they told us about lately?")).append("</li>");
     250        buf.append("<li><b>").append(_("status")).append("</b>: ").append(_("is the peer banned, or unreachable, or failing tunnel tests?")).append("</li>");
     251        buf.append("</ul></i>");
    252252        out.write(buf.toString());
    253253        out.flush();
  • apps/routerconsole/java/src/net/i2p/router/web/StatsGenerator.java

    r827a92e ra0b4b7db  
    3030    public void generateStatsPage(Writer out) throws IOException {
    3131        StringBuilder buf = new StringBuilder(16*1024);
    32         buf.append("<div class=\"joblog\"><form action=\"/oldstats.jsp\">");
     32        buf.append("<div class=\"joblog\"><form action=\"/stats.jsp\">");
    3333        buf.append("<select name=\"go\" onChange='location.href=this.value'>");
    3434        out.write(buf.toString());
     
    4040            String group = (String)entry.getKey();
    4141            Set stats = (Set)entry.getValue();
    42             buf.append("<option value=\"/oldstats.jsp#").append(group).append("\">");
     42            buf.append("<option value=\"/stats.jsp#").append(group).append("\">");
    4343            buf.append(group).append("</option>\n");
    4444            for (Iterator statIter = stats.iterator(); statIter.hasNext(); ) {
    4545                String stat = (String)statIter.next();
    46                 buf.append("<option value=\"/oldstats.jsp#");
     46                buf.append("<option value=\"/stats.jsp#");
    4747                buf.append(stat);
    4848                buf.append("\">...");
  • apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java

    r827a92e ra0b4b7db  
    119119               .append("</a>\n" +
    120120
    121                        "<a href=\"oldstats.jsp\" target=\"_top\" title=\"")
     121                       "<a href=\"stats.jsp\" target=\"_top\" title=\"")
    122122               .append(_("Textual router performance statistics"))
    123123               .append("\">")
  • build.xml

    r827a92e ra0b4b7db  
    411411        <copy file="build/routerconsole.war" todir="pkg-temp/webapps/" />
    412412        <copy file="build/addressbook.war" todir="pkg-temp/webapps/" />
     413        <!-- decapitalized the file in 0.7.8 -->
     414        <copy file="installer/resources/countries.txt" todir="pkg-temp/geoip/" />
    413415    </target>
    414416    <target name="prepupdateRouter" depends="buildrouter, deletepkg-temp">
  • checklist.txt

    r827a92e ra0b4b7db  
    99Change revision in:
    1010        history.txt
    11         initialNews.xml
     11        installer/resources/initialNews.xml
    1212        installer/install.xml
    13         news.xml
     13        installer/resources/news.xml
    1414        router/java/src/net/i2p/router/RouterVersion.java
    1515                (change to BUILD = 0 and EXTRA = "")
     
    2323blessed by a trusted party:
    2424        mtn log --brief --no-graph --to t:i2p-0.7.(xx-1) | cut -d ' ' -f 2- | sort
     25
     26NOTE: Most tasks below here are now automated by 'ant release'
    2527
    2628Build and tag:
     
    6163        gpg -b i2pupdate.sud
    6264
     65(end of tasks automated by 'ant release')
     66
    6367Distribute files to download locations and to www.i2p2.i2p
    6468
     
    6670        Sync with mtn.i2p2.i2p
    6771        announcements.html
    68         announcements_de.html
    69         download.html (change SHA256s)
    70         download_de.html (change SHA256s)
     72        announcements_*.html
     73        download.html (change version numbers and SHA256s)
     74        download_*.html (change version numbers and SHA256s)
    7175        index.html
    72         index_de.html
     76        index_*.html
    7377        hosts.txt (copy from mtn)
    7478        release-x.y.z.html (new)
  • history.txt

    r827a92e ra0b4b7db  
     12009-11-08 zzz
     2    * Console:
     3      - countries.txt: Convert to mixed case, include in update
     4      - netdb.jsp: Hide all routers by default, sort and tag country names
     5      - oldstats.jsp: Move to stats.jsp
     6      - profiles.jsp: Show new DBH times instead of counts
     7    * Profiles:
     8      - Track last good and bad lookup times
     9        and last good and bad store times,
     10        to prep for floodfill changes
     11      - Don't reset last-heard-about at router startup
     12    * Checklist and Android readme fixups
     13
    1142009-11-04 zzz
    215    * Build:
  • installer/resources/countries.txt

    r827a92e ra0b4b7db  
    1 AD,ANDORRA
    2 AE,UNITED ARAB EMIRATES
    3 AF,AFGHANISTAN
    4 AG,ANTIGUA AND BARBUDA
    5 AI,ANGUILLA
    6 AL,ALBANIA
    7 AM,ARMENIA
    8 AN,NETHERLANDS ANTILLES
    9 AO,ANGOLA
    10 AQ,ANTARCTICA
    11 AR,ARGENTINA
    12 AS,AMERICAN SAMOA
    13 AT,AUSTRIA
    14 AU,AUSTRALIA
    15 AW,ARUBA
     1AD,Andorra
     2AE,United Arab Emirates
     3AF,Afghanistan
     4AG,Antigua and Barbuda
     5AI,Anguilla
     6AL,Albania
     7AM,Armenia
     8AN,Netherlands Antilles
     9AO,Angola
     10AQ,Antarctica
     11AR,Argentina
     12AS,American Samoa
     13AT,Austria
     14AU,Australia
     15AW,Aruba
    1616AX,
    17 AZ,AZERBAIJAN
    18 BA,BOSNIA AND HERZEGOVINA
    19 BB,BARBADOS
    20 BD,BANGLADESH
    21 BE,BELGIUM
    22 BF,BURKINA FASO
    23 BG,BULGARIA
    24 BH,BAHRAIN
    25 BI,BURUNDI
    26 BJ,BENIN
    27 BM,BERMUDA
    28 BN,BRUNEI DARUSSALAM
    29 BO,BOLIVIA
    30 BR,BRAZIL
    31 BS,BAHAMAS
    32 BT,BHUTAN
    33 BV,BOUVET ISLAND
    34 BW,BOTSWANA
    35 BY,BELARUS
    36 BZ,BELIZE
    37 CA,CANADA
    38 CD,THE DEMOCRATIC REPUBLIC OF THE CONGO
    39 CF,CENTRAL AFRICAN REPUBLIC
    40 CG,CONGO
    41 CH,SWITZERLAND
    42 CI,COTE D'IVOIRE
    43 CK,COOK ISLANDS
    44 CL,CHILE
    45 CM,CAMEROON
    46 CN,CHINA
    47 CO,COLOMBIA
    48 CR,COSTA RICA
    49 CS,SERBIA AND MONTENEGRO
    50 CU,CUBA
    51 CV,CAPE VERDE
    52 CY,CYPRUS
    53 CZ,CZECH REPUBLIC
    54 DE,GERMANY
    55 DJ,DJIBOUTI
    56 DK,DENMARK
    57 DM,DOMINICA
    58 DO,DOMINICAN REPUBLIC
    59 DZ,ALGERIA
    60 EC,ECUADOR
    61 EE,ESTONIA
    62 EG,EGYPT
    63 ER,ERITREA
    64 ES,SPAIN
    65 ET,ETHIOPIA
    66 FI,FINLAND
    67 FJ,FIJI
    68 FK,FALKLAND ISLANDS (MALVINAS)
    69 FM,FEDERATED STATES OF MICRONESIA
    70 FO,FAROE ISLANDS
    71 FR,FRANCE
    72 GA,GABON
    73 GB,UNITED KINGDOM
    74 GD,GRENADA
    75 GE,GEORGIA
    76 GF,FRENCH GUIANA
    77 GH,GHANA
    78 GI,GIBRALTAR
    79 GL,GREENLAND
    80 GM,GAMBIA
    81 GN,GUINEA
    82 GP,GUADELOUPE
    83 GQ,EQUATORIAL GUINEA
    84 GR,GREECE
    85 GS,SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS
    86 GT,GUATEMALA
    87 GU,GUAM
    88 GW,GUINEA-BISSAU
    89 GY,GUYANA
    90 HK,HONG KONG
    91 HN,HONDURAS
    92 HR,CROATIA
    93 HT,HAITI
    94 HU,HUNGARY
    95 ID,INDONESIA
    96 IE,IRELAND
    97 IL,ISRAEL
     17AZ,Azerbaijan
     18BA,Bosnia and Herzegovina
     19BB,Barbados
     20BD,Bangladesh
     21BE,Belgium
     22BF,Burkina Faso
     23BG,Bulgaria
     24BH,Bahrain
     25BI,Burundi
     26BJ,Benin
     27BM,Bermuda
     28BN,Brunei Darussalam
     29BO,Bolivia
     30BR,Brazil
     31BS,Bahamas
     32BT,Bhutan
     33BV,Bouvet Island
     34BW,Botswana
     35BY,Belarus
     36BZ,Belize
     37CA,Canada
     38CD,The Democratic Republic of the Congo
     39CF,Central African Republic
     40CG,Congo
     41CH,Switzerland
     42CI,Cote D'Ivoire
     43CK,Cook Islands
     44CL,Chile
     45CM,Cameroon
     46CN,China
     47CO,Colombia
     48CR,Costa Rica
     49CS,Serbia and Montenegro
     50CU,Cuba
     51CV,Cape Verde
     52CY,Cyprus
     53CZ,Czech Republic
     54DE,Germany
     55DJ,Djibouti
     56DK,Denmark
     57DM,Dominica
     58DO,Dominican Republic
     59DZ,Algeria
     60EC,Ecuador
     61EE,Estonia
     62EG,Egypt
     63ER,Eritrea
     64ES,Spain
     65ET,Ethiopia
     66FI,Finland
     67FJ,Fiji
     68FK,Falkland Islands (Malvinas)
     69FM,Federated States of Micronesia
     70FO,Faroe Islands
     71FR,France
     72GA,Gabon
     73GB,United Kingdom
     74GD,Grenada
     75GE,Georgia
     76GF,French Guiana
     77GH,Ghana
     78GI,Gibraltar
     79GL,Greenland
     80GM,Gambia
     81GN,Guinea
     82GP,Guadeloupe
     83GQ,Equatorial Guinea
     84GR,Greece
     85GS,South Georgia and the South Sandwich Islands
     86GT,Guatemala
     87GU,Guam
     88GW,Guinea-Bissau
     89GY,Guyana
     90HK,Hong Kong
     91HN,Honduras
     92HR,Croatia
     93HT,Haiti
     94HU,Hungary
     95ID,Indonesia
     96IE,Ireland
     97IL,Israel
    9898IM,
    99 IN,INDIA
    100 IO,BRITISH INDIAN OCEAN TERRITORY
    101 IQ,IRAQ
    102 IR,ISLAMIC REPUBLIC OF IRAN
    103 IS,ICELAND
    104 IT,ITALY
     99IN,India
     100IO,British Indian Ocean Territory
     101IQ,Iraq
     102IR,Islamic Republic of Iran
     103IS,Iceland
     104IT,Italy
    105105JE,
    106 JM,JAMAICA
    107 JO,JORDAN
    108 JP,JAPAN
    109 KE,KENYA
    110 KG,KYRGYZSTAN
    111 KH,CAMBODIA
    112 KI,KIRIBATI
    113 KM,COMOROS
    114 KN,SAINT KITTS AND NEVIS
    115 KR,REPUBLIC OF KOREA
    116 KW,KUWAIT
    117 KY,CAYMAN ISLANDS
    118 KZ,KAZAKHSTAN
    119 LA,LAO PEOPLE'S DEMOCRATIC REPUBLIC
    120 LB,LEBANON
    121 LC,SAINT LUCIA
    122 LI,LIECHTENSTEIN
    123 LK,SRI LANKA
    124 LR,LIBERIA
    125 LS,LESOTHO
    126 LT,LITHUANIA
    127 LU,LUXEMBOURG
    128 LV,LATVIA
    129 LY,LIBYAN ARAB JAMAHIRIYA
    130 MA,MOROCCO
    131 MC,MONACO
    132 MD,REPUBLIC OF MOLDOVA
     106JM,Jamaica
     107JO,Jordan
     108JP,Japan
     109KE,Kenya
     110KG,Kyrgyzstan
     111KH,Cambodia
     112KI,Kiribati
     113KM,Comoros
     114KN,Saint Kitts and Nevis
     115KR,Republic of Korea
     116KW,Kuwait
     117KY,Cayman Islands
     118KZ,Kazakhstan
     119LA,Lao People'S Democratic Republic
     120LB,Lebanon
     121LC,Saint Lucia
     122LI,Liechtenstein
     123LK,Sri Lanka
     124LR,Liberia
     125LS,Lesotho
     126LT,Lithuania
     127LU,Luxembourg
     128LV,Latvia
     129LY,Libyan Arab Jamahiriya
     130MA,Morocco
     131MC,Monaco
     132MD,Republic of Moldova
    133133ME,
    134134MF,
    135 MG,MADAGASCAR
    136 MH,MARSHALL ISLANDS
    137 MK,THE FORMER YUGOSLAV REPUBLIC OF MACEDONIA
    138 ML,MALI
    139 MM,MYANMAR
    140 MN,MONGOLIA
    141 MO,MACAO
    142 MP,NORTHERN MARIANA ISLANDS
    143 MQ,MARTINIQUE
    144 MR,MAURITANIA
    145 MS,MONTSERRAT
    146 MT,MALTA
    147 MU,MAURITIUS
    148 MV,MALDIVES
    149 MW,MALAWI
    150 MX,MEXICO
    151 MY,MALAYSIA
    152 MZ,MOZAMBIQUE
    153 NA,NAMIBIA
    154 NC,NEW CALEDONIA
    155 NE,NIGER
    156 NF,NORFOLK ISLAND
    157 NG,NIGERIA
    158 NI,NICARAGUA
    159 NL,NETHERLANDS
    160 NO,NORWAY
    161 NP,NEPAL
    162 NR,NAURU
    163 NU,NIUE
    164 NZ,NEW ZEALAND
    165 OM,OMAN
    166 PA,PANAMA
    167 PE,PERU
    168 PF,FRENCH POLYNESIA
    169 PG,PAPUA NEW GUINEA
    170 PH,PHILIPPINES
    171 PK,PAKISTAN
    172 PL,POLAND
    173 PM,SAINT PIERRE AND MIQUELON
    174 PR,PUERTO RICO
    175 PS,PALESTINIAN TERRITORY
    176 PT,PORTUGAL
    177 PW,PALAU
    178 PY,PARAGUAY
    179 QA,QATAR
    180 RE,REUNION
    181 RO,ROMANIA
    182 RS,SERBIA
    183 RU,RUSSIAN FEDERATION
    184 RW,RWANDA
    185 SA,SAUDI ARABIA
    186 SB,SOLOMON ISLANDS
    187 SC,SEYCHELLES
    188 SD,SUDAN
    189 SE,SWEDEN
    190 SG,SINGAPORE
    191 SI,SLOVENIA
    192 SK,SLOVAKIA
    193 SL,SIERRA LEONE
    194 SM,SAN MARINO
    195 SN,SENEGAL
    196 SO,SOMALIA
    197 SR,SURINAME
    198 ST,SAO TOME AND PRINCIPE
    199 SV,EL SALVADOR
    200 SY,SYRIAN ARAB REPUBLIC
    201 SZ,SWAZILAND
    202 TC,TURKS AND CAICOS ISLANDS
    203 TD,CHAD
    204 TF,FRENCH SOUTHERN TERRITORIES
    205 TG,TOGO
    206 TH,THAILAND
    207 TJ,TAJIKISTAN
    208 TK,TOKELAU
    209 TL,TIMOR-LESTE
    210 TM,TURKMENISTAN
    211 TN,TUNISIA
    212 TO,TONGA
    213 TR,TURKEY
    214 TT,TRINIDAD AND TOBAGO
    215 TV,TUVALU
    216 TW,TAIWAN
    217 TZ,UNITED REPUBLIC OF TANZANIA
    218 UA,UKRAINE
    219 UG,UGANDA
    220 UM,UNITED STATES MINOR OUTLYING ISLANDS
    221 US,UNITED STATES
    222 UY,URUGUAY
    223 UZ,UZBEKISTAN
    224 VA,HOLY SEE (VATICAN CITY STATE)
    225 VC,SAINT VINCENT AND THE GRENADINES
    226 VE,VENEZUELA
    227 VG,VIRGIN ISLANDS
    228 VI,VIRGIN ISLANDS
    229 VN,VIET NAM
    230 VU,VANUATU
    231 WF,WALLIS AND FUTUNA
    232 WS,SAMOA
    233 YE,YEMEN
    234 YT,MAYOTTE
    235 ZA,SOUTH AFRICA
    236 ZM,ZAMBIA
    237 ZW,ZIMBABWE
     135MG,Madagascar
     136MH,Marshall Islands
     137MK,The Former Yugoslav Republic of Macedonia
     138ML,Mali
     139MM,Myanmar
     140MN,Mongolia
     141MO,Macao
     142MP,Northern Mariana Islands
     143MQ,Martinique
     144MR,Mauritania
     145MS,Montserrat
     146MT,Malta
     147MU,Mauritius
     148MV,Maldives
     149MW,Malawi
     150MX,Mexico
     151MY,Malaysia
     152MZ,Mozambique
     153NA,Namibia
     154NC,New Caledonia
     155NE,Niger
     156NF,Norfolk Island
     157NG,Nigeria
     158NI,Nicaragua
     159NL,Netherlands
     160NO,Norway
     161NP,Nepal
     162NR,Nauru
     163NU,Niue
     164NZ,New Zealand
     165OM,Oman
     166PA,Panama
     167PE,Peru
     168PF,French Polynesia
     169PG,Papua New Guinea
     170PH,Philippines
     171PK,Pakistan
     172PL,Poland
     173PM,Saint Pierre and Miquelon
     174PR,Puerto Rico
     175PS,Palestinian Territory
     176PT,Portugal
     177PW,Palau
     178PY,Paraguay
     179QA,Qatar
     180RE,Reunion
     181RO,Romania
     182RS,Serbia
     183RU,Russian Federation
     184RW,Rwanda
     185SA,Saudi Arabia
     186SB,Solomon Islands
     187SC,Seychelles
     188SD,Sudan
     189SE,Sweden
     190SG,Singapore
     191SI,Slovenia
     192SK,Slovakia
     193SL,Sierra Leone
     194SM,San Marino
     195SN,Senegal
     196SO,Somalia
     197SR,Suriname
     198ST,Sao Tome and Principe
     199SV,El Salvador
     200SY,Syrian Arab Republic
     201SZ,Swaziland
     202TC,Turks and Caicos Islands
     203TD,Chad
     204TF,French Southern Territories
     205TG,Togo
     206TH,Thailand
     207TJ,Tajikistan
     208TK,Tokelau
     209TL,Timor-Leste
     210TM,Turkmenistan
     211TN,Tunisia
     212TO,Tonga
     213TR,Turkey
     214TT,Trinidad and Tobago
     215TV,Tuvalu
     216TW,Taiwan
     217TZ,United Republic of Tanzania
     218UA,Ukraine
     219UG,Uganda
     220UM,United States Minor Outlying Islands
     221US,United States
     222UY,Uruguay
     223UZ,Uzbekistan
     224VA,Holy See (Vatican City State)
     225VC,Saint Vincent and the Grenadines
     226VE,Venezuela
     227VG,Virgin Islands
     228VI,Virgin Islands
     229VN,Viet Nam
     230VU,Vanuatu
     231WF,Wallis and Futuna
     232WS,Samoa
     233YE,Yemen
     234YT,Mayotte
     235ZA,South Africa
     236ZM,Zambia
     237ZW,Zimbabwe
  • router/java/src/net/i2p/router/RouterVersion.java

    r827a92e ra0b4b7db  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 12;
     21    public final static long BUILD = 13;
    2222    /** for example "-test" */
    2323    public final static String EXTRA = "";
  • router/java/src/net/i2p/router/networkdb/kademlia/TransientDataStore.java

    r827a92e ra0b4b7db  
    9191        old = _data.put(key, data);
    9292        if (data instanceof RouterInfo) {
    93             _context.profileManager().heardAbout(key);
     93            // Don't do this here so we don't reset it at router startup;
     94            // the StoreMessageJob calls this
     95            //_context.profileManager().heardAbout(key);
    9496            RouterInfo ri = (RouterInfo)data;
    9597            if (old != null) {
  • router/java/src/net/i2p/router/peermanager/DBHistory.java

    r827a92e ra0b4b7db  
    2727    private long _avgDelayBetweenLookupsReceived;
    2828    private long _lastLookupReceived;
     29    private long _lastLookupSuccessful;
     30    private long _lastLookupFailed;
     31    private long _lastStoreSuccessful;
     32    private long _lastStoreFailed;
    2933    private long _unpromptedDbStoreNew;
    3034    private long _unpromptedDbStoreOld;
     
    5155    }
    5256   
    53     /** how many times we have sent them a db lookup and received the value back from them */
     57    /** how many times we have sent them a db lookup and received the value back from them
     58     *  @deprecated unused
     59     */
    5460    public long getSuccessfulLookups() { return _successfulLookups; }
    55     /** how many times we have sent them a db lookup and not received the value or a lookup reply */
     61    /** how many times we have sent them a db lookup and not received the value or a lookup reply
     62     *  @deprecated unused
     63     */
    5664    public long getFailedLookups() { return _failedLookups; }
    57     /** how many peers that we have never seen before did lookups provide us with? */
     65    /** how many peers that we have never seen before did lookups provide us with?
     66     *  @deprecated unused
     67     */
    5868    public long getLookupReplyNew() { return _lookupReplyNew; }
    59     /** how many peers that we have already seen did lookups provide us with? */
     69    /** how many peers that we have already seen did lookups provide us with?
     70     *  @deprecated unused
     71     */
    6072    public long getLookupReplyOld() { return _lookupReplyOld; }
    61     /** how many peers that we explicitly asked the peer not to send us did they reply with? */
     73    /** how many peers that we explicitly asked the peer not to send us did they reply with?
     74     *  @deprecated unused
     75     */
    6276    public long getLookupReplyDuplicate() { return _lookupReplyDuplicate; }
    63     /** how many peers that were incorrectly formatted / expired / otherwise illegal did lookups provide us with? */
     77    /** how many peers that were incorrectly formatted / expired / otherwise illegal did lookups provide us with?
     78     *  @deprecated unused
     79     */
    6480    public long getLookupReplyInvalid() { return _lookupReplyInvalid; }
    65     /** how many lookups this peer has sent us? */
     81    /** how many lookups this peer has sent us?
     82     *  @deprecated unused
     83     */
    6684    public long getLookupsReceived() { return _lookupsReceived; }
    67     /** how frequently do they send us lookup requests? */
     85    /** how frequently do they send us lookup requests?
     86     *  @deprecated unused
     87     */
    6888    public long getAvgDelayBetweenLookupsReceived() { return _avgDelayBetweenLookupsReceived; }
    69     /** when did they last send us a request? */
     89    /** when did they last send us a request?
     90     *  @deprecated unused
     91     */
    7092    public long getLastLookupReceived() { return _lastLookupReceived; }
     93    public long getLastLookupSuccessful() { return _lastLookupSuccessful; }
     94    public long getLastLookupFailed() { return _lastLookupFailed; }
     95    public long getLastStoreSuccessful() { return _lastStoreSuccessful; }
     96    public long getLastStoreFailed() { return _lastStoreFailed; }
     97
    7198    /** how many times have they sent us data we didn't ask for and that we've never seen? */
    7299    public long getUnpromptedDbStoreNew() { return _unpromptedDbStoreNew; }
     
    88115    public void lookupSuccessful() {
    89116        _successfulLookups++;
    90     }
     117        _lastLookupSuccessful = _context.clock().now();
     118    }
     119
    91120    /**
    92121     * Note that the peer failed to respond to the db lookup in any way
     
    95124        _failedLookups++;
    96125        _failedLookupRate.addData(1, 0);
    97     }
     126        _lastLookupFailed = _context.clock().now();
     127    }
     128
     129    /**
     130     * Note that we successfully stored to a floodfill peer and verified the result
     131     * by asking another floodfill peer
     132     *
     133     */
     134    public void storeSuccessful() {
     135        _lastStoreSuccessful = _context.clock().now();
     136    }
     137
     138    /**
     139     * Note that floodfill verify failed
     140     */
     141    public void storeFailed() {
     142        // Fixme, redefined this to include both lookup and store fails,
     143        // need to fix the javadocs
     144        _failedLookupRate.addData(1, 0);
     145        _lastStoreFailed = _context.clock().now();
     146    }
     147
    98148    /**
    99149     * Receive a lookup reply from the peer, where they gave us the specified info
     
    187237    }
    188238   
    189     private void add(StringBuilder buf, String name, long val, String description) {
     239    private static void add(StringBuilder buf, String name, long val, String description) {
    190240        buf.append("# ").append(name.toUpperCase()).append(NL).append("# ").append(description).append(NL);
    191241        buf.append("dbHistory.").append(name).append('=').append(val).append(NL).append(NL);
     
    225275        if (_invalidReplyRate == null)
    226276            _invalidReplyRate = new RateStat("dbHistory.invalidReplyRate", "How often does this peer give us a bad (nonexistant, forged, etc) peer?", statGroup, new long[] { 30*60*1000l, 60*60*1000l, 24*60*60*1000l });
    227             _failedLookupRate.setStatLog(_context.statManager().getStatLog());
    228             _invalidReplyRate.setStatLog(_context.statManager().getStatLog());
     277        _failedLookupRate.setStatLog(_context.statManager().getStatLog());
     278        _invalidReplyRate.setStatLog(_context.statManager().getStatLog());
    229279    }
    230280   
  • router/java/src/net/i2p/router/peermanager/ProfileManagerImpl.java

    r827a92e ra0b4b7db  
    250250     * necessarily requested it again from them, so they /might/ be lying)
    251251     *
     252     * This will force creation of DB stats
    252253     */
    253254    public void dbStoreSent(Hash peer, long responseTimeMs) {
     
    256257        long now = _context.clock().now();
    257258        data.setLastHeardFrom(now);
    258         if (!data.getIsExpandedDB())
    259             return;
    260259        data.setLastSendSuccessful(now);
     260        if (!data.getIsExpandedDB())
     261            data.expandDBProfile();
     262        DBHistory hist = data.getDBHistory();
     263        hist.storeSuccessful();
    261264        // we could do things like update some sort of "how many successful stores we've sent them"...
    262265        // naah.. dont really care now
     
    267270     * the peer, at least not within our timeout period
    268271     *
     272     * This will force creation of DB stats
    269273     */
    270274    public void dbStoreFailed(Hash peer) {
     275        PeerProfile data = getProfile(peer);
     276        if (data == null) return;
     277        if (!data.getIsExpandedDB())
     278            data.expandDBProfile();
     279        DBHistory hist = data.getDBHistory();
     280        hist.storeSuccessful();
    271281        // we could do things like update some sort of "how many successful stores we've
    272282        // failed to send them"...
  • router/java/src/net/i2p/router/tunnel/pool/BuildHandler.java

    r827a92e ra0b4b7db  
    330330    }
    331331   
     332    /** @return handle time or -1 */
    332333    private long handleRequest(BuildMessageState state) {
    333334        long timeSinceReceived = System.currentTimeMillis()-state.recvTime;
Note: See TracChangeset for help on using the changeset viewer.