Uploaded image for project: 'Nuxeo ECM Build/Test Environment'
  1. Nuxeo ECM Build/Test Environment
  2. NXBT-3757

Make possible to record flamegraph during nuxeo-lts utests

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Continuous Integration

      Description

      We want to be able to record flamegraph for our utests execution.

      This mechanism would be enabled if the PR contains a specific label.

      A tentative to record these flamegraphs have been done within: https://github.com/nuxeo/nuxeo-lts/pull/1356

      It mainly consists to download the async-profiler binary:

          stage('Download Async-Profiler') {
            steps {
              container('maven') {
                sh "wget -O /tmp/async-profiler-2.9-linux-x64.tar.gz https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.9/async-profiler-2.9-linux-x64.tar.gz"
                sh "mkdir -p ${ASYNC_PROFILER_ROOT_PATH}"
                sh "tar -C ${ASYNC_PROFILER_ROOT_PATH} --strip-components=1 -xzvf /tmp/async-profiler-2.9-linux-x64.tar.gz async-profiler-2.9-linux-x64"
                // now the profiler is available at:
                // /tmp/async-profiler/build/libasyncProfiler.so
              }
            }
          }
      

      And then set the async-profiler java agent to the surefire arguments:

      
              MAVEN_ARGS = "${MAVEN_ARGS} ${MAVEN_FAIL_ARGS} -Dit.memory.argLine=\"-Xms4g -Xmx4g -agentpath:${ASYNC_PROFILER_ROOT_PATH}/build/libasyncProfiler.so=start,event=cpu,file=\\\${project.build.directory}/flamegraph.html\""
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                kleturc Kevin Leturc
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: