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

Performance plugin support in dsl plugin

    Details

    • Similar Issues:

      Description

      HI Team,

      Do you provide the support for http://wiki.jenkins-ci.org/display/JENKINS/Performance+Plugin in your DSL ?

      I was not able to find any syntax for this plugin and i would like to configure jmeter reports generation from this performance plugin via DSL.

      Kindly help.

      Thanks & Best Regards,
      Surendran

        Attachments

          Issue Links

            Activity

            Hide
            daspilker Daniel Spilker added a comment -

            This is supported with the Automatically Generated DSL:

            job(String name) {
              publishers {
                performancePublisher {
                  errorFailedThreshold(int value)
                  errorUnstableThreshold(int value)
                  // The thresholds settings should be delimited by a new line character "\n".
                  errorUnstableResponseTimeThreshold(String value)
                  relativeFailedThresholdPositive(double value)
                  relativeFailedThresholdNegative(double value)
                  relativeUnstableThresholdPositive(double value)
                  relativeUnstableThresholdNegative(double value)
                  nthBuildNumber(int value)
                  modePerformancePerTestCase(boolean value)
                  configType(String value)
                  modeOfThreshold(boolean value)
                  failBuildIfNoResultFile(boolean value)
                  compareBuildPrevious(boolean value)
                  modeThroughput(boolean value)
                  ignoreFailedBuilds(boolean value)
                  ignoreUnstableBuilds(boolean value)
                  // Standard Mode activates upper box and ignores lower box.
                  modeEvaluation(boolean value)
                  persistConstraintLog(boolean value)
                }
              }
            } 
            
            Show
            daspilker Daniel Spilker added a comment - This is supported with the Automatically Generated DSL : job( String name) { publishers { performancePublisher { errorFailedThreshold( int value) errorUnstableThreshold( int value) // The thresholds settings should be delimited by a new line character "\n" . errorUnstableResponseTimeThreshold( String value) relativeFailedThresholdPositive( double value) relativeFailedThresholdNegative( double value) relativeUnstableThresholdPositive( double value) relativeUnstableThresholdNegative( double value) nthBuildNumber( int value) modePerformancePerTestCase( boolean value) configType( String value) modeOfThreshold( boolean value) failBuildIfNoResultFile( boolean value) compareBuildPrevious( boolean value) modeThroughput( boolean value) ignoreFailedBuilds( boolean value) ignoreUnstableBuilds( boolean value) // Standard Mode activates upper box and ignores lower box. modeEvaluation( boolean value) persistConstraintLog( boolean value) } } }
            Hide
            i069846 Surendran Manickam added a comment -

            Thanks Daniel Spilker for your immediate response.

            But i was trying to add JMeter reports via the plugin and i was not able to find that in the above syntax, could you please help me with this format as well?
            attached the screenshot for reference.

            please help,

            Thanks & Best regards,
            Surendran

            Show
            i069846 Surendran Manickam added a comment - Thanks Daniel Spilker for your immediate response. But i was trying to add JMeter reports via the plugin and i was not able to find that in the above syntax, could you please help me with this format as well? attached the screenshot for reference. please help, Thanks & Best regards, Surendran
            Hide
            daspilker Daniel Spilker added a comment -

            Job DSL uses the Structs Plugin to generate a model of the Performance Plugin. This fails for the parsers and constraints options due to generics wildcards in the parameter type. This must be either fixed in the Performance plugin by removing the wildcards or in the Structs plugin by adding support for wildcards.

            This can be reproduced in Script Console:

            import hudson.plugins.performance.*
            import org.jenkinsci.plugins.structs.describable.*
              
            new DescribableModel(PerformancePublisher)
            

            Result

            PerformancePublisher(errorFailedThreshold: int, errorUnstableThreshold: int, errorUnstableResponseTimeThreshold: String, relativeFailedThresholdPositive: double, relativeFailedThresholdNegative: double, relativeUnstableThresholdPositive: double, relativeUnstableThresholdNegative: double, nthBuildNumber: int, modePerformancePerTestCase: boolean, configType: String, modeOfThreshold: boolean, failBuildIfNoResultFile: boolean, compareBuildPrevious: boolean, parsers: java.lang.UnsupportedOperationException: do not know how to categorize attributes of type ? extends hudson.plugins.performance.PerformanceReportParser[], modeThroughput: boolean, constraints?: java.lang.UnsupportedOperationException: do not know how to categorize attributes of type ? extends hudson.plugins.performance.constraints.AbstractConstraint[], ignoreFailedBuilds?: boolean, ignoreUnstableBuilds?: boolean, modeEvaluation?: boolean, persistConstraintLog?: boolean)
            
            Show
            daspilker Daniel Spilker added a comment - Job DSL uses the Structs Plugin to generate a model of the Performance Plugin. This fails for the parsers and constraints options due to generics wildcards in the parameter type. This must be either fixed in the Performance plugin by removing the wildcards or in the Structs plugin by adding support for wildcards. This can be reproduced in Script Console: import hudson.plugins.performance.* import org.jenkinsci.plugins.structs.describable.* new DescribableModel(PerformancePublisher) Result PerformancePublisher(errorFailedThreshold: int , errorUnstableThreshold: int , errorUnstableResponseTimeThreshold: String , relativeFailedThresholdPositive: double , relativeFailedThresholdNegative: double , relativeUnstableThresholdPositive: double , relativeUnstableThresholdNegative: double , nthBuildNumber: int , modePerformancePerTestCase: boolean , configType: String , modeOfThreshold: boolean , failBuildIfNoResultFile: boolean , compareBuildPrevious: boolean , parsers: java.lang.UnsupportedOperationException: do not know how to categorize attributes of type ? extends hudson.plugins.performance.PerformanceReportParser[], modeThroughput: boolean , constraints?: java.lang.UnsupportedOperationException: do not know how to categorize attributes of type ? extends hudson.plugins.performance.constraints.AbstractConstraint[], ignoreFailedBuilds?: boolean , ignoreUnstableBuilds?: boolean , modeEvaluation?: boolean , persistConstraintLog?: boolean )
            Hide
            i069846 Surendran Manickam added a comment -

            Thanks Daniel Spilker,

            Hi Performance Plugin Team,

            Could you please help by removing the wildcards as described above by Daniel if possible or could you please advice Structs plugin team to support accordingly?
            We would like to use your plugin with DSL and we are blocked due to this issue, please help.

            Thanks & Best Regards,
            Surendran

            Show
            i069846 Surendran Manickam added a comment - Thanks Daniel Spilker , Hi Performance Plugin Team, Could you please help by removing the wildcards as described above by Daniel if possible or could you please advice Structs plugin team to support accordingly? We would like to use your plugin with DSL and we are blocked due to this issue, please help. Thanks & Best Regards, Surendran
            Hide
            i069846 Surendran Manickam added a comment -

            Hi Team,

            could we get some support on this please ?
            We want to generate the performance plugin 2 jmeter report entry alone via dsl plugin for syntax, else its no point in using both of this plugin in our CI CD pipeline for our product, so please help

            Thanks & Best Regards,
            Surendran

            Show
            i069846 Surendran Manickam added a comment - Hi Team, could we get some support on this please ? We want to generate the performance plugin 2 jmeter report entry alone via dsl plugin for syntax, else its no point in using both of this plugin in our CI CD pipeline for our product, so please help Thanks & Best Regards, Surendran
            Hide
            daspilker Daniel Spilker added a comment -

            Surendran Manickam maybe you could start working on this and provide a pull request instead of bothering other people.

            Show
            daspilker Daniel Spilker added a comment - Surendran Manickam maybe you could start working on this and provide a pull request instead of bothering other people.
            Hide
            jglick Jesse Glick added a comment -

            JENKINS-26535 workaround is to avoid wildcards.

            Show
            jglick Jesse Glick added a comment - JENKINS-26535 workaround is to avoid wildcards.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Spilker
            Path:
            src/main/java/hudson/plugins/performance/PerformancePublisher.java
            src/test/java/hudson/plugins/performance/PerformancePublisherTest.java
            src/test/java/hudson/plugins/performance/constraints/ConstraintTest.java
            http://jenkins-ci.org/commit/performance-plugin/062b2150527bfa21cb7a22ed136aeba00b0422e7
            Log:
            avoid wildcard in @DataBoundConstructor

            [FIXES JENKINS-41086]

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: src/main/java/hudson/plugins/performance/PerformancePublisher.java src/test/java/hudson/plugins/performance/PerformancePublisherTest.java src/test/java/hudson/plugins/performance/constraints/ConstraintTest.java http://jenkins-ci.org/commit/performance-plugin/062b2150527bfa21cb7a22ed136aeba00b0422e7 Log: avoid wildcard in @DataBoundConstructor [FIXES JENKINS-41086]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrey Pokhilko
            Path:
            src/main/java/hudson/plugins/performance/PerformancePublisher.java
            src/test/java/hudson/plugins/performance/PerformancePublisherTest.java
            src/test/java/hudson/plugins/performance/constraints/ConstraintTest.java
            http://jenkins-ci.org/commit/performance-plugin/a670083b8e07768d02dcafd6e8b279fb5ff58633
            Log:
            Merge pull request #82 from daspilker/JENKINS-41086

            JENKINS-41086 avoid wildcard in @DataBoundConstructor

            Compare: https://github.com/jenkinsci/performance-plugin/compare/2c37d5350b30...a670083b8e07

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrey Pokhilko Path: src/main/java/hudson/plugins/performance/PerformancePublisher.java src/test/java/hudson/plugins/performance/PerformancePublisherTest.java src/test/java/hudson/plugins/performance/constraints/ConstraintTest.java http://jenkins-ci.org/commit/performance-plugin/a670083b8e07768d02dcafd6e8b279fb5ff58633 Log: Merge pull request #82 from daspilker/ JENKINS-41086 JENKINS-41086 avoid wildcard in @DataBoundConstructor Compare: https://github.com/jenkinsci/performance-plugin/compare/2c37d5350b30...a670083b8e07

              People

              • Assignee:
                undera Andrey Pokhilko
                Reporter:
                i069846 Surendran Manickam
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: