private static void runAnalysis(final BufferedReader gcLogReader, final PrintWriter pauseWriter, final PrintWriter percentWriter,
                                    final Date monitoringStartTimestamp) throws IOException, ParseException
    {
        Date currentDateTime = null;
        double totalTime = 0;
        double maxTime = 0;

        String line;
        while ((line = gcLogReader.readLine()) != null)
        {
            final Matcher stoppedMatcher = STOPPED_PATTERN.matcher(line);
            if (stoppedMatcher.matches())
            {
                if (null != currentDateTime)
                {
                    final double d = Double.parseDouble(stoppedMatcher.group(1));
                    totalTime += d;
                    maxTime = Math.max(maxTime, d);
                }
            }
            else
            {
                final Matcher gcMatcher = GC_PATTERN.matcher(line);
                if (gcMatcher.matches())
                {
                    final Date dateTime = DATESTAMP_FORMAT.parse(gcMatcher.group(1));

                    if (dateTime.after(monitoringStartTimestamp))
                    {
                        if (null != currentDateTime)
                        {
                            if (totalTime != 0)
                            {
                                printGcPauseLine(pauseWriter, currentDateTime.getTime(), totalTime, maxTime);
                                printGcPercentLine(percentWriter, dateTime.getTime(), currentDateTime.getTime(), totalTime);
                                totalTime = 0;
                                maxTime = 0;
                            }
                        }

                        currentDateTime = dateTime;
                    }
                }
            }
        }

        if (currentDateTime != null && totalTime != 0)
        {
            printGcPauseLine(pauseWriter, currentDateTime.getTime(), totalTime, maxTime);
        }
    }