Skip to content
Merged

aa #31

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions frameworks/CSharp/appmpower/appmpower-ado-pg.dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0.100 AS build
RUN apt-get update
RUN apt-get -yqq install clang zlib1g-dev libkrb5-dev libtinfo5

WORKDIR /app
COPY src .
RUN mv ./appMpower.ado ./appMpower.csproj
RUN dotnet publish -c Release -o out -r linux-x64
RUN dotnet publish -c Release -o out /p:Driver=ado

# Construct the actual image that will run
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS runtime
RUN apt-get update
FROM mcr.microsoft.com/dotnet/aspnet:8.0.0 AS runtime

WORKDIR /app
COPY --from=build /app/out ./
Expand Down
62 changes: 0 additions & 62 deletions frameworks/CSharp/appmpower/appmpower-odbc-my.dockerfile

This file was deleted.

62 changes: 3 additions & 59 deletions frameworks/CSharp/appmpower/appmpower-odbc-pg.dockerfile
Original file line number Diff line number Diff line change
@@ -1,76 +1,20 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0.100 AS build
RUN apt-get update
RUN apt-get -yqq install clang zlib1g-dev libkrb5-dev libtinfo5
RUN apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev pgpool2 vim-tiny

WORKDIR /odbc

# To compile the latest postgresql odbc driver, postgresql itself needs to be installed
#RUN curl -L -o postgresql-14.1.tar.gz https://ftp.postgresql.org/pub/source/v14.1/postgresql-14.1.tar.gz
#RUN curl -L -o unixODBC-2.3.9.tar.gz ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.9.tar.gz
RUN curl -L -o unixODBC-2.3.11.tar.gz ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.11.tar.gz
#RUN curl -L -o psqlodbc-13.02.0000.tar.gz https://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-13.02.0000.tar.gz

#RUN tar -xvf postgresql-14.1.tar.gz
#RUN tar -xvf unixODBC-2.3.9.tar.gz
RUN tar -xvf unixODBC-2.3.11.tar.gz
#RUN tar -xvf psqlodbc-13.02.0000.tar.gz

#WORKDIR /odbc/postgresql-14.1
#RUN ./configure
#RUN make
#RUN make install

#ENV PATH=/usr/local/pgsql/bin:$PATH

#WORKDIR /odbc/unixODBC-2.3.9
WORKDIR /odbc/unixODBC-2.3.11
RUN ./configure --prefix=/usr/local/unixODBC
RUN make
RUN make install

ENV PATH=/usr/local/unixODBC/lib:$PATH

#WORKDIR /odbc/psqlodbc-13.02.0000
#RUN ./configure --with-unixodbc=/usr/local/unixODBC --with-libpq=/usr/local/pgsql --prefix=/usr/local/pgsqlodbc
#RUN make
#RUN make install

WORKDIR /app
COPY src .
RUN dotnet publish -c Release -o out -r linux-x64 /p:Database=postgresql
RUN dotnet publish -c Release -o out /p:Driver=odbc

# Construct the actual image that will run
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS runtime
FROM mcr.microsoft.com/dotnet/aspnet:8.0.0 AS runtime

RUN apt-get update
# The following installs standard versions unixodbc 2.3.6 and pgsqlodbc 11
RUN apt-get install -y unixodbc odbc-postgresql
# unixodbc still needs to be installed even if compiled locally
#RUN apt-get install -y unixodbc wget curl libpq-dev build-essential

WORKDIR /odbc

#RUN curl -L -o pgpool-II-4.2.3.tar.gz https://www.pgpool.net/mediawiki/download.php?f=pgpool-II-4.2.3.tar.gz
#RUN tar -xvf pgpool-II-4.2.3.tar.gz

#WORKDIR /odbc/pgpool-II-4.2.3
#RUN ./configure
#RUN make
#RUN make install

COPY --from=build /usr/local/unixODBC /usr/local/unixODBC

# Check unixODBC version by:
# 1. Logging into containter: docker run --rm -it --entrypoint=/bin/bash techempower/tfb.test.appmpower
# 2. odbcinst --version

ENV PATH=/usr/local/unixODBC/bin:$PATH

#COPY --from=build /usr/local/pgsqlodbc /usr/local/pgsqlodbc

WORKDIR /etc/
COPY odbcinst.ini .

Expand Down
7 changes: 3 additions & 4 deletions frameworks/CSharp/appmpower/appmpower.dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0.100 AS build
RUN apt-get update
RUN apt-get -yqq install clang zlib1g-dev libkrb5-dev libtinfo5

WORKDIR /app
COPY src .
RUN dotnet publish -c Release -o out -r linux-x64
RUN dotnet publish -c Release -o out

# Construct the actual image that will run
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS runtime
RUN apt-get update
FROM mcr.microsoft.com/dotnet/aspnet:8.0.0 AS runtime

WORKDIR /app
COPY --from=build /app/out ./
Expand Down
34 changes: 6 additions & 28 deletions frameworks/CSharp/appmpower/benchmark_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"webserver": "Kestrel",
"os": "Linux",
"database_os": "Linux",
"display_name": "appMpower [Middleware]",
"display_name": "appMpower [aot-no-reflection]",
"notes": "",
"versus": "aspcore-mw"
"versus": "aspnetcore-minimal"
},
"odbc-pg": {
"db_url": "/db",
Expand All @@ -39,31 +39,9 @@
"webserver": "Kestrel",
"os": "Linux",
"database_os": "Linux",
"display_name": "appMpower [Middleware, Pg, Odbc]",
"display_name": "appMpower [aot-no-reflection,odbc]",
"notes": "",
"versus": "aspcore-mw-ado-pg"
},
"odbc-my": {
"db_url": "/db",
"query_url": "/queries?c=",
"update_url": "/updates?c=",
"fortune_url": "/fortunes",
"cached_query_url": "/cached-worlds?c=",
"port": 8080,
"approach": "Realistic",
"classification": "Platform",
"database": "MySQL",
"framework": "appmpower",
"language": "C#",
"orm": "Raw",
"platform": ".NET",
"flavor": "CoreCLR",
"webserver": "Kestrel",
"os": "Linux",
"database_os": "Linux",
"display_name": "appMpower [Middleware, My, Odbc]",
"notes": "",
"versus": "aspcore-mw-ado-my"
"versus": "aspnetcore-minimal"
},
"ado-pg": {
"db_url": "/db",
Expand All @@ -83,9 +61,9 @@
"webserver": "Kestrel",
"os": "Linux",
"database_os": "Linux",
"display_name": "appMpower [Middleware, Pg, Ado]",
"display_name": "appMpower [aot-no-reflection,ado]",
"notes": "",
"versus": "aspcore-mw-ado-pg"
"versus": "aspnetcore-minimal"
}
}
]
Expand Down
22 changes: 3 additions & 19 deletions frameworks/CSharp/appmpower/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ os = "Linux"
orm = "Raw"
platform = ".NET"
webserver = "kestrel"
versus = "aspcore-mw"
versus = "aspnetcore-minimal"

[odbc-pg]
urls.db = "/db"
Expand All @@ -28,23 +28,7 @@ os = "Linux"
orm = "Raw"
platform = ".NET"
webserver = "Kestrel"
versus = "aspcore-mw-ado-pg"

[odbc-my]
urls.db = "/db"
urls.query = "/queries?c="
urls.update = "/updates?c="
urls.fortune = "/fortunes"
urls.cached_query = "/cached-worlds?c="
approach = "Realistic"
classification = "Micro"
database = "MySQL"
database_os = "Linux"
os = "Linux"
orm = "Raw"
platform = ".NET"
webserver = "Kestrel"
versus = "aspcore-mw-ado-my"
versus = "aspnetcore-minimal"

[ado-pg]
urls.db = "/db"
Expand All @@ -60,4 +44,4 @@ os = "Linux"
orm = "Raw"
platform = ".NET"
webserver = "Kestrel"
versus = "aspcore-mw-ado-pg"
versus = "aspnetcore-minimal"
6 changes: 0 additions & 6 deletions frameworks/CSharp/appmpower/odbcinst.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Pooling=0

[ODBC Drivers]
PostgreSQL = Installed
MariaDB = Installed

;
; odbcinst.ini
Expand All @@ -20,8 +19,3 @@ Driver = /usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so
;Driver =/usr/local/pgsqlodbc/lib/psqlodbcw.so
Threading = 0
CPTimeout = 0

[MariaDB]
Description=MariaDB ODBC for MySQL
Driver = /usr/lib/libmaodbc.so
Threading = 0
2 changes: 1 addition & 1 deletion frameworks/CSharp/appmpower/src/Data/DbProviderFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public static class DbProviderFactory
#if MYSQL
public const string ConnectionString = "Driver={MariaDB};Server=tfb-database;Database=hello_world;Uid=benchmarkdbuser;Pwd=benchmarkdbpass;Pooling=false;OPTIONS=67108864;FLAG_FORWARD_CURSOR=1";
#elif ADO
public const string ConnectionString = "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;SSL Mode=Disable;Maximum Pool Size=18;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4;Multiplexing=true;Write Coalescing Buffer Threshold Bytes=1000";
public const string ConnectionString = "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;SSL Mode=0;Maximum Pool Size=18;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4;Multiplexing=true;Write Coalescing Buffer Threshold Bytes=1000";
//public const string ConnectionString = "Server=localhost;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;SSL Mode=Disable;Maximum Pool Size=18;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4;Multiplexing=true;Write Coalescing Buffer Threshold Bytes=1000";
#else
public const string ConnectionString = "Driver={PostgreSQL};Server=tfb-database;Database=hello_world;Uid=benchmarkdbuser;Pwd=benchmarkdbpass;UseServerSidePrepare=1;Pooling=false";
Expand Down

This file was deleted.

49 changes: 0 additions & 49 deletions frameworks/CSharp/appmpower/src/appMpower.ado

This file was deleted.

Loading