Skip to content

Commit 50fb7c3

Browse files
Fix up performance tests & enable schedule (#799)
1 parent ec00b09 commit 50fb7c3

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

builds/azure-pipelines/performance.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ trigger: none
22

33
pr: none
44

5-
schedules: [ ]
5+
schedules:
6+
- cron: "0 0 * * *"
7+
displayName: Mon-Fri at Midnight
8+
branches:
9+
include:
10+
- release/trigger
11+
always: true
612

713
variables:
814
configuration: 'Release'

performance/Microsoft.Azure.WebJobs.Extensions.Sql.Performance.csproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
</ItemGroup>
1717

1818
<Target Name="CopySamples" AfterTargets="Build">
19+
<ItemGroup>
20+
<_DatabaseItems Include="..\samples\Database\**\*.*" />
21+
</ItemGroup>
22+
<Copy SourceFiles="@(_DatabaseItems)" DestinationFolder="$(OutDir)\Database\%(RecursiveDir)" />
23+
<Message Text="Copied SQL Scripts to $(OutDir)\Database" Importance="high" />
1924
<ItemGroup>
2025
<_CSharpCopyItems Include="..\samples\samples-csharp\bin\$(Configuration)\$(TargetFramework)\**\*.*" />
2126
</ItemGroup>
@@ -30,6 +35,11 @@
3035
<Link>SqlExtensionSamples\%(RecursiveDir)\%(Filename)%(Extension)</Link>
3136
<Visible>True</Visible>
3237
</None>
38+
<None Include="$(OutDir)\Database\**\*">
39+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
40+
<Link>Database\%(RecursiveDir)\%(Filename)%(Extension)</Link>
41+
<Visible>True</Visible>
42+
</None>
3343
</ItemGroup>
3444

3545
</Project>

performance/README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
11
# Running Performance Tests
22

33
## Pre-requisites
4+
45
The performance tests are based on the IntegrationTestBase class. Follow the instructions to set up the pre-requisites for integration tests [here](../test/README.md#running-integration-tests).
56

67
## Run
8+
79
The performance tests use BenchmarkDotNet to benchmark performance for input and output bindings.
810

911
Run the tests from the terminal.
10-
```
12+
13+
### Run all tests
14+
15+
```bash
1116
cd performance
1217
dotnet run -c Release
1318
```
1419

20+
### Run subset of tests
21+
22+
You can also pass in an argument to the test runner to run only a subset of tests. Each argument corresponds to a category of tests (each contained in a single class). See [SqlBindingBenchmark](./SqlBindingBenchmarks.cs) for the full list of arguments.
23+
24+
```bash
25+
cd performance
26+
dotnet run -c Release input
27+
```
28+
1529
## Results
30+
1631
The test results will be generated in the BenchmarkDotNet.Artifacts folder.

0 commit comments

Comments
 (0)