Commit graph

33 commits

Author SHA1 Message Date
João Duarte
0d6117173f
update multiple dependencies (#16136)
This upgrades multiple java libraries:

* snakeyaml
* shadow
* gradle
* guava
* commons-io
* commons-logging
* commons-codec
* commons-compress
* commons-lang3
* commons-csv
* log4j
* google-java-format
* httpclient
* httpcore
* javassist
* jackson
* jackson-databind
* wiremock-standalone

Gems:

* rack
*sinatra
*octokit
* gems
* rake
* webmock

Also upgrades Java to 17.0.11+9.

Leftover upgrades:

* commons-csv 1.8 breaks license checker
* janino 3.1.12 breaks java tests
* log4j 2.21.0 breaks java compilation
2024-05-08 09:13:41 +01:00
Ry Biesemeyer
9e452d2e54
Update junit 4 13 (#16138)
* test-deps: update junit to latest 4.13

* test-deps: address deprecation of ExpectedException

* test-deps: use org.junit.Assert.assertThrows
2024-05-03 13:49:16 -07:00
João Duarte
1d1fa7a471
update commons-io commons-compress jrjackson databind (#15125)
* update commons-io to 2.13.0 and commons-compress to 1.23.0

* update databind and jackson
2023-06-29 09:02:32 +02:00
Andrea Selva
a126364102
Centralized version definition for snakeyaml and shadow plugin used in buildscripts (#14952)
Create a variable in the Gradle's 'ext' map to store the versions of libraries and plugins used across the various .gradle files.
2023-03-10 16:50:16 +01:00
João Duarte
15b2d88647
bump snakeyaml to 1.33 (#14881)
ensure logstash-core picks up 1.33 as well from jackson-data format-yaml's
transititive dependency.
2023-02-09 18:20:03 +00:00
Ry Biesemeyer
6e0b365c92
Feature: flow metrics integration (#14518)
* Flow metrics: initial implementation (#14509)

* metrics: eliminate race condition when registering metrics

Ensure our fast-lookup and store tables cannot diverge in a race condition
by wrapping mutation of both in a single mutex and appropriately handle
another thread winning the race to the lock by using the value that it
persisted instead of writing our own.

* metrics: guard against intermediate namespace conflicts

 - ensures our safeguard that prevents using an existing metric as a namespace
   is applied to _intermediate_ nodes, not just the tail-node, eliminating a
   potential crash when sending `fetch_or_store` to a metric object that is not
   expected to respond to `fetch_or_store`.
 - uses the atomic `Concurrent::Map#compute_if_absent` instead of the
   non-atomic `Concurrent::Map#fetch_or_store`, which is prone to
   last-write-wins during contention (as-written, this method is only
   executed under lock and not subject to contention)
 - uses `Enumerable#reduce` to eliminate the need for recursion

* flow: introduce auto-advancing UptimeMetric

* flow: introduce FlowMetric with minimal current/lifetime rates

* flow: initialize pipeline metrics at pipeline start

* Controller and service layer implementation for flow metrics. (#14514)

* Controller and service layer implementation for flow metrics.

* Add flow metrics to unit test and benchmark cli definitions.

* flow: fix tests for metric types to accomodate new one

* Renaming concurrency and backpressure metrics.

Rename `concurrency` to `worker_concurrency ` and `backpressure` to `queue_backpressure` to provide proper scope naming.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* metric: register flow metrics only when we have a collector (#14529)

the collector is absent when the pipeline is run in test with a
NullMetricExt, or when the pipeline is explicitly configured to
not collect metrics using `metric.collect: false`.

* Unit tests and integration tests added for flow metrics. (#14527)

* Unit tests and integration tests added for flow metrics.

* Node stat spec and pipeline spec metric updates.

* Metric keys statically imported, implicit error expectation added in metric spec.

* Fix node status API spec after renaming flow metrics.

* Removing flow metric from PipelinesInfo DS (used in peridoci metric snapshot), integration QA updates.

* metric: register flow metrics only when we have a collector (#14529)

the collector is absent when the pipeline is run in test with a
NullMetricExt, or when the pipeline is explicitly configured to
not collect metrics using `metric.collect: false`.

* Unit tests and integration tests added for flow metrics.

* Node stat spec and pipeline spec metric updates.

* Metric keys statically imported, implicit error expectation added in metric spec.

* Fix node status API spec after renaming flow metrics.

* Removing flow metric from PipelinesInfo DS (used in peridoci metric snapshot), integration QA updates.

* Rebasing with feature branch.

* metric: register flow metrics only when we have a collector

the collector is absent when the pipeline is run in test with a
NullMetricExt, or when the pipeline is explicitly configured to
not collect metrics using `metric.collect: false`.

* Apply suggestions from code review

Integration tests updated to test capturing the flow metrics.

* Flow metrics expectation updated in tegration tests.

* flow: refine integration expectations for reloads/monitoring

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
Co-authored-by: Mashhur <mashhur.sattorov@gmail.com>

* metric: add ScaledView with sub-unit precision to UptimeMetric (#14525)

* metric: add ScaledView with sub-unit precision to UptimeMetric

By presenting a _view_ of our metric that maintains sub-unit precision,
we prevent jitter that can be caused by our periodic poller not running at
exactly our configured cadence.

This is especially important as the UptimeMetric is used as the _denominator_ of
several flow metrics, and a capture at 4.999s that truncates to 4s, causes the
rate to be over-reported by ~25%.

The `UptimeMetric.ScaledView` implements `Metric<Number>`, so its full
lossless `BigDecimal` value is accessible to our `FlowMetric` at query time.

* metrics: reduce window for too-frequent-captures bug and document it

* fixup: provide mocked clock to flow metric

* Flow metrics cleanup (#14535)

* flow metrics: code-style and readability pass

* remove unused imports

* cleanup: simplify usage of internal helpers

* flow: migrate internals to use OptionalDouble

* Flow metrics global (#14539)

* flow: add global top-level flows

* docs: add flow metrics

* Top level flow metrics unit tests added. (#14540)

* Top level flow metrics unit tests added.

* Add unit tests when config reloads, make sure top-level flow metrics didn't get reset.

* Apply suggestions from code review

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Validating against Hash test cases updated.

* For the safety check against exact type in unit tests.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* docs: section links and clarity in node stats API flow metrics

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
Co-authored-by: Mashhur <mashhur.sattorov@gmail.com>
2022-09-19 14:21:45 -07:00
João Duarte
4919286e42
rename references of master branch to main branch (#13301) 2021-11-08 10:23:46 +00:00
Andrea Selva
728289e862
Switched to Gradle 7 (#13184)
This commit:
- Updates the Gradle wrapper to version 7.2
- Remove the deprecated jcenter and where it was used to retrieve Gradle's plugins it switches to gradlePluginPortal
- Insert an explicit dependency from test task to the log4j.properties manipulation task ("copyProductionLog4jConfiguration") used in integration
2021-09-08 10:42:13 +02:00
Andrea Selva
a7f6c01a3a
Update Snakeyaml version to 1.29 (#13129)
Snakeyaml is used only in the build chain, and it's not packaged with Logstash
2021-08-16 10:33:47 +02:00
Andrea Selva
b722360ebd
Fix LS benchmarking tool to work with releases >= 7.10.0 (#13052)
Starting with version 7.10.0 the name of LS packages changed, adding os and CPU architecture in the name. This change broke the downloading of those from the benchmarking tool. This commit fixes it, composing correctly the name, based on the version it has to download.
2021-07-06 16:04:29 +02:00
IvoGoman
7b855820ed
Adds option to pass custom data to the benchmark CLI (#12437) 2021-03-25 15:00:57 -04:00
Rob Bavey
72e26f9957
Fix Benchmarking tool (#12736)
Since the introduction of this block:

```
 "pipeline" : {
    "workers" : 16,
    "batch_size" : 125,
    "batch_delay" : 50
  },
```

to the node stats API, the benchmarking tool has been broken. This commit fixes the
tool, and updates the payload in the tests to reflect the current payload.
2021-03-10 11:19:15 -05:00
Joao Duarte
fd0959e4cb update benchmark-cli dependencies
Updated elasticsearch only to 5.6.16 as 6.x introduced a deprecation in
the performRequest method and needs further refactor
2020-07-03 06:42:31 -07:00
Joao Duarte
1ebf1b2b13 update commons-codec to 1.14 2020-06-09 06:26:31 -07:00
andsel
386c263a71 Fix: rounded to 1 second in nanos to avoid random NaN error
Conversion to seconds of values under 1_000_000_000 nanoseconds translates to value 0, and this led to NaN when used as denominator in a division.
A value of 996_920_400 nanoseconds once converted to seconds is not rounded to 1 second by to 0, this manifest on Windows OS
2020-05-11 14:23:52 +02:00
Joao Duarte
6cc4de77e3 update guava and httpclient dependencies
Fixes #11791
2020-04-15 13:49:54 +00:00
João Duarte
128bee592b
update benchmark cli dependencies (#11766)
also use jackson version in benchmark-cli from versions.yml
2020-04-08 14:55:17 +01:00
Rob Bavey
58314a7f0e
Update gradle version to 6.3 (#11742)
* Update gradle version to 6.3

Gradle versions prior to 6.3 cannot run under JDK14.
This commit upgrades the version of Gradle to 6.3, and removes all deprecation warnings that can currently be removed.

Changes include:
* Increase gradle memory to 2g
* Increase gradle memory in the license check job to 2g
* Replace use of `testCompile`
* Replace `runtime` with `runtimeOnly`
* Remove`compile` depedencies from gradle files
* Replace deprecated archive methods
* Fix dependencies report build
* Make jruby dependencies 'api', fix archiveVersion
* Set `duplicatesStrategy` for all tasks of type Copy
* Use `configureEach` for global 'withType' calls
** Use the recommended Tasks API calls
(https://blog.gradle.org/preview-avoiding-task-configuration-time)
* Run `./gradlew wrapper` earlier to improve caching
* Use copy with chown for resources that need to be run during `./gradlew wrapper`
2020-04-07 12:49:36 -04:00
João Duarte
e9c9865f40
Add apache and elastic license headers to source code files (#11673)
* add license header to ruby and java files
* add license header to erb and rake files
* add license headers to gradle files
2020-03-11 11:53:38 +00:00
João Duarte
e807a9e030
Update gradle wrapper to 5.6.4 (#11389)
* upgrade gradle wrapper to the latest 5.x release
* update shadow plugin to 4.x for gradle compatibility
* change dependency declaration to work around [breaking change in annotation processing](https://docs.gradle.org/current/userguide/upgrading_version_4.html#rel4.6:annotation_processor_configuration)
2019-12-06 15:39:17 +00:00
Aarti Gupta
311ea143de Enhancements to Logstash Benchmarking Tool (#10253)
* Adding support for -
1. Custom Data Sets
2. Added heap used statistics to results
2019-02-28 11:45:32 -06:00
Dan Hermann
48594baf2b Add license reporting task
Fixes #9331
2018-05-02 15:35:42 +00:00
Armin
01c99ccf11 #8360 fix tests by enforcing IPV4 in Benchmark tool UTs
Fixes #8372
2017-09-23 06:50:39 +00:00
Armin
777df441b1 BENCHMARK: Add Workercount and Batch size as configurable settings in benchmark
Fixes #8217
2017-09-13 13:27:16 +00:00
Armin
7c56407f1d MINOR: Cleanup out directory via gradle clean task
Fixes #8085
2017-08-28 14:40:40 +00:00
Armin
f639df97cd Benchmark: General cleanup
Fixes #7875
2017-08-02 15:16:17 +00:00
Armin
3da9dc146f Benchmark: fix cache use
Fixes #7875
2017-08-02 15:16:17 +00:00
Armin
3fb0498a98 Benchmark: Allow setting a repeat count
Fixes #7864
2017-08-01 16:23:50 +00:00
Armin
fb487c58d3 #7784 ES benchmark result storage to ES
Fixes #7830
2017-07-28 06:59:01 +00:00
Armin
820c1a383a #7784 cleanup metric parser
Fixes #7816
2017-07-27 04:43:47 +00:00
Armin
18571f2b89 #7799 fix Windows incompatible Resource use + Windows incompatible use of /dev/null
Fixes #7800
2017-07-25 12:35:19 +00:00
Suyog Rao
b6bcbda8e4 bump master version to 7.0.0-alpha1 (#7791) 2017-07-24 11:51:40 -07:00
Armin
d9436dd760 Benchmark Tool
Fixes #7629
2017-07-24 15:46:30 +00:00