Skip to content

Commit ad5b781

Browse files
authored
Merge branch 'TechEmpower:master' into patch-1
2 parents 318319d + bcfee4a commit ad5b781

32 files changed

+493
-220
lines changed

frameworks/Dart/dart3/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Created by `dart pub`
33
.dart_tool/
44
*.lock
5-
!bin
5+
!bin

frameworks/Dart/dart3/bin/server.dart

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,22 @@ import 'dart:convert';
22
import 'dart:io';
33
import 'dart:isolate';
44

5-
final _encoder = JsonUtf8Encoder();
6-
7-
void main(List<String> _) async {
8-
/// Create an [Isolate] containinig an [HttpServer]
5+
void main(List<String> args) async {
6+
/// Create an [Isolate] containing an [HttpServer]
97
/// for each processor after the first
108
for (var i = 1; i < Platform.numberOfProcessors; i++) {
11-
await Isolate.spawn(_startServer, _);
9+
await Isolate.spawn(_startServer, args);
1210
}
1311

1412
/// Create a [HttpServer] for the first processor
15-
await _startServer(_);
13+
await _startServer(args);
1614
}
1715

1816
/// Creates and setup a [HttpServer]
1917
Future<void> _startServer(List<String> _) async {
2018
/// Binds the [HttpServer] on `0.0.0.0:8080`.
2119
final server = await HttpServer.bind(
22-
InternetAddress('0.0.0.0', type: InternetAddressType.IPv4),
20+
InternetAddress.anyIPv4,
2321
8080,
2422
shared: true,
2523
);
@@ -51,39 +49,35 @@ void _sendResponse(
5149
int statusCode, {
5250
ContentType? type,
5351
List<int> bytes = const [],
54-
}) =>
55-
request.response
56-
..statusCode = statusCode
57-
..headers.contentType = type
58-
..headers.date = DateTime.now()
59-
..contentLength = bytes.length
60-
..add(bytes)
61-
..close();
52+
}) => request.response
53+
..statusCode = statusCode
54+
..headers.contentType = type
55+
..headers.date = DateTime.now()
56+
..contentLength = bytes.length
57+
..add(bytes)
58+
..close();
6259

6360
/// Completes the given [request] by writing the [response] as JSON.
6461
void _sendJson(HttpRequest request, Object response) => _sendResponse(
65-
request,
66-
HttpStatus.ok,
67-
type: ContentType.json,
68-
bytes: _encoder.convert(response),
69-
);
62+
request,
63+
HttpStatus.ok,
64+
type: ContentType.json,
65+
bytes: _jsonEncoder.convert(response),
66+
);
7067

7168
/// Completes the given [request] by writing the [response] as plain text.
7269
void _sendText(HttpRequest request, String response) => _sendResponse(
73-
request,
74-
HttpStatus.ok,
75-
type: ContentType.text,
76-
bytes: utf8.encode(response),
77-
);
70+
request,
71+
HttpStatus.ok,
72+
type: ContentType.text,
73+
bytes: utf8.encode(response),
74+
);
7875

7976
/// Responds with the JSON test to the [request].
80-
void _jsonTest(HttpRequest request) => _sendJson(
81-
request,
82-
const {'message': 'Hello, World!'},
83-
);
77+
void _jsonTest(HttpRequest request) =>
78+
_sendJson(request, const {'message': 'Hello, World!'});
8479

8580
/// Responds with the plaintext test to the [request].
86-
void _plaintextTest(HttpRequest request) => _sendText(
87-
request,
88-
'Hello, World!',
89-
);
81+
void _plaintextTest(HttpRequest request) => _sendText(request, 'Hello, World!');
82+
83+
final _jsonEncoder = JsonUtf8Encoder();

frameworks/Dart/dart3/dart3.dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
FROM dart:3.5 AS builder
2+
FROM dart:3.8 AS builder
33

44
COPY . /app
55
WORKDIR /app
@@ -11,4 +11,4 @@ COPY --from=builder /runtime/ /
1111
COPY --from=builder /app/build /bin
1212

1313
EXPOSE 8080
14-
CMD ["server"]
14+
CMD ["server"]

frameworks/Dart/dart3/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: dartbenchmark
22
description: A benchmark of dart
33
environment:
4-
sdk: '>=3.5.0 <4.0.0'
4+
sdk: ^3.8.0
55

66
dev_dependencies:
77
lints: ^4.0.0

frameworks/Kotlin/ktor/ktor-exposed-dsl.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ RUN gradle --no-daemon shadowJar
77

88
EXPOSE 8080
99

10-
CMD ["java", "-server", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-XX:+AlwaysPreTouch", "-jar", "app/build/libs/app-all.jar", "Dsl"]
10+
CMD ["java", "-server", "-XX:+UseNUMA", "-XX:+UseG1GC", "-XX:+AlwaysPreTouch", "-jar", "app/build/libs/app-all.jar", "Dsl"]

frameworks/Kotlin/ktor/ktor-exposed/app/build.gradle.kts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
plugins {
22
application
3-
kotlin("jvm") version "2.0.21"
4-
kotlin("plugin.serialization") version "2.0.0"
3+
kotlin("jvm") version "2.1.21"
4+
kotlin("plugin.serialization") version "2.1.21"
55
id("com.github.johnrengelman.shadow") version "8.1.0"
66
}
77

88
repositories {
99
mavenCentral()
1010
}
1111

12-
val ktorVersion = "3.1.2"
13-
val kotlinxSerializationVersion = "1.8.0"
14-
val exposedVersion = "0.59.0"
12+
val ktorVersion = "3.1.3"
13+
val kotlinxSerializationVersion = "1.8.1"
14+
val exposedVersion = "0.61.0"
1515

1616
dependencies {
1717
implementation("io.ktor:ktor-server-core:$ktorVersion")
@@ -25,7 +25,7 @@ dependencies {
2525
implementation("org.jetbrains.exposed:exposed-dao:$exposedVersion")
2626
implementation("org.jetbrains.exposed:exposed-jdbc:$exposedVersion")
2727

28-
implementation("org.postgresql:postgresql:42.7.4")
28+
implementation("org.postgresql:postgresql:42.7.5")
2929
implementation("com.zaxxer:HikariCP:5.1.0")
3030
runtimeOnly("org.slf4j:slf4j-simple:1.7.36")
3131
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

frameworks/Kotlin/ktor/ktor-r2dbc.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ COPY --from=maven /ktor-r2dbc/target/tech-empower-framework-benchmark-1.0-SNAPSH
1010

1111
EXPOSE 9090
1212

13-
CMD ["java", "-server","-XX:+UseNUMA", "-XX:+UseParallelGC", "-XX:+AlwaysPreTouch", "-jar", "app.jar"]
13+
CMD ["java", "-server","-XX:+UseNUMA", "-XX:+UseG1GC", "-XX:+AlwaysPreTouch", "-jar", "app.jar"]

frameworks/Kotlin/ktor/ktor-r2dbc/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
<name>org.jetbrains.ktor tech-empower-framework-benchmark</name>
1313

1414
<properties>
15-
<kotlin.version>2.1.20</kotlin.version>
15+
<kotlin.version>2.1.21</kotlin.version>
1616
<kotlin.coroutines.version>1.10.1</kotlin.coroutines.version>
17-
<ktor.version>3.1.2</ktor.version>
17+
<ktor.version>3.1.3</ktor.version>
1818
<serialization.version>1.8.1</serialization.version>
1919
<kotlinx.html.version>0.12.0</kotlinx.html.version>
2020
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
21-
<logback.version>1.5.12</logback.version>
21+
<logback.version>1.5.13</logback.version>
2222
<reactor.version>3.7.1</reactor.version>
23-
<postgresql.version>42.7.4</postgresql.version>
23+
<postgresql.version>42.7.5</postgresql.version>
2424
<r2dbc.version>1.0.7.RELEASE</r2dbc.version>
2525
<r2dbc.pool.version>1.0.2.RELEASE</r2dbc.pool.version>
2626

@@ -150,7 +150,7 @@
150150
</plugin>
151151
<plugin>
152152
<artifactId>maven-assembly-plugin</artifactId>
153-
<version>3.0.0</version>
153+
<version>3.7.1</version>
154154

155155
<executions>
156156
<execution>

frameworks/Kotlin/ktor/ktor.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ COPY --from=maven /ktor/target/tech-empower-framework-benchmark-1.0-SNAPSHOT-net
1010

1111
EXPOSE 9090
1212

13-
CMD ["java", "-server","-XX:+UseNUMA", "-XX:+UseG1GC", "-XX:+AlwaysPreTouch", "-XX:+UseStringDeduplication", "-jar", "app.jar"]
13+
CMD ["java", "-server","-XX:+UseNUMA", "-XX:+UseG1GC", "-XX:+AlwaysPreTouch", "-jar", "app.jar"]

0 commit comments

Comments
 (0)