Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

val seleniumVersion = "3.141.59"

repositories {
mavenLocal()
}

plugins {
kotlin("jvm").version("1.4.10")
id("com.github.johnrengelman.shadow").version("2.0.4")
Expand Down
3 changes: 3 additions & 0 deletions gradle/dependency-locks/compile.lockfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
6 changes: 3 additions & 3 deletions gradle/dependency-locks/compileClasspath.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
com.atlassian.data:random-data:1.4.3
com.atlassian.performance.tools:concurrency:1.1.0
com.atlassian.performance.tools:io:1.2.0
com.atlassian.performance.tools:jira-actions:3.13.4
com.atlassian.performance.tools:jira-software-actions:1.3.3
com.atlassian.performance.tools:jvm-tasks:1.2.0
com.atlassian.performance.tools:jira-actions:3.15.2-SNAPSHOT
com.atlassian.performance.tools:jira-software-actions:1.3.4-SNAPSHOT
com.atlassian.performance.tools:jvm-tasks:1.2.1
com.atlassian.performance:selenium-js:1.0.1
com.github.stephenc.jcip:jcip-annotations:1.0-1
com.google.code.findbugs:jsr305:1.3.9
Expand Down
6 changes: 3 additions & 3 deletions gradle/dependency-locks/runtimeClasspath.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
com.atlassian.data:random-data:1.4.3
com.atlassian.performance.tools:concurrency:1.1.0
com.atlassian.performance.tools:io:1.2.0
com.atlassian.performance.tools:jira-actions:3.13.4
com.atlassian.performance.tools:jira-software-actions:1.3.3
com.atlassian.performance.tools:jvm-tasks:1.2.0
com.atlassian.performance.tools:jira-actions:3.15.2-SNAPSHOT
com.atlassian.performance.tools:jira-software-actions:1.3.4-SNAPSHOT
com.atlassian.performance.tools:jvm-tasks:1.2.1
com.atlassian.performance:selenium-js:1.0.1
com.github.stephenc.jcip:jcip-annotations:1.0-1
com.google.code.findbugs:jsr305:1.3.9
Expand Down
8 changes: 4 additions & 4 deletions gradle/dependency-locks/testCompileClasspath.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ com.atlassian.performance.tools:concurrency:1.1.0
com.atlassian.performance.tools:docker-infrastructure:0.3.3
com.atlassian.performance.tools:infrastructure:4.15.0
com.atlassian.performance.tools:io:1.2.0
com.atlassian.performance.tools:jira-actions:3.13.4
com.atlassian.performance.tools:jira-software-actions:1.3.3
com.atlassian.performance.tools:jvm-tasks:1.2.0
com.atlassian.performance.tools:ssh:2.3.1
com.atlassian.performance.tools:jira-actions:3.15.2-SNAPSHOT
com.atlassian.performance.tools:jira-software-actions:1.3.4-SNAPSHOT
com.atlassian.performance.tools:jvm-tasks:1.2.1
com.atlassian.performance.tools:ssh:2.4.0
com.atlassian.performance:selenium-js:1.0.1
com.fasterxml.jackson.core:jackson-annotations:2.10.3
com.fasterxml.jackson.core:jackson-core:2.10.3
Expand Down
8 changes: 4 additions & 4 deletions gradle/dependency-locks/testRuntimeClasspath.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ com.atlassian.performance.tools:concurrency:1.1.0
com.atlassian.performance.tools:docker-infrastructure:0.3.3
com.atlassian.performance.tools:infrastructure:4.15.0
com.atlassian.performance.tools:io:1.2.0
com.atlassian.performance.tools:jira-actions:3.13.4
com.atlassian.performance.tools:jira-software-actions:1.3.3
com.atlassian.performance.tools:jvm-tasks:1.2.0
com.atlassian.performance.tools:ssh:2.3.1
com.atlassian.performance.tools:jira-actions:3.15.2-SNAPSHOT
com.atlassian.performance.tools:jira-software-actions:1.3.4-SNAPSHOT
com.atlassian.performance.tools:jvm-tasks:1.2.1
com.atlassian.performance.tools:ssh:2.4.0
com.atlassian.performance:selenium-js:1.0.1
com.fasterxml.jackson.core:jackson-annotations:2.10.3
com.fasterxml.jackson.core:jackson-core:2.10.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ import com.atlassian.performance.tools.io.api.ensureParentDirectory
import com.atlassian.performance.tools.jiraactions.api.SeededRandom
import com.atlassian.performance.tools.jiraactions.api.WebJira
import com.atlassian.performance.tools.jiraactions.api.measure.ActionMeter
import com.atlassian.performance.tools.jiraactions.api.measure.DrillDownHook
import com.atlassian.performance.tools.jiraactions.api.measure.output.AppendableActionMetricOutput
import com.atlassian.performance.tools.jiraactions.api.measure.output.ThrowawayActionMetricOutput
import com.atlassian.performance.tools.jiraactions.api.memories.User
import com.atlassian.performance.tools.jiraactions.api.memories.UserMemory
import com.atlassian.performance.tools.jiraactions.api.memories.adaptive.AdaptiveUserMemory
import com.atlassian.performance.tools.jiraactions.api.scenario.Scenario
import com.atlassian.performance.tools.jiraactions.api.w3c.JavascriptW3cPerformanceTimeline
import com.atlassian.performance.tools.virtualusers.api.VirtualUserNodeResult
import com.atlassian.performance.tools.virtualusers.api.VirtualUserOptions
import com.atlassian.performance.tools.virtualusers.api.browsers.Browser
Expand Down Expand Up @@ -167,6 +169,7 @@ internal class LoadTest(
CloseableThreadContext.push("applying load #${segment.id}").use {
val rampUpWait = load.rampInterval.multipliedBy(segment.index.toLong())
logger.info("Waiting for $rampUpWait")
logger.info("I WILL MEASURE JS METRICS")
Thread.sleep(rampUpWait.toMillis())
createVirtualUser(
jira = WebJira(
Expand All @@ -176,6 +179,7 @@ internal class LoadTest(
),
actionMeter = ActionMeter.Builder(AppendableActionMetricOutput(segment.actionOutput))
.virtualUser(segment.id)
.appendPostMetricHook(DrillDownHook(JavascriptW3cPerformanceTimeline(segment.driver.getDriver())))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The meaningful change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't need that for testing. Any Scenario (e.g. one in jira-actions module or in any other repo) can override the ActionMeter passed onto its actions. And you can create a modified copy of any ActionMeter via its Builder

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, didn't think about that, I should have asked earlier x)
So where do you think should the hook be placed finally - here or in the com.atlassian.jira.test.performance.scenario.AllActionScenario?

Copy link
Contributor

@dagguh dagguh Jul 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ActionMeter already has default postMetricHooks as an empty list. The JavascriptW3cPerformanceTimeline should remain opt-in, because it has a big storage and transfer overhead. So basically, it should not be put in to any JPT API.

The end-consumers like our internal regression tests or hardware recommendations can opt-in if they want to. You already opted-in the AbstractJiraCoreScenario (just tests, not API) in jira-actions, so it got covered by the JiraCoreScenarioIT integration test. 👌
PS. now I also see that there's a dedicated JiraCoreScenarioDevloop in there for fast local devloop.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, each JPT lib should be self-sufficient in terms of devloop. There's a high chance it already has the necessary testing harness. If not, it should be added/extended.

.build(),
taskMeter = ActionMeter.Builder(AppendableActionMetricOutput(segment.taskOutput))
.virtualUser(segment.id)
Expand Down