     # FIXME: handle. Maybe outside/before. Particularly scale-to?
 
 
-analyzeStartups = (filename, callback) ->
+analyzeStartups = (filename, started, callback) ->
   fs = require 'fs'
 
   state = {}
   fs.readFile filename, {encoding: 'utf-8'}, (err, contents) ->
     return callback err if err
-    events = eventsFromLog contents
+    events = eventsFromLog contents, started
     #results = events.map (e) -> "#{e.dyno or ''} #{e.type}"
     for e in events
       applyEvent state, e

      filename = f
    .parse(process.argv)

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


  state.startups = [] if not state.startups
  state.shutdowns = [] if not state.shutdowns

  # Note, they can happen initially because we don't generally know initial state
  if event.dyno
    # Dyno-specific events
