Commit Graph

34 Commits

Author SHA1 Message Date
Joakim Erdfelt 60d8661890 Merge `jetty-9.4.x` into `jetty-10.0.x`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	examples/embedded/src/main/java/org/eclipse/jetty/embedded/Http2Server.java
#	jetty-ant/src/main/java/org/eclipse/jetty/ant/AntWebInfConfiguration.java
#	jetty-http/src/test/java/org/eclipse/jetty/http/QuotedCSVTest.java
#	jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java
#	jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionDataStore.java
#	jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/OSGiWebInfConfiguration.java
#	jetty-util/src/main/java/org/eclipse/jetty/util/StringUtil.java
#	jetty-util/src/test/java/org/eclipse/jetty/util/StringUtilTest.java
#	jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java
#	jetty-websocket/javax-websocket-tests/src/main/java/org/eclipse/jetty/websocket/javax/tests/WSServer.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WSServer.java
#	tests/test-integration/src/test/java/org/eclipse/jetty/test/support/XmlBasedJettyServer.java
2019-06-13 14:14:42 -05:00
Joakim Erdfelt 33fe55c339 Issue #3708 - use StringUtil alternatives for known slow JVM impls.
+ StringUtil.replace()
+ StringUtil.replaceFirst()
+ StringUtil.sanitizeFileSystemPath()

Change existing usages of String.replace() to either
use new StringUtil.replace() or other methods elsewhere
that better suit that specific need.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-06-11 11:25:50 -05:00
Simone Bordet 5b5848eb73
Merge pull request #3716 from eclipse/jetty-9.4.x-log-condense-improvement
Issue #3715 - Improve Log condensePackageString() performance
2019-06-06 22:48:25 +02:00
Joakim Erdfelt 4e00f88946 Issue #3715 - Improve Log condensePackageString() performance
+ Removed regex usage
+ More unit tests
+ Adding jmh test for improvements (see PR #3716 for published results
  of old vs new implementation)

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-05-31 10:57:38 -05:00
Greg Wilkins 4d60260cd3 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-9.4.x-3681-HttpFieldsOptimize 2019-05-31 13:04:12 +02:00
Greg Wilkins 0c61ec3e4d
Fix idle race by allowing idle count to go negative (#3694)
* Fix idle race by allowing idle count to go negative
* Fixed flakey dump test
* don't exit Runner on exceptions
* cleanup after pair programming with sbordet
* longer benchmark runs
* optimized by removing need to check isRunning

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Code reformatting.
* Fixed stop logic.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-05-29 17:24:01 +02:00
Greg Wilkins cf9c238721 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-9.4.x-3681-HttpFieldsOptimize 2019-05-26 16:18:13 +02:00
Olivier Lamy 0ebc0fa9ce
Issue #3659 jmh tests are creating to many tmp files and never cleaned (#3650)
* cleanup tmp files created by jmh tests

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-05-23 14:12:44 +10:00
Olivier Lamy f2c59a3cb7
add convenient StringUtil isEmpty method (#3687)
* add StringUtil.isEmpty

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-05-23 09:01:36 +10:00
Greg Wilkins 4dc004cf96 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-9.4.x-3681-HttpFieldsOptimize
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-05-22 23:26:48 +02:00
Simone Bordet fd542c2856
Merge pull request #3591 from eclipse/jetty-9.4.x-3550-QueuedThreadPool-cleanup
Jetty 9.4.x 3550 queued thread pool cleanup
2019-05-22 18:18:49 +02:00
Greg Wilkins 8578e684d8 Issue #3681
Even more benchmark variations

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-05-22 11:13:08 +02:00
Greg Wilkins ab8670370f Issue #3681
More benchmark variations

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-05-22 09:28:55 +02:00
Greg Wilkins b0985c4ad4 Issue #3681
added iteration test to benchmark

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-05-21 15:06:16 +02:00
Greg Wilkins 1458854d24 Issue #3681
Use LinkedHashMap<List<Pair>>

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-05-21 13:59:52 +02:00
Greg Wilkins 5f1a8696b1 Issue #3681
Benchmark possible HttpFields lookup mechanisms

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-05-21 12:39:28 +02:00
Greg Wilkins 2b227f121e Issue #3550
I have modified the JMH benchmark to look at latency (by measuring throughput) for executing a job with low, medium and high concurrency.     It looks like the JREs threadpool is not so bad in some load ranges, but once things get busy we are still a bit better.   No significant difference is seen between previous QTP impl and the one in this PR.

```

Benchmark                     (size)  (type)   Mode  Cnt       Score        Error  Units
ThreadPoolBenchmark.testFew      200     ETP  thrpt    3  129113.271 ±  10821.235  ops/s
ThreadPoolBenchmark.testFew      200     QTP  thrpt    3  122970.794 ±   8702.327  ops/s
ThreadPoolBenchmark.testFew      200     QTP+ thrpt    3  121408.662 ±  12420.318  ops/s

ThreadPoolBenchmark.testSome     200     ETP  thrpt    3  277400.574 ±  34433.710  ops/s
ThreadPoolBenchmark.testSome     200     QTP  thrpt    3  244056.673 ±  60118.319  ops/s
ThreadPoolBenchmark.testSome     200     QTP+ thrpt    3  240686.913 ±  43104.941  ops/s

ThreadPoolBenchmark.testMany     200     ETP  thrpt    3  679336.308 ± 157389.044  ops/s
ThreadPoolBenchmark.testMany     200     QTP  thrpt    3  704502.083 ±  15624.325  ops/s
ThreadPoolBenchmark.testMany     200     QTP+ thrpt    3  708220.737 ±   3254.264  ops/s

```

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-05-17 15:35:18 +02:00
Joakim Erdfelt 076c6b1c71 Issue #2909 - adding jmh tests
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-05-15 10:08:11 +02:00
Greg Wilkins 8e4756b89c added benchmark
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-05-14 17:08:01 +02:00
olivier lamy aec2ebd27d issue #2878 add an aggregated javadoc jar excluding some tests packages
+ force attach and use default phase bind (package)
+ fixing some dependencies to build aggregate javadoc jar
+ configure release plugin to build aggregated javadoc jar
+ test javadoc build with jdk11 including aggregated javadoc
+ Fixing bad javadoc
+ Excluding tests from aggregate-javadoc
+ Cannot aggregate-javadoc on CI (requires clean build of snapshot to work)
+ standardizing javadoc config

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-02-18 17:44:51 -05:00
Olivier Lamy 9b7afd8a03
Happy new year!! (#3232)
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-01-01 11:52:16 +10:00
Greg Wilkins bda9307028
Merge pull request #3144 from lachlan-roberts/jetty-9.4.x
Issue #113 - CustomRequestLog
2018-11-29 09:29:43 +01:00
olivier lamy 7d5ed3089c jmh test has been moved in 10.0.x
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2018-11-21 14:39:08 +10:00
Lachlan Roberts 557f40f41f Issue #113 - CustomRequestLog
created new CustomRequestLog class

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-11-06 11:46:26 +01:00
Jan Bartel 5f94f249a7 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2018-11-06 10:29:10 +01:00
Greg Wilkins 67cef441b2
Support direct buffers in hpack (#3058)
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-11-05 14:05:02 +01:00
Greg Wilkins 254dc88743 Merge branch 'jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-11-01 20:24:43 +01:00
Greg Wilkins 161f1698cf
Jetty 9.4.x 3018 request logging bad messages (#3020)
Issue #3018 improve logging and handling of slow data rates.

* Slow data rates now result in aborted channels, but exception is still thrown.  Test for 408 in requestLog
* Updated many RequestLog usages to use Server.setRequestLog rather than a RequestLogHandler
* Fixed javadoc
* removed BadRequestLogHandlerTest (tested in RequestLogTest)
* added JMH to show the future of request logging for #113
* copyright header.
* Updates from review
* Revert to throwing BadMessageException
* BME ensures a 408 is logged rather than a 500

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-11-01 17:06:04 +01:00
Olivier Lamy 7dbe056521
Signed-off-by: olivier lamy <oliver.lamy@gmail.com> (#3035) 2018-10-29 17:14:59 +10:00
Simone Bordet ee0656f861 Issue #3010 - Moving old MultiPart Parser.
Originally moved to an internal package, it is still used by other
modules such as jetty-server and jetty-servlets, so it needs to
be in an exported package.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-10-23 15:57:52 +02:00
Joakim Erdfelt d77714698b Issue #3010 - Moving old MultiPart Parser
+ Moving MultiPartInputStreamParser from jetty-util to jetty-http/internal
+ Moving related classes ReadLineInputStream to jetty-http/internal
+ Moving related tests to jetty-http as well
+ Moved MultiPartFormDataCompliance to jetty-http
+ Renaming test to have same name as implementation

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2018-10-22 15:36:08 -05:00
Joakim Erdfelt a3f1592c50 Issue #2431 - Upgrade to Junit 5 (#2436)
+ Changes needed for new Junit 5
+ Migrating from Vintage junit API to Jupiter junit API
+ Relies on SNAPSHOT jetty-test-helper
  - this will be a formal release once this issue has been
    resolved satisfactory
+ Have jenkins always pull latest SNAPSHOT for each build
+ Adding jetty.snapshots repository
+ Using surefire 2.22.0 per advice from junit
+ Ensuring <reuseForks>true</reuseForks> to work around issue junit-team/junit5#801
+ Disabling <forkMode>always</forkMode> in maven-surefire-plugin
  due to bug https://github.com/junit-team/junit5/issues/801
+ OSGi tests must remain at vintage due to PaxExam
+ Moving from vintage TestingDir to jupiter WorkDir
+ Fixing imports to use jupiter, not vintage
+ Migrating vintage ExpectedException to jupiter assertThrows
+ Migrating vintage TestName to jupiter TestInfo
+ Migrating @RunWith(Parameterized.class)
  to @ParameterizedTest with Argument Sources
+ Migrating assertTrue(val.contains(needle))
  to assertThat(val, containsString(needle))
+ Aligning junit versions per recommendations from @sormuras
+ Adjusting parameter order change for assertEquals()
+ Test LifeCycle Annotation Migration

junit 4      | junit 5 / jupiter
------------ | -----------
@Before      | @BeforeEach
@After       | @AfterEach
@BeforeClass | @BeforeAll
@AfterClass  | @AfterAll

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2018-09-05 10:07:17 +10:00
Lachlan dbe340a20e Issue #300 - Implement Deflater Pool (#2784)
Issue #300 - Implement Deflater Pool

Removed the ThreadLocal pooling of deflaters in GzipHandler in favour of a new DeflaterPool class
GzipHttpOutputInterceptor.GzipBufferCB now recycles the Deflater in onCompleteFailure()
added benchmark for the DeflaterPool

allow negative capacity to mean no limit on the pool size
added mod file and xml changes

replace setDeflaterPool with newDeflaterPool

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-08-21 10:32:34 +10:00
Olivier Lamy f4a0bfbdd8
Issue #2746 jmh module (#2750)
#2746 move jmh classes to a dedicated jmh module

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2018-08-04 14:08:13 +10:00