Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-9272

Plot Plug 1.3 produces incorrect build dates for plot build labels

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Component/s: plot-plugin
    • Labels:
      None
    • Environment:
      Linux 2.6.18-194.17.4.el5 x86_64 x86_64 x86_64 GNU/Linux
      Jenkins ver. 1.399
      Plot plugin 1.3
    • Similar Issues:

      Description

      Having some hundreds of builds each of which is associated with various performance measurements, the plots of the performance values show different date strings in the labels for same builds.

      E.g., build #129 took place on Jul 28 (see attached right date string plot), but for some reason it is written down as Sep 4 in one of the plots (see attached bad date string plot).

      The version 1.4 of Plot Plugin had other issues (index out of bounds and some SimpleDateFormatter issues reported elsewhere).

        Attachments

          Issue Links

            Activity

            Hide
            juha Juha Makkonen added a comment - - edited

            The DateFormat is not thread-safe, and having it as a static variable in a multithreaded environment is problem. The simplest fix would be something like

            $ diff original/Plot.java fixed/Plot.java
            497,498c497,500
            < this.buildDate = DATE_FORMAT.format(
            < new Date(Long.parseLong(buildTime)));

            > synchronized (DATE_FORMAT)

            { > this.buildDate = DATE_FORMAT.format( > new Date(Long.parseLong(buildTime))); > }
            Show
            juha Juha Makkonen added a comment - - edited The DateFormat is not thread-safe, and having it as a static variable in a multithreaded environment is problem. The simplest fix would be something like $ diff original/Plot.java fixed/Plot.java 497,498c497,500 < this.buildDate = DATE_FORMAT.format( < new Date(Long.parseLong(buildTime))); — > synchronized (DATE_FORMAT) { > this.buildDate = DATE_FORMAT.format( > new Date(Long.parseLong(buildTime))); > }
            Hide
            evernat evernat added a comment -

            This is a duplicate of JENKINS-9662, which was fixed in version 1.5 of the plot plugin

            Show
            evernat evernat added a comment - This is a duplicate of JENKINS-9662 , which was fixed in version 1.5 of the plot plugin

              People

              • Assignee:
                nidaley nidaley
                Reporter:
                juha Juha Makkonen
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: