Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-733

Ouput configuration startup times in startup console output

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • None
    • 1.0
    • general
    • None

    Description

      Before this idea is forgotten, I have raised this issue with the following text taken from the dev list mail thread "Re: New Startup Output, Mark 2":

      On Fri, 8 Jul 2005, Geir Magnusson Jr. wrote:
      > > At the risk of showing words in your mouth, are you suggesting it
      > > would just be nice to see how long it took to start each component?
      >
      > Exactly. It would just give people a reference as to what got done at
      > each additional delta of the progress bar...

      This should be easy for someone to implement. Let me explain:

      • The code is in the system module
      • The class that starts the server is Daemon.
      • Daemon uses a helper class that implements StartupMonitor and calls
        the appropriate methods on that as things happen during the startup
        sequence. The helper class is responsible for nearly all output from
        the startup classes themselves.
      • The progress bar is implemented in ProgressBarStartupMonitor
      • The non-pb is implemented in SilentStartupMonitor

      So, if you want additional output in a non-progress-bar case (such
      as with DEBUG or INFO output enabled), you can either add code to
      SilentStartupMonitor or add a new implementation of StartupMonitor and
      instantiate that instead of SilentStartupMonitor in the "-v" and "-vv"
      cases (leaving SilentStartupMonitor for the "-quiet" case).

      The startup monitor is called every time a configuration is
      loading, loaded, starting, and started. Note there are only a handful of
      configurations (5-10, usually), you do not get a call for every GBean
      loaded or something like that. Anyway, if you want to know how long it
      takes each configuration to be loaded and started, just call
      System.currentTimeMillis here and there and keep some statistics.

      I would recommend that you save any such output to the end for the
      case where DEBUG or INFO output is enabled, since it would otherwise be
      lost among all the initial output. But if you save the stats along the
      way, the final output could look something like this:

      10:51:28,745 INFO [Daemon] Server startup completed
      10:51:28,745 INFO [MyMonitor] 3s to start org/apache/geronimo/System
      10:51:28,745 INFO [MyMonitor] 5s to start org/apache/geronimo/Server
      10:51:28,745 INFO [MyMonitor] 2s to start org/apache/geronimo/Deployer
      ...

      Finally, I don't think it's a good idea to add something like this
      to the progress bar. The progress bar is very clean by design, and I
      don't think more specific statistics would be helpful to the typical user.
      The server developers are more likely to be interested in finer-grained
      information (and more likely to want more detailed log output as well), so
      I'd prefer this kind of thing get added to the "-v" or "-vv" startup
      options instead.

      Attachments

        Activity

          People

            Unassigned Unassigned
            johnrsisson John Sisson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: