Skip to content

Commit

Permalink
Bump lets-plot to 2.2.1 and 3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
vlsi committed Dec 25, 2021
1 parent ac47049 commit 3236c61
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 66 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ jsoup.version=1.14.1
jtidy.version=r938
junit4.version=4.13.2
junit5.version=5.8.1
lets-plot-batik.version=2.2.0
lets-plot-kotlin-jvm.version=3.1.0
lets-plot-batik.version=2.2.1
lets-plot-kotlin-jvm.version=3.1.1
log4j.version=2.17.0
mail.version=1.5.0-b01
miglayout.version=5.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import jetbrains.letsPlot.geom.geomLine
import jetbrains.letsPlot.intern.toSpec
import jetbrains.letsPlot.label.ggtitle
import jetbrains.letsPlot.letsPlot
import jetbrains.letsPlot.scale.scaleXContinuous
import jetbrains.letsPlot.scale.scaleXTime
import jetbrains.letsPlot.theme
import org.apache.jmeter.threads.openmodel.ThreadSchedule
import org.apache.jmeter.threads.openmodel.ThreadScheduleStep
Expand All @@ -51,10 +51,15 @@ public class TargetRateChart : JPanel() {
layout = BorderLayout()
}

private var prevSteps: List<ThreadScheduleStep>? = null
private var prevTimes: DoubleArray? = null
private var prevRate: DoubleArray? = null

public fun updateSchedule(threadSchedule: ThreadSchedule) {
if (threadSchedule.steps == prevSteps) {
return
}
prevSteps = threadSchedule.steps
val timeValues = mutableListOf<Double>()
val rateValues = mutableListOf<Double>()
var time = 0.0
Expand Down Expand Up @@ -92,18 +97,9 @@ public class TargetRateChart : JPanel() {
}
prevTimes = time.copyOf()
prevRate = rate.copyOf()
val totalDuration = time.last()
val timeUnit = when {
totalDuration > MIN_TICKS_FOR_TIME_AXIS * TimeUnit.DAYS.asSeconds -> TimeUnit.DAYS
totalDuration > MIN_TICKS_FOR_TIME_AXIS * TimeUnit.HOURS.asSeconds -> TimeUnit.HOURS
totalDuration > MIN_TICKS_FOR_TIME_AXIS * TimeUnit.MINUTES.asSeconds -> TimeUnit.MINUTES
else -> TimeUnit.SECONDS
}
if (timeUnit != TimeUnit.SECONDS) {
val scale = 1.0 / timeUnit.asSeconds
for (i in time.indices) {
time[i] *= scale
}
val timeScale = TimeUnit.SECONDS.toMillis(1).toDouble()
for (i in time.indices) {
time[i] *= timeScale
}
val maxRate = rate.maxOrNull() ?: 0.0
val rateUnit = rateUnitFor(maxRate)
Expand All @@ -120,16 +116,16 @@ public class TargetRateChart : JPanel() {
}
}
removeAll()
add(createChart(time = time, rate = rate, timeUnit = timeUnit, rateUnit = rateUnit), BorderLayout.CENTER)
add(createChart(time = time, rate = rate, rateUnit = rateUnit), BorderLayout.CENTER)
}

private fun createChart(time: DoubleArray, rate: DoubleArray, timeUnit: TimeUnit, rateUnit: TimeUnit): JComponent {
private fun createChart(time: DoubleArray, rate: DoubleArray, rateUnit: TimeUnit): JComponent {
val data = mapOf(
"time" to time,
"rate" to rate
)
val plot = letsPlot(data) + geomLine { x = "time"; y = "rate" } +
scaleXContinuous("Time, " + timeUnit.name.lowercase(), expand = listOf(0, 0)) +
scaleXTime("Time since test start", expand = listOf(0, 0)) +
ggtitle("Target load rate per " + rateUnit.name.lowercase().removeSuffix("s")) +
theme(axisTitleY = "blank")

Expand Down
18 changes: 9 additions & 9 deletions src/dist/src/dist/expected_release_jars.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
29371,annotations-23.0.0.jar
2387,apiguardian-api-1.1.0.jar
122004,asm-9.2.jar
517353,base-portable-jvm-2.2.0.jar
518460,base-portable-jvm-2.2.1.jar
485809,batik-anim-1.14.jar
424624,batik-awt-util-1.14.jar
703757,batik-bridge-1.14.jar
Expand Down Expand Up @@ -92,8 +92,8 @@
22357,kotlin-stdlib-jdk7-1.6.0.jar
16201,kotlin-stdlib-jdk8-1.6.0.jar
792176,kotlinx-html-jvm-0.7.3.jar
191102,lets-plot-batik-2.2.0.jar
3995999,lets-plot-common-2.2.0.jar
181223,lets-plot-batik-2.2.1.jar
4025480,lets-plot-common-2.2.1.jar
208235,log4j-1.2-api-2.17.0.jar
301776,log4j-api-2.17.0.jar
1789339,log4j-core-2.17.0.jar
Expand All @@ -107,11 +107,11 @@
65261,oro-2.0.8.jar
1307434,ph-commons-10.1.2.jar
506616,ph-css-6.3.4.jar
640740,plot-api-jvm-3.1.0.jar
882161,plot-base-portable-jvm-2.2.0.jar
847234,plot-builder-portable-jvm-2.2.0.jar
115295,plot-common-portable-jvm-2.2.0.jar
744679,plot-config-portable-jvm-2.2.0.jar
642167,plot-api-jvm-3.1.1.jar
891618,plot-base-portable-jvm-2.2.1.jar
845777,plot-builder-portable-jvm-2.2.1.jar
116030,plot-common-portable-jvm-2.2.1.jar
749095,plot-config-portable-jvm-2.2.1.jar
11369,reactive-streams-1.0.3.jar
1315838,rhino-1.7.13.jar
1242230,rsyntaxtextarea-3.1.3.jar
Expand All @@ -123,7 +123,7 @@
2539,swing-extensions-visual-padding-0.1.3.jar
734528,tika-core-1.27.jar
1397879,tika-parsers-1.27.jar
173926,vis-svg-portable-jvm-2.2.0.jar
174661,vis-svg-portable-jvm-2.2.1.jar
3154938,xalan-2.7.2.jar
1386502,xercesImpl-2.12.1.jar
220536,xml-apis-1.4.01.jar
Expand Down
18 changes: 0 additions & 18 deletions src/licenses/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -135,24 +135,6 @@ val gatherBinaryLicenses by tasks.registering(GatherLicenseTask::class) {
expectedLicense = SpdxLicense.MIT
}

for (
a in listOf(
"lets-plot-kotlin-jvm",
"lets-plot-common",
"plot-config-portable-jvm",
"plot-builder-portable-jvm",
"plot-base-portable-jvm",
"plot-common-portable-jvm",
"vis-svg-portable-jvm",
"base-portable-jvm"
)
) {
overrideLicense("org.jetbrains.lets-plot:$a") {
expectedLicense = SpdxLicense.MIT
licenseFiles = "lets-plot"
}
}

overrideLicense("com.sun.mail:all:1.5.0-b01") {
// Multiple licenses, specify explicitly
expectedLicense = SimpleLicense("CDDL", uri("http://www.sun.com/cddl")) and SimpleLicense("GPLv2+CE", uri("https://glassfish.java.net/public/CDDL+GPL_1_1.html"))
Expand Down
21 changes: 0 additions & 21 deletions src/licenses/licenses/lets-plot/LICENSE

This file was deleted.

0 comments on commit 3236c61

Please sign in to comment.