Changeset 4d59570


Ignore:
Timestamp:
Feb 15, 2011 3:25:16 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
e227464
Parents:
8fa4996
Message:
  • Timers: Log cleanup
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/util/Executor.java

    r8fa4996 r4d59570  
    66
    77class Executor implements Runnable {
    8     private I2PAppContext _context;
     8    private final I2PAppContext _context;
    99    private Log _log;
    1010    private final List _readyEvents;
    11     private SimpleStore runn;
     11    private final SimpleStore runn;
    1212
    1313    public Executor(I2PAppContext ctx, Log log, List events, SimpleStore x) {
     
    3232                    evt.timeReached();
    3333                } catch (Throwable t) {
    34                     log("wtf, event borked: " + evt, t);
     34                    log("Executing task " + evt + " exited unexpectedly, please report", t);
    3535                }
    3636                long time = _context.clock().now() - before;
     37                // FIXME _log won't be non-null unless we already had a CRIT
    3738                if ( (time > 1000) && (_log != null) && (_log.shouldLog(Log.WARN)) )
    3839                    _log.warn("wtf, event execution took " + time + ": " + evt);
  • core/java/src/net/i2p/util/SimpleScheduler.java

    r8fa4996 r4d59570  
    3131    private static final int MIN_THREADS = 2;
    3232    private static final int MAX_THREADS = 4;
    33     private I2PAppContext _context;
    34     private Log _log;
    35     private ScheduledThreadPoolExecutor _executor;
    36     private String _name;
     33    private final I2PAppContext _context;
     34    private final Log _log;
     35    private final ScheduledThreadPoolExecutor _executor;
     36    private final String _name;
    3737    private int _count;
    3838    private final int _threads;
     
    4343        _log = _context.logManager().getLog(SimpleScheduler.class);
    4444        _name = name;
    45         _count = 0;
    4645        long maxMemory = Runtime.getRuntime().maxMemory();
    4746        _threads = (int) Math.max(MIN_THREADS, Math.min(MAX_THREADS, 1 + (maxMemory / (32*1024*1024))));
     
    140139                _timedEvent.timeReached();
    141140            } catch (Throwable t) {
    142                 _log.log(Log.CRIT, _name + " wtf, event borked: " + _timedEvent, t);
     141                _log.log(Log.CRIT, _name + ": Scheduled task " + _timedEvent + " exited unexpectedly, please report", t);
    143142            }
    144143            long time = System.currentTimeMillis() - before;
  • core/java/src/net/i2p/util/SimpleTimer.java

    r8fa4996 r4d59570  
    1515 * they b0rk the timer).
    1616 *
     17 * WARNING - Deprecated.
     18 * This is an inefficient mess. Use SimpleScheduler or SimpleTimer2 if possible.
    1719 */
    1820public class SimpleTimer {
  • core/java/src/net/i2p/util/SimpleTimer2.java

    r8fa4996 r4d59570  
    3030    private static final int MIN_THREADS = 2;
    3131    private static final int MAX_THREADS = 4;
    32     private I2PAppContext _context;
     32    private final I2PAppContext _context;
    3333    private static Log _log; // static so TimedEvent can use it
    34     private ScheduledThreadPoolExecutor _executor;
    35     private String _name;
     34    private final ScheduledThreadPoolExecutor _executor;
     35    private final String _name;
    3636    private int _count;
    3737    private final int _threads;
     
    224224                timeReached();
    225225            } catch (Throwable t) {
    226                 _log.log(Log.CRIT, _pool + " wtf, event borked: " + this, t);
     226                _log.log(Log.CRIT, _pool + ": Timed task " + this + " exited unexpectedly, please report", t);
    227227            }
    228228            long time = System.currentTimeMillis() - before;
  • history.txt

    r8fa4996 r4d59570  
     12011-02-15 zzz
     2    * i2psnark: Details link shuffle, mostly restore 0.8.3 behavior
     3    * Profiles: Punish rejections more, in an attempt to spread the
     4                load more through the network
     5    * Timers: Log cleanup
     6
    172011-02-14 Mathiasdm
    28    * Fix headless issue without reboot
     
    4102011-02-13 zzz
    511    * Connect Client: Minor NPE fix cleanup
    6     * JobQueue: Prevet NPE at shutdown (thanks liberty)
     12    * JobQueue: Prevent NPE at shutdown (thanks liberty)
    713    * GeoIP: Prevent startup NPE (ticket #413, thanks RN)
    814    * NetDB: Prevent ExpireLeaseJob NPE (thanks sponge)
     
    2228            when closed by the client, was causing massive memory leak
    2329            for internal clients using lots of sessions (thanks sponge)
     30            (ticket #397)
    2431    * i2psnark:
    2532      - Improved magnet link parsing, use tr parameter if present
  • router/java/src/net/i2p/router/RouterVersion.java

    r8fa4996 r4d59570  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 11;
     21    public final static long BUILD = 12;
    2222
    2323    /** for example "-test" */
Note: See TracChangeset for help on using the changeset viewer.