   state.startups = [] if not state.startups
   state.shutdowns = [] if not state.shutdowns
 
-
-  # TODO: reject invalid transitions.\
   # Note, they can happen initially because we don't generally know initial state
   if event.dyno
     # Dyno-specific events

      filename = f
    .parse(process.argv)

  analyzeStartups filename, (err, res) ->
    throw err if err
    console.log res


    # FIXME: handle. Maybe outside/before. Particularly scale-to?


analyzeStartups = (filename, started, callback) ->
  fs = require 'fs'

  state = {}
  fs.readFile filename, {encoding: 'utf-8'}, (err, contents) ->
    return callback err if err
    events = eventsFromLog contents, started
    #results = events.map (e) -> "#{e.dyno or ''} #{e.type}"
    for e in events
      applyEvent state, e
