Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
Merge pull request #24 from Dtronix/performance-test-rework
Browse files Browse the repository at this point in the history
Performance test rework
  • Loading branch information
DJGosnell authored Jul 11, 2017
2 parents 4604605 + c69f68d commit 81a3bba
Show file tree
Hide file tree
Showing 54 changed files with 2,049 additions and 419 deletions.
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
language: csharp
solution: ./src/DtronixMessageQueue.sln
install:
- nuget install xunit.runners -Version 1.9.2 -OutputDirectory testrunner
before_script:
- nuget restore ./src/DtronixMessageQueue.sln
script:
- xbuild /p:Configuration=Release ./src/DtronixMessageQueue/DtronixMessageQueue.csproj
- xbuild /p:Configuration=Release ./src/DtronixMessageQueue.Tests/DtronixMessageQueue.Tests.csproj
6 changes: 6 additions & 0 deletions src/DtronixMessageQueue.Tests.Gui/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
</startup>
</configuration>
9 changes: 9 additions & 0 deletions src/DtronixMessageQueue.Tests.Gui/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Application x:Class="DtronixMessageQueue.Tests.Gui.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:DtronixMessageQueue.Tests.Gui"
Startup="App_OnStartup">
<Application.Resources>

</Application.Resources>
</Application>
21 changes: 21 additions & 0 deletions src/DtronixMessageQueue.Tests.Gui/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace DtronixMessageQueue.Tests.Gui
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
private void App_OnStartup(object sender, StartupEventArgs e)
{
new MainWindow(e.Args).Show();
}
}
}
13 changes: 13 additions & 0 deletions src/DtronixMessageQueue.Tests.Gui/ControllerSession.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DtronixMessageQueue.Rpc;

namespace DtronixMessageQueue.Tests.Gui
{
public class ControllerSession : RpcSession<ControllerSession, RpcConfig>
{
}
}
133 changes: 133 additions & 0 deletions src/DtronixMessageQueue.Tests.Gui/DtronixMessageQueue.Tests.Gui.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{98F57431-718F-4865-968F-5265453BA5BC}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>DtronixMessageQueue.Tests.Gui</RootNamespace>
<AssemblyName>DtronixMessageQueue.Tests.Gui</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="PerformanceTestBase.cs" />
<Compile Include="Services\ControllerService.cs" />
<Compile Include="ControllerSession.cs" />
<Compile Include="Services\IControllerService.cs" />
<Compile Include="TestControllerSession.cs" />
<Compile Include="Tests\ConnectionPerformanceTestSession.cs" />
<Compile Include="Tests\MqBaseTestSession.cs" />
<Compile Include="Tests\ConnectionPerformanceTest.cs" />
<Compile Include="Tests\ConnectionPerformanceTestControl.xaml.cs">
<DependentUpon>ConnectionPerformanceTestControl.xaml</DependentUpon>
</Compile>
<Compile Include="Tests\PerformanceTest.cs" />
<Compile Include="Wpf\TestMqThroughputControl.xaml.cs">
<DependentUpon>TestMqThroughputControl.xaml</DependentUpon>
</Compile>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="Tests\ConnectionPerformanceTestControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Wpf\TestMqThroughputControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DtronixMessageQueue.Tests.Performance\DtronixMessageQueue.Tests.Performance.csproj">
<Project>{1DF3332E-9B24-45B9-934B-43542793986C}</Project>
<Name>DtronixMessageQueue.Tests.Performance</Name>
</ProjectReference>
<ProjectReference Include="..\DtronixMessageQueue\DtronixMessageQueue.csproj">
<Project>{060bfeca-a3d2-4871-ae35-28deccb95fe3}</Project>
<Name>DtronixMessageQueue</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="TestSessions\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
67 changes: 67 additions & 0 deletions src/DtronixMessageQueue.Tests.Gui/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<Window x:Class="DtronixMessageQueue.Tests.Gui.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:DtronixMessageQueue.Tests.Gui"
mc:Ignorable="d"
Title="{Binding Path=WindowTitle, FallbackValue='DtxMQ Performance Test'}" Closing="MainWindow_OnClosing" Height="496" Width="500" MinHeight="400" MinWidth="500">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100"/>
<RowDefinition Height="120"/>
<RowDefinition/>
<RowDefinition Height="34"/>
<RowDefinition Height="25"/>
</Grid.RowDefinitions>
<GroupBox Grid.Row="0" Header="Setup" Margin="5,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
<RowDefinition Height="282*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Text="Connect IP" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5,0" />
<TextBox Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" Text="{Binding Path=IpAddress}" />

<TextBlock Grid.Row="0" Grid.Column="2" Text="Client Processes" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5,0" />
<TextBox Grid.Row="0" Grid.Column="3" VerticalAlignment="Center" Text="{Binding Path=ClientProcesses, FallbackValue=1}" />

<TextBlock Grid.Row="1" Grid.Column="0" Text="Performance Test" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5,0" />
<ComboBox Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" DisplayMemberPath="Name" ItemsSource="{Binding PerformanceTests}" SelectedItem="{Binding SelectedPerformanceTest}" IsEnabled="{Binding IsServer}" />

<TextBlock Grid.Row="1" Grid.Column="2" Text="Client Connections" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5,0" />
<TextBox Grid.Row="1" Grid.Column="3" VerticalAlignment="Center" Text="{Binding Path=ClientConnections, FallbackValue=1}" IsEnabled="{Binding IsServer}" />
</Grid>
</GroupBox>

<GroupBox x:Name="ConfigurationContainer" Grid.Row="1" Header="Configurations" Margin="5,0">

</GroupBox>
<RichTextBox Grid.Row="2" Margin="5" x:Name="ConsoleOutput" FontFamily="Courier New" VerticalScrollBarVisibility="Auto" FontSize="10">

</RichTextBox>

<StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Right">
<Button Padding="4" Margin="5,0" VerticalAlignment="Center" Click="Stop" IsEnabled="{Binding IsRunning}">Stop</Button>
<Button Padding="4" Margin="5,0" VerticalAlignment="Center" Click="StartAsServer" IsEnabled="{Binding IsServer}">Start As Server</Button>
<Button Padding="4" Margin="5,0" VerticalAlignment="Center" Click="StartAsClient">Start As Client</Button>
<Button Padding="4" Margin="5,0" VerticalAlignment="Center" Click="NewClient" IsEnabled="{Binding IsServer}">New Client</Button>
</StackPanel>
<StatusBar Grid.Row="4">
<TextBlock Text="{Binding Path=CurrentStatus, FallbackValue=Idle}" Width="100" />
<TextBlock Text="{Binding Path=CurrentMode, FallbackValue=Setup}" Width="50" />

<TextBlock Width="120">
<TextBlock Text="Memory: " />
<TextBlock Text="{Binding Path=MemoryUsage, FallbackValue=0.0 MB}" />
</TextBlock>
</StatusBar>
</Grid>
</Window>
Loading

0 comments on commit 81a3bba

Please sign in to comment.