-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [timeseries][example] with many jobs to reproduce front end performance issues * [timeseries] bump react-select to 2.3.0 as it appears to be much performant with many items looks like w/o much changes, but in case: https://react-select.com/upgrade-guide * [timeseries][jobs] improvements - avoid reloading jobs_definition too often - update screen only if paused jobs changed (fixes the popup disappearing while opening it) - force refresh on job action (prevents inconsistent ui / backend states) * [timeseries] downgrade react-select to 1.3.0 as v2 requires much more changes :/ should be better though * [timeseries][example] with many jobs fix at some point it overflows * [timeseries][jobs] fix filtering / ordering (props) and initial loading * [examples] move TestTimeSeriesWithManyJobs to test Also, include Tests in writeClasspath for loop support * [examples] TestTimeSeriesWithManyJobs long ids / hundreds of jobs tags * [timeseries] Add PostEventSource to replace eventsource (GET) with poller (POST) * [timeseries] PostEventSource: statistics * [timeseries] PostEventSource: executions * [timeseries] PostEventSource: calendar * [timeseries] PostEventSource: calendar/focus * [timeseries] js const vs let * [timeseries] extract calendar/focus logic and support GET and POST in order not to break external dependencies on calendar/focus
- Loading branch information
Showing
12 changed files
with
548 additions
and
385 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
examples/src/test/scala/com/criteo/cuttle/examples/TestTimeSeriesWithManyJobs.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Test: Cuttle timeseries with many jobs! | ||
|
||
// This a very simple cuttle project using the time series scheduler | ||
// to execute a lot of jobs to do load tests | ||
package com.criteo.cuttle.examples | ||
|
||
import com.criteo.cuttle._ | ||
import com.criteo.cuttle.timeseries._ | ||
import java.time.ZoneOffset.UTC | ||
import java.time._ | ||
|
||
import scala.concurrent.Future | ||
import scala.concurrent.duration._ | ||
|
||
object TestTimeSeriesWithManyJobs { | ||
|
||
def main(args: Array[String]): Unit = { | ||
|
||
val start: Instant = LocalDate.now.atStartOfDay.toInstant(UTC) | ||
|
||
val jobs: Workflow = (1 to 1500).toArray | ||
.map({ i => | ||
Job(s"hello-with-a-relatively-long-id-just-for-the-fun-to-break-things$i", | ||
daily(UTC, start), | ||
s"Hello $i", | ||
tags = Set(Tag("hello"), Tag(s"hello-${i / 100}xx"))) { implicit e => | ||
val partitionToCompute = e.context.start + "-" + e.context.end | ||
e.streams.info(s"Hello $i for $partitionToCompute") | ||
Future.successful(Completed) | ||
} | ||
}) | ||
.foldLeft(Workflow.empty)(_ and _) | ||
|
||
val world: Job[TimeSeries] = Job("world", daily(UTC, start), "World", tags = Set(Tag("world"))) { implicit e => | ||
e.streams.info("World!") | ||
e.park(1.seconds).map(_ => Completed) | ||
} | ||
|
||
CuttleProject("Hello World", version = "123", env = ("dev", false)) { | ||
world dependsOn jobs | ||
}.start(logsRetention = Some(1.minute)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.