Skip to content

Commit 063191e

Browse files
authored
Merge branch 'danielgerlag:master' into master
2 parents f86a516 + ab97ce9 commit 063191e

File tree

138 files changed

+1521
-576
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+1521
-576
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: [danielgerlag]

.github/workflows/dotnet.yml

Lines changed: 117 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,131 @@ on:
77
branches: [ master ]
88

99
jobs:
10-
build:
11-
10+
Unit-Tests:
1211
runs-on: ubuntu-latest
13-
1412
steps:
1513
- uses: actions/checkout@v2
1614
- name: Setup .NET
1715
uses: actions/setup-dotnet@v1
1816
with:
19-
dotnet-version: 5.0.*
17+
dotnet-version: |
18+
3.1.x
19+
6.0.x
2020
- name: Restore dependencies
2121
run: dotnet restore
2222
- name: Build
2323
run: dotnet build --no-restore
2424
- name: Unit Tests
25-
run: dotnet test test/WorkflowCore.UnitTests --no-build --verbosity normal
26-
- name: Integration Tests
27-
run: dotnet test test/WorkflowCore.IntegrationTests --no-build --verbosity normal
28-
- name: PostgreSQL Tests
29-
run: dotnet test test/WorkflowCore.Tests.PostgreSQL --no-build --verbosity normal
30-
- name: Redis Tests
31-
run: dotnet test test/WorkflowCore.Tests.Redis --no-build --verbosity normal
32-
- name: SQL Server Tests
33-
run: dotnet test test/WorkflowCore.Tests.SqlServer --no-build --verbosity normal
34-
- name: Elasticsearch Tests
35-
run: dotnet test test/WorkflowCore.Tests.Elasticsearch --no-build --verbosity normal
25+
run: dotnet test test/WorkflowCore.UnitTests --no-build --verbosity normal -p:ParallelizeTestCollections=false
26+
Integration-Tests:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v2
30+
- name: Setup .NET
31+
uses: actions/setup-dotnet@v1
32+
with:
33+
dotnet-version: |
34+
3.1.x
35+
6.0.x
36+
- name: Restore dependencies
37+
run: dotnet restore
38+
- name: Build
39+
run: dotnet build --no-restore
40+
- name: Integration Tests
41+
run: dotnet test test/WorkflowCore.IntegrationTests --no-build --verbosity normal -p:ParallelizeTestCollections=false
42+
MongoDB-Tests:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v2
46+
- name: Setup .NET
47+
uses: actions/setup-dotnet@v1
48+
with:
49+
dotnet-version: |
50+
3.1.x
51+
6.0.x
52+
- name: Restore dependencies
53+
run: dotnet restore
54+
- name: Build
55+
run: dotnet build --no-restore
56+
- name: MongoDB Tests
57+
run: dotnet test test/WorkflowCore.Tests.MongoDB --no-build --verbosity normal -p:ParallelizeTestCollections=false
58+
MySQL-Tests:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v2
62+
- name: Setup .NET
63+
uses: actions/setup-dotnet@v1
64+
with:
65+
dotnet-version: |
66+
3.1.x
67+
6.0.x
68+
- name: Restore dependencies
69+
run: dotnet restore
70+
- name: Build
71+
run: dotnet build --no-restore
72+
- name: MySQL Tests
73+
run: dotnet test test/WorkflowCore.Tests.MySQL --no-build --verbosity normal -p:ParallelizeTestCollections=false
74+
PostgreSQL-Tests:
75+
runs-on: ubuntu-latest
76+
steps:
77+
- uses: actions/checkout@v2
78+
- name: Setup .NET
79+
uses: actions/setup-dotnet@v1
80+
with:
81+
dotnet-version: |
82+
3.1.x
83+
6.0.x
84+
- name: Restore dependencies
85+
run: dotnet restore
86+
- name: Build
87+
run: dotnet build --no-restore
88+
- name: PostgreSQL Tests
89+
run: dotnet test test/WorkflowCore.Tests.PostgreSQL --no-build --verbosity normal -p:ParallelizeTestCollections=false
90+
Redis-Tests:
91+
runs-on: ubuntu-latest
92+
steps:
93+
- uses: actions/checkout@v2
94+
- name: Setup .NET
95+
uses: actions/setup-dotnet@v1
96+
with:
97+
dotnet-version: |
98+
3.1.x
99+
6.0.x
100+
- name: Restore dependencies
101+
run: dotnet restore
102+
- name: Build
103+
run: dotnet build --no-restore
104+
- name: Redis Tests
105+
run: dotnet test test/WorkflowCore.Tests.Redis --no-build --verbosity normal -p:ParallelizeTestCollections=false
106+
SQLServer-Tests:
107+
runs-on: ubuntu-latest
108+
steps:
109+
- uses: actions/checkout@v2
110+
- name: Setup .NET
111+
uses: actions/setup-dotnet@v1
112+
with:
113+
dotnet-version: |
114+
3.1.x
115+
6.0.x
116+
- name: Restore dependencies
117+
run: dotnet restore
118+
- name: Build
119+
run: dotnet build --no-restore
120+
- name: SQL Server Tests
121+
run: dotnet test test/WorkflowCore.Tests.SqlServer --no-build --verbosity normal -p:ParallelizeTestCollections=false
122+
Elasticsearch-Tests:
123+
runs-on: ubuntu-latest
124+
steps:
125+
- uses: actions/checkout@v2
126+
- name: Setup .NET
127+
uses: actions/setup-dotnet@v1
128+
with:
129+
dotnet-version: |
130+
3.1.x
131+
6.0.x
132+
- name: Restore dependencies
133+
run: dotnet restore
134+
- name: Build
135+
run: dotnet build --no-restore
136+
- name: Elasticsearch Tests
137+
run: dotnet test test/WorkflowCore.Tests.Elasticsearch --no-build --verbosity normal -p:ParallelizeTestCollections=false

WorkflowCore.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ReleaseNotes", "ReleaseNote
110110
EndProject
111111
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkflowCore.Sample14", "src\samples\WorkflowCore.Sample14\WorkflowCore.Sample14.csproj", "{6BC66637-B42A-4334-ADFB-DBEC9F29D293}"
112112
EndProject
113-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkflowCore.Testing", "test\WorkflowCore.Testing\WorkflowCore.Testing.csproj", "{62A9709E-27DA-42EE-B94F-5AF431D86354}"
113+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkflowCore.Testing", "src\WorkflowCore.Testing\WorkflowCore.Testing.csproj", "{62A9709E-27DA-42EE-B94F-5AF431D86354}"
114114
EndProject
115115
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkflowCore.TestSample01", "src\samples\WorkflowCore.TestSample01\WorkflowCore.TestSample01.csproj", "{0E3C1496-8E7C-411A-A536-C7C9CE4EED4E}"
116116
EndProject
116 KB
Loading
78.5 KB
Loading

docs/performance.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Performance Test
2+
3+
Workflow-core version 3.7.0 was put under test to evaluate its performance. The setup used was single node with the default MemoryPersistenceProvider persistence provider.
4+
5+
## Methodology
6+
7+
- Test Environment - Test were run on following two environments one after the other to see how workflow-core performance with a lower vs higher hardware configuration.
8+
- Lower configuration
9+
- Cores: 8 vCPU ([Standard_D8s_v3](https://learn.microsoft.com/azure/virtual-machines/dv3-dsv3-series))
10+
- RAM: 32 GB
11+
- OS: Linux Ubuntu 20.04
12+
- dotNet 6
13+
- Higher configuration
14+
- Cores: 32 vCPU ([Standard_D32as_v4](https://learn.microsoft.com/azure/virtual-machines/dav4-dasv4-series))
15+
- RAM: 128 GB
16+
- OS: Linux Ubuntu 20.04
17+
- dotNet 6
18+
- Test Workflow: Workflow consist of 3 basic steps. These 3 simple steps were chosen to test the performance of the workflow engine with minimal yet sufficient complexity and to avoid any external dependencies.
19+
- Step1 : Generate a [random number](https://learn.microsoft.com/dotnet/api/system.random?view=net-6.0) between 1 to 10 and print it on standard output.
20+
- Step2 : [Conditional step](https://github.com/danielgerlag/workflow-core/blob/master/docs/control-structures.md)
21+
- Step 2.1: If value generate in step1 is > 5 then print it on standard output.
22+
- Step 2.2: If value generate in step1 is <= 5 then print it on standard output.
23+
- Step3: Prints a good bye message on standard output.
24+
- Test tools:
25+
- [NBomber](https://nbomber.com/docs/getting-started/overview/) was used as performance testing framework with C# console app as base.
26+
27+
- Test scenarios:
28+
- Each type of test run executed for 20 minutes.
29+
- NBomber Load Simulation of type [KeepConstant](https://nbomber.com/docs/using-nbomber/basic-api/load-simulation#keep-constant) copies was used. This type of simulation keep a constant amount of Scenario copies(instances) for a specific period.
30+
- Concurrent copies [1,2,3,4,5,6,7,8,10,12,14,16,32,64,128,256,512,1024] were tested.
31+
- For example if we take Concurrent copies=4 and Duration=20 minutes this means that NBomber will ensure that we have 4 instance of Test Workflow running in parallel for 20 minutes.
32+
33+
## Results
34+
35+
- Workflow per seconds - Below tables shows how many workflows we are able to execute per second on two different environment with increasing number of concurrent copies.
36+
37+
| **Concurrent Copies** | **8 vCPU** | **32 vCPU** |
38+
| :-------------------: | :--------: | :---------: |
39+
| **1** | 300.6 | 504.7 |
40+
| **2** | 310.3 | 513.1 |
41+
| **3** | 309.6 | 519.3 |
42+
| **4** | 314.7 | 521.3 |
43+
| **5** | 312.4 | 519.0 |
44+
| **6** | 314.7 | 517.7 |
45+
| **7** | 318.9 | 516.7 |
46+
| **8** | 318.4 | 517.5 |
47+
| **10** | 322.6 | 517.1 |
48+
| **12** | 319.7 | 517.6 |
49+
| **14** | 322.4 | 518.1 |
50+
| **16** | 327.0 | 515.5 |
51+
| **32** | 327.7 | 515.8 |
52+
| **64** | 330.7 | 523.7 |
53+
| **128** | 332.8 | 526.9 |
54+
| **256** | 332.8 | 529.1 |
55+
| **512** | 332.8 | 529.1 |
56+
| **1024** | 341.3 | 529.1 |
57+
58+
![Workflows Per Second](./images/performance-test-workflows-per-second.png)
59+
60+
- Latency - Shows Mean, P99 and P50 latency in milliseconds on two different environment with increasing number of concurrent copies.
61+
62+
| **Concurrent Copies** | **Mean 8 vCPU** | **Mean 32 vCPU** | **P.99 8 vCPU** | **P.99 32 vCPU** | **P.50 8 vCPU** | **P.50 32 vCPU** |
63+
| :-------------------: | :-------------: | :--------------: | :-------------: | :--------------: | :-------------: | :--------------: |
64+
| **1** | 3.32 | 1.98 | 12.67 | 2.49 | 3.13 | 1.85 |
65+
| **2** | 6.43 | 3.89 | 19.96 | 5.67 | 6.17 | 3.65 |
66+
| **3** | 9.67 | 5.77 | 24.96 | 8.2 | 9.14 | 5.46 |
67+
| **4** | 12.7 | 7.76 | 27.44 | 13.57 | 12.02 | 7.22 |
68+
| **5** | 15.99 | 9.63 | 34.59 | 41.89 | 15.14 | 9.08 |
69+
| **6** | 19.05 | 11.58 | 38.69 | 45.92 | 18.02 | 10.93 |
70+
| **7** | 21.94 | 13.54 | 42.18 | 48.9 | 20.72 | 12.66 |
71+
| **8** | 25.11 | 15.45 | 44.35 | 51.04 | 23.92 | 14.54 |
72+
| **10** | 30.98 | 19.33 | 52.29 | 56.64 | 29.31 | 18.21 |
73+
| **12** | 37.52 | 23.18 | 59.2 | 63.33 | 35.42 | 21.82 |
74+
| **14** | 43.44 | 27.01 | 67.33 | 67.58 | 41.28 | 25.55 |
75+
| **16** | 48.93 | 31.03 | 72.06 | 72.77 | 46.11 | 28.93 |
76+
| **32** | 97.65 | 62.03 | 130.05 | 104.96 | 94.91 | 58.02 |
77+
| **64** | 193.53 | 122.24 | 235.14 | 168.45 | 191.49 | 115.26 |
78+
| **128** | 384.63 | 243.74 | 449.79 | 294.65 | 379.65 | 236.67 |
79+
| **256** | 769.13 | 486.82 | 834.07 | 561.66 | 766.46 | 498.22 |
80+
| **512** | 1538.29 | 968.02 | 1725.44 | 1052.67 | 1542.14 | 962.05 |
81+
| **1024** | 2999.36 | 1935.32 | 3219.46 | 2072.57 | 3086.34 | 1935.36 |
82+
83+
![Latency](./images/performance-test-workflows-latency.png)
84+
85+
## References
86+
87+
- [NBomber](https://nbomber.com/docs/getting-started/overview/)

src/Directory.Build.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<PackageLicenseUrl>https://github.com/danielgerlag/workflow-core/blob/master/LICENSE.md</PackageLicenseUrl>
55
<RepositoryType>git</RepositoryType>
66
<RepositoryUrl>https://github.com/danielgerlag/workflow-core.git</RepositoryUrl>
7-
<Version>3.6.2</Version>
8-
<AssemblyVersion>3.6.2.0</AssemblyVersion>
9-
<FileVersion>3.6.2.0</FileVersion>
7+
<Version>3.9.0</Version>
8+
<AssemblyVersion>3.9.0.0</AssemblyVersion>
9+
<FileVersion>3.9.0.0</FileVersion>
1010
<PackageIconUrl>https://github.com/danielgerlag/workflow-core/raw/master/src/logo.png</PackageIconUrl>
11-
<PackageVersion>3.6.2</PackageVersion>
11+
<PackageVersion>3.9.0</PackageVersion>
1212
</PropertyGroup>
1313
</Project>

src/WorkflowCore.DSL/Models/v1/StepSourceV1.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace WorkflowCore.Models.DefinitionStorage.v1
77
public class StepSourceV1
88
{
99
public string StepType { get; set; }
10-
10+
1111
public string Id { get; set; }
1212

1313
public string Name { get; set; }
@@ -29,8 +29,9 @@ public class StepSourceV1
2929
public ExpandoObject Inputs { get; set; } = new ExpandoObject();
3030

3131
public Dictionary<string, string> Outputs { get; set; } = new Dictionary<string, string>();
32-
32+
3333
public Dictionary<string, string> SelectNextStep { get; set; } = new Dictionary<string, string>();
3434

35+
public bool ProceedOnCancel { get; set; } = false;
3536
}
3637
}

src/WorkflowCore.DSL/Services/DefinitionLoader.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ private WorkflowStepCollection ConvertSteps(ICollection<StepSourceV1> source, Ty
101101
targetStep.ErrorBehavior = nextStep.ErrorBehavior;
102102
targetStep.RetryInterval = nextStep.RetryInterval;
103103
targetStep.ExternalId = $"{nextStep.Id}";
104+
targetStep.ProceedOnCancel = nextStep.ProceedOnCancel;
104105

105106
AttachInputs(nextStep, dataType, stepType, targetStep);
106107
AttachOutputs(nextStep, dataType, stepType, targetStep);

src/WorkflowCore.DSL/WorkflowCore.DSL.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
@@ -9,9 +9,9 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
12+
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
1313
<PackageReference Include="SharpYaml" Version="1.6.5" />
14-
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.13" />
14+
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.0" />
1515
</ItemGroup>
1616

1717
<ItemGroup>

0 commit comments

Comments
 (0)