File tree Expand file tree Collapse file tree 8 files changed +113
-0
lines changed
frameworks/Dart/dart_frog Expand file tree Collapse file tree 8 files changed +113
-0
lines changed Original file line number Diff line number Diff line change 1+ # From https://hub.docker.com/_/dart
2+ .dockerignore
3+ Dockerfile
4+ build /
5+ .dart_tool /
6+ .git /
7+ .github /
8+ .gitignore
9+ .packages
Original file line number Diff line number Diff line change 1+ # https://dart.dev/guides/libraries/private-files
2+ # Created by `dart pub`
3+ .dart_tool /
4+ * .lock
5+ ! bin
6+ build /
Original file line number Diff line number Diff line change 1+ # Dart Frog Benchmarking Test
2+
3+ ### Test Type Implementation Source Code
4+
5+ - [ JSON] ( server.dart )
6+ - [ PLAINTEXT] ( server.dart )
7+
8+ ## Important Libraries
9+
10+ The tests were run with:
11+
12+ - [ pkg: dart_frog ] ( https://pub.dev/packages/dart_frog )
13+ - [ Dart] ( https://dart.dev/ )
14+
15+ ## Test URLs
16+
17+ ### JSON
18+
19+ http://localhost:8080/json
20+
21+ ### PLAINTEXT
22+
23+ http://localhost:8080/plaintext
Original file line number Diff line number Diff line change 1+ {
2+ "framework" : " dart_frog" ,
3+ "tests" : [
4+ {
5+ "default" : {
6+ "json_url" : " /json" ,
7+ "plaintext_url" : " /plaintext" ,
8+ "port" : 8080 ,
9+ "approach" : " Realistic" ,
10+ "classification" : " Micro" ,
11+ "database" : " None" ,
12+ "framework" : " dart_frog" ,
13+ "language" : " Dart" ,
14+ "flavor" : " None" ,
15+ "orm" : " None" ,
16+ "platform" : " dart_frog" ,
17+ "webserver" : " None" ,
18+ "os" : " Linux" ,
19+ "database_os" : " Linux" ,
20+ "display_name" : " dart_frog" ,
21+ "notes" : " " ,
22+ "versus" : " None"
23+ }
24+ }
25+ ]
26+ }
Original file line number Diff line number Diff line change 1+ FROM dart:3.8 AS builder
2+
3+ COPY . /app
4+ WORKDIR /app
5+
6+ RUN dart pub global activate dart_frog_cli
7+ RUN dart_frog build
8+
9+ RUN dart compile exe build/bin/server.dart -o build/bin/server
10+
11+ FROM scratch
12+ COPY --from=builder /runtime/ /
13+ COPY --from=builder /app/build/bin/server /app/build/bin/
14+
15+ EXPOSE 8080
16+ CMD ["/app/build/bin/server" ]
Original file line number Diff line number Diff line change 1+ name : dartfrogbenchmark
2+ description : A benchmark of pkg:dart_frog
3+ environment :
4+ sdk : ^3.8.0
5+
6+ dependencies :
7+ dart_frog : ^1.0.0
Original file line number Diff line number Diff line change 1+ import 'dart:io' ;
2+
3+ import 'package:dart_frog/dart_frog.dart' ;
4+
5+ Response onRequest (RequestContext context) {
6+ return Response .json (
7+ body: {'message' : 'Hello, World!' },
8+ headers: {
9+ HttpHeaders .dateHeader: '${HttpDate .format (DateTime .now ())}' ,
10+ HttpHeaders .serverHeader: 'dart_frog' ,
11+ },
12+ );
13+ }
Original file line number Diff line number Diff line change 1+ import 'dart:io' ;
2+ import 'package:dart_frog/dart_frog.dart' ;
3+
4+ Response onRequest (RequestContext context) {
5+ return Response (
6+ body: 'Hello, World!' ,
7+ headers: {
8+ HttpHeaders .contentTypeHeader: ContentType .text.mimeType,
9+ HttpHeaders .dateHeader: '${HttpDate .format (DateTime .now ())}' ,
10+ HttpHeaders .serverHeader: 'dart_frog' ,
11+ },
12+ );
13+ }
You can’t perform that action at this time.
0 commit comments