Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
vietj authored Dec 10, 2024
2 parents 63fd3b6 + 226d06b commit 37b9137
Show file tree
Hide file tree
Showing 349 changed files with 7,978 additions and 5,539 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/ci-5.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@ jobs:
jdk: 11
- os: ubuntu-latest
jdk: 11
profile: '-PtestNativeTransport'
profile: '-PNativeEpoll'
- os: ubuntu-latest
jdk: 11
profile: '-PtestDomainSockets'
profile: '-PNativeIoUring'
- os: ubuntu-latest
jdk: 11
profile: '-PNativeEpoll+DomainSockets'
- os: ubuntu-latest
jdk: 21
- os: windows-latest
jdk: 11
stable: true
# - os: macos-latest
# jdk: 11
# profile: '-PNativeKQueue'
uses: ./.github/workflows/ci.yml
with:
branch: ${{ github.event.pull_request.head.sha || github.ref_name }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ on:
inputs:
branch:
required: true
type: string
type: 'string'
jdk:
default: 8
type: string
type: 'string'
os:
default: ubuntu-latest
type: string
type: 'string'
profile:
default: ''
type: string
type: 'string'
jobs:
Test:
name: Run tests
Expand Down
8 changes: 3 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@
~
~ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
~
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.vertx</groupId>
<artifactId>vertx5-parent</artifactId>
<version>3</version>
<version>9</version>
</parent>

<artifactId>vertx-core-aggregator</artifactId>
Expand Down Expand Up @@ -49,7 +48,6 @@
<junit.version>4.13.2</junit.version>
<harmcrest.version>2.2</harmcrest.version>
<assertj.version>3.4.1</assertj.version>
<jar.manifest>${project.basedir}/src/main/resources/META-INF/MANIFEST.MF</jar.manifest>
</properties>

<dependencyManagement>
Expand All @@ -72,4 +70,4 @@
<module>vertx-core</module>
</modules>

</project>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* Copyright (c) 2011-2024 Contributors to the Eclipse Foundation
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
* which is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
*/

package io.vertx.core.net.impl;

import java.util.concurrent.TimeUnit;

import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Warmup;

@State(Scope.Thread)
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@Warmup(iterations = 10, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 10, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Fork(2)
public class HostAndPortBenchmark {

@Param("192.168.0.1:8080")
private String host;

@Setup
public void setup() {
}


@Benchmark
public int parseIPv4Address() {
String host = this.host;
return HostAndPortImpl.parseIPv4Address(host, 0, host.length());
}

@Benchmark
public int parseHost() {
String host = this.host;
return HostAndPortImpl.parseHost(host, 0, host.length());
}

@Benchmark
public HostAndPortImpl parseAuthority() {
return HostAndPortImpl.parseAuthority(host, -1);
}

@Benchmark
public boolean isValidAuthority() {
return HostAndPortImpl.isValidAuthority(host);
}
}
Empty file.
Loading

0 comments on commit 37b9137

Please sign in to comment.