process-services

Clone Tools
  • last updated a few minutes ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Some fixed to `DefaultExecHandle` to ensure listeners are notified before `waitForFinish()` completes and that exceptions thrown by the listeners are handled and forwarded to the waiting thread.

  1. … 2 more files in changeset.
Changed process execution infrastructure so that it no longer creates 2 threads to forward content to the process' stdin when there is nothing to forward (which is the default).

  1. … 14 more files in changeset.
Changed the process forking infrastructure so that it attempts to reuse threads rather than creating 3 or more threads per process that is forked.

There is now a global `ExecFactory` service that manages the infrastructure, including a pool of threads. It provides various factory methods to create instances of `ExecHandleBuilder`, `ExecAction`, `JavaExecHandleBuilder` and `JavaExecAction` backed by this infrastructure.

Replaced all direct instantiation of these types with usages of these factory methods.

  1. … 43 more files in changeset.
Favour declarative plugin application in build scripts

  1. … 26 more files in changeset.
Immediately stop thread if when process finishes

  1. … 7 more files in changeset.
Copy under lock, iterate out of lock

Fix `ConcurrentModificationException`

This commit adds guards around `holder` to make sure the list is not modified concurrently.

This fixes #2452, which was seen under heavy load.

Replace usages of org.gradle.api.Nullable

With javax.annotation.Nullable.

  1. … 460 more files in changeset.
Simplify executor relationships

  1. … 46 more files in changeset.
Delay memory info until first interval has passed

Add missing type safe collections setters on *ForkOptions & *ExecSpec

  1. … 10 more files in changeset.
Fix NativeOsxAvailableMemory error handling

This fixes ApplyPluginIntegSpec that generates ProjectBuilder based

tests which in turn doesn’t have native integrations enabled.

Sample macOS system memory using native-platform instead of vm_stat

See #1270

  1. … 2 more files in changeset.
Changed a couple more projects to use `java-library` plugin. Also inject Groovy as a test compile dependency for all projects, and removed the declaration from various project's build files.

  1. … 33 more files in changeset.
Make Os/JvmMemoryInfo only provide snapshots

  1. … 3 more files in changeset.
process-services: properly cleanup DefaultMemoryManagerTest

process-services: properly cleanup DefaultMemoryManagerTest

Use an approximation for memory usage when it hasn't been reported

  1. … 5 more files in changeset.
Cleanup of memory interfaces

Removing unnecessary throws

Remove now unused MaximumHeapHelper

Less frequently used idle worker daemons memory based expiration

Less frequently used idle worker daemons are expired when available system memory gets below a threshold.

Expiration strategy is triggered both by memory sampling and when the build daemon is about to fork a new process, or a new worker daemon. It will attempt to free enough system memory to fit the new process below the threshold according to it's fork options.

This implementation does an approximation on the amount of memory held by worker daemons, using their max heap setting instead of their committed memory. This will be fixed in subsequent changes.

  1. … 17 more files in changeset.
Move min free memory threshold declaration into DefaultMemoryManager

So we use the same in both the build daemon and worker processes

and don’t repeat it in two places.

  1. … 2 more files in changeset.
Single ExecutorFactory.createScheduled() method

We only need fixed-size single-threaded scheduled executors.

Use such executors for build daemon gc health checks, expiration checks

and memory sampling.

gradle/performance#298

  1. … 7 more files in changeset.
First stab at worker processes providing jvm memory information

  1. … 21 more files in changeset.
Tightening up test for memory status updates

Revert "Fix flakiness due to the MemoryStatus output"

This reverts commit ca754a8b507894359745c79d3129bab4bab78990.

Do not log failure to collect memory status at warn level

Refine memory sampling event publishing

Merge MemoryStatusBroadcaster into MemoryManager

Broadcast start/stop is now isolated in MemoryManager

DaemonHealthStats wait for one JVM memory event

Strengthen tests around health logging

Services depend on ExecutorFactory to use ScheduledExecutorServices

And stop them properly

  1. … 13 more files in changeset.
Move memory health types from :core to :processServices

  1. … 26 more files in changeset.