Browse Source

Enable TieredPGO attribute in .fsproj, change Postgres connection string as per C# ASP.Net Core example (#7820)

Denis 2 years ago
parent
commit
d4417dafe6

+ 2 - 0
frameworks/FSharp/falco/src/App/App.fsproj

@@ -6,6 +6,8 @@
     <AssemblyName>App</AssemblyName>
     <AssemblyName>App</AssemblyName>
     <OutputType>Exe</OutputType>
     <OutputType>Exe</OutputType>
     <EnableDefaultContentItems>false</EnableDefaultContentItems>
     <EnableDefaultContentItems>false</EnableDefaultContentItems>
+    <!-- Settings applicable to JIT-based deployment -->
+    <TieredPGO>true</TieredPGO>
   </PropertyGroup>
   </PropertyGroup>
 
 
   <ItemGroup>
   <ItemGroup>

+ 1 - 1
frameworks/FSharp/falco/src/App/Program.fs

@@ -4,7 +4,7 @@ open Falco
 open App
 open App
 
 
 [<Literal>]
 [<Literal>]
-let connectionString = "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=1024;NoResetOnClose=true;Enlist=false;Max Auto Prepare=3"
+let connectionString = "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;SSL Mode=Disable;Maximum Pool Size=1024;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4;Multiplexing=true;Write Coalescing Buffer Threshold Bytes=1000"
 
 
 [<Literal>]
 [<Literal>]
 let defaultMsg = "Hello, World!"
 let defaultMsg = "Hello, World!"

+ 2 - 0
frameworks/FSharp/frank/src/App/App.fsproj

@@ -6,6 +6,8 @@
     <AssemblyName>App</AssemblyName>
     <AssemblyName>App</AssemblyName>
     <OutputType>Exe</OutputType>
     <OutputType>Exe</OutputType>
     <EnableDefaultContentItems>false</EnableDefaultContentItems>
     <EnableDefaultContentItems>false</EnableDefaultContentItems>
+    <!-- Settings applicable to JIT-based deployment -->
+    <TieredPGO>true</TieredPGO>
   </PropertyGroup>
   </PropertyGroup>
 
 
   <ItemGroup>
   <ItemGroup>

+ 1 - 1
frameworks/FSharp/frank/src/App/Models.fs

@@ -7,7 +7,7 @@ open System
 type Fortune = { id: int; message: string }
 type Fortune = { id: int; message: string }
 
 
 [<Literal>]
 [<Literal>]
-let ConnectionString = "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=1024;NoResetOnClose=true;Enlist=false;Max Auto Prepare=3"
+let ConnectionString = "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;SSL Mode=Disable;Maximum Pool Size=1024;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4;Multiplexing=true;Write Coalescing Buffer Threshold Bytes=1000"
 
 
 let FortuneComparer = { new IComparer<Fortune> with 
 let FortuneComparer = { new IComparer<Fortune> with 
     member self.Compare(a,b) = String.CompareOrdinal(a.message, b.message)
     member self.Compare(a,b) = String.CompareOrdinal(a.message, b.message)

+ 4 - 1
frameworks/FSharp/giraffe/src/App/App.fsproj

@@ -3,13 +3,16 @@
   <PropertyGroup>
   <PropertyGroup>
     <TargetFramework>net7.0</TargetFramework>
     <TargetFramework>net7.0</TargetFramework>
     <EnableDefaultContentItems>false</EnableDefaultContentItems>
     <EnableDefaultContentItems>false</EnableDefaultContentItems>
+
+    <!-- Settings applicable to JIT-based deployment -->
+    <TieredPGO>true</TieredPGO>
   </PropertyGroup>
   </PropertyGroup>
 
 
   <ItemGroup>
   <ItemGroup>
     <PackageReference Update="FSharp.Core" Version="7.0.0" />
     <PackageReference Update="FSharp.Core" Version="7.0.0" />
     <PackageReference Include="Dapper" Version="2.0.123" />
     <PackageReference Include="Dapper" Version="2.0.123" />
     <PackageReference Include="Giraffe" Version="6.0.0" />
     <PackageReference Include="Giraffe" Version="6.0.0" />
-    <PackageReference Include="Npgsql" Version="7.0.0" />
+    <PackageReference Include="Npgsql" Version="7.0.1" />
   </ItemGroup>
   </ItemGroup>
 
 
   <ItemGroup>
   <ItemGroup>

+ 1 - 1
frameworks/FSharp/giraffe/src/App/Program.fs

@@ -13,7 +13,7 @@ module Common =
         }
         }
 
 
     [<Literal>]
     [<Literal>]
-    let ConnectionString = "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=1024;NoResetOnClose=true;Enlist=false;Max Auto Prepare=3"
+    let ConnectionString = "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;SSL Mode=Disable;Maximum Pool Size=1024;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4;Multiplexing=true;Write Coalescing Buffer Threshold Bytes=1000"
 
 
     type JsonMode =
     type JsonMode =
         | System
         | System

+ 2 - 0
frameworks/FSharp/suave/src/App/App.fsproj

@@ -4,6 +4,8 @@
     <OutputType>Exe</OutputType>
     <OutputType>Exe</OutputType>
     <TargetFramework>net7.0</TargetFramework>
     <TargetFramework>net7.0</TargetFramework>
     <ServerGarbageCollection>true</ServerGarbageCollection>
     <ServerGarbageCollection>true</ServerGarbageCollection>
+    <!-- Settings applicable to JIT-based deployment -->
+    <TieredPGO>true</TieredPGO>
   </PropertyGroup>
   </PropertyGroup>
 
 
   <ItemGroup>
   <ItemGroup>

+ 2 - 0
frameworks/FSharp/zebra/src/App/App.fsproj

@@ -6,6 +6,8 @@
     <AssemblyName>App</AssemblyName>
     <AssemblyName>App</AssemblyName>
     <OutputType>Exe</OutputType>
     <OutputType>Exe</OutputType>
     <EnableDefaultContentItems>false</EnableDefaultContentItems>
     <EnableDefaultContentItems>false</EnableDefaultContentItems>
+    <!-- Settings applicable to JIT-based deployment -->
+    <TieredPGO>true</TieredPGO>
   </PropertyGroup>
   </PropertyGroup>
 
 
   <ItemGroup>
   <ItemGroup>

+ 1 - 1
frameworks/FSharp/zebra/src/App/Program.fs

@@ -22,7 +22,7 @@ type JsonStructMessage = { message : string }
 type Fortune = { id: int; message: string }
 type Fortune = { id: int; message: string }
 
 
 [<Literal>]
 [<Literal>]
-let ConnectionString = "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=1024;NoResetOnClose=true;Enlist=false;Max Auto Prepare=3"
+let ConnectionString = "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;SSL Mode=Disable;Maximum Pool Size=1024;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4;Multiplexing=true;Write Coalescing Buffer Threshold Bytes=1000"
 
 
 
 
 module Simple =
 module Simple =