summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IvyThroughput/IvyThroughput/IvyThroughput.csproj86
-rw-r--r--IvyThroughput/IvyThroughput/Program.cs663
-rw-r--r--IvyThroughput/IvyThroughput/Properties/AssemblyInfo.cs36
3 files changed, 785 insertions, 0 deletions
diff --git a/IvyThroughput/IvyThroughput/IvyThroughput.csproj b/IvyThroughput/IvyThroughput/IvyThroughput.csproj
new file mode 100644
index 0000000..65aa430
--- /dev/null
+++ b/IvyThroughput/IvyThroughput/IvyThroughput.csproj
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{58BA0A9C-0655-4E65-BCA1-B5DD3FF62C0D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>IvyThroughput</RootNamespace>
+ <AssemblyName>IvyThroughput</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <SccProjectName>SAK</SccProjectName>
+ <SccLocalPath>SAK</SccLocalPath>
+ <SccAuxPath>SAK</SccAuxPath>
+ <SccProvider>SAK</SccProvider>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\getopt\getopt.csproj">
+ <Project>{228B5F0B-31AE-488F-A916-B7CBB269D25F}</Project>
+ <Name>getopt</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Ivy\Ivy.csproj">
+ <Project>{F2F03CF7-0087-4EDB-AD15-80C9E8DA2617}</Project>
+ <Name>Ivy</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="testivy\messages.ivy" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="testivy\regexp.txt" />
+ <Content Include="testivy\regexp_multi.txt" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project> \ No newline at end of file
diff --git a/IvyThroughput/IvyThroughput/Program.cs b/IvyThroughput/IvyThroughput/Program.cs
new file mode 100644
index 0000000..9bc2b05
--- /dev/null
+++ b/IvyThroughput/IvyThroughput/Program.cs
@@ -0,0 +1,663 @@
+
+/* SCENARIO
+
+ ° traitement des options :
+ -v (affi version) -b bus, -r regexp file, -m message file, -n : nombre de recepteurs
+ -t [type de test => ml (memory leak), tp (throughput)
+
+ test memory leak
+ ° fork d'un emetteur et d'un (ou plusieurs) recepteur : le recepteur s'abonne à toutes les regexps,
+ se desabonne, se reabonne etc etc en boucle : on teste que l'empreinte mémoire
+ de l'emetteur ne grossisse pas
+
+ test throughput :
+ ° fork d'un emetteur et d'un ou plusieurs recepteurs : les recepteurs s'abonnent à toutes les regexps
+ ° l'emetteur envoie en boucle tous les messages du fichier de message
+ ° l'emetteur note le temps d'envoi des messages
+ ° l'emetteur envoie un die all et quitte
+*/
+
+namespace IvyThroughput
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Text;
+ using System.IO;
+ using System.Text.RegularExpressions;
+ using System.Threading;
+ using IvyBus;
+ using System.Diagnostics;
+ using System.Globalization;
+ using Gnu;
+
+
+
+ class Program
+ {
+ string helpmsg =
+ "[options] \n"+
+ "\t -b bus\tdefines the Ivy bus to which to connect to\n"+
+ "\t -v \t prints the ivy relase number\n\n"+
+ "\t -t \t type of test : ml or ml2 (memory leak) or tp (throughput)\n"+
+ "\t -r \t regexfile\tread list of regexp's from file (default to testivy/regexp.txt)\n"+
+ "\t -R \t restrict to R firsts regexps instead of all the regexp in the regexp file \n"+
+ "\t -p \t each client will prepend regexp with uniq string to "+
+ "simulate N clients with differents regexps\n"+
+ "\t -m \t messageFile\tread list of messages from file (default to testivy/messages.ivy)\n"+
+ "\t -M \t restrict to M firsts messages instead of all the message in the message file \n"+
+ "\t -n \t number of clients\n" +
+ "\t -d \t duration of the test in seconds\n" ;
+
+ List<Process> procs = new List<Process>();
+ List<string> messages = new List<string>();
+ List<string> regexps = new List<string>();
+ uint nbMess = 0;
+ uint nbReg = 0;
+ uint globalInst = 0;
+
+ Ivy ivy;
+ static List<int> bindIdList = new List<int>();
+ struct MlDataStruct{
+ public List<int> bindIdList;
+ public List<string> regexps;
+ public uint inst;
+ } ;
+
+ static MlDataStruct mds;
+ bool[] recReady;
+ class InfoBind
+ {
+ public uint currentBind;
+ public uint totalBind;
+ } ;
+
+ static Dictionary<string,InfoBind> bindByClnt = new Dictionary<string,InfoBind> ();
+
+ KindOfTest kindOfTest = KindOfTest.throughput;
+ uint testDuration = 10;
+ string bus = null;
+ uint numRegexps = uint.MaxValue;
+ uint numMessages = uint.MaxValue;
+ uint numClients = 1;
+ string regexpFile = @"..\..\testivy/regexp.txt";
+ string messageFile = @"..\..\testivy/messages.ivy";
+ bool regexpAreUniq = false;
+ int child = -1;
+
+ Timer timerSendMsg;
+ Timer timerEmetteur;
+
+ public enum KindOfTest { memoryLeak1, memoryLeak2, throughput } ;
+
+
+
+
+ void RunChild(uint i)
+ {
+ if (!getRegexps(regexpFile))
+ { return; };
+
+ if (kindOfTest != KindOfTest.memoryLeak1)
+ {
+ if (!getMessages(messageFile))
+ { return; };
+ }
+ switch (kindOfTest)
+ {
+ case KindOfTest.throughput:
+ recepteur_tp(bus, kindOfTest, i, 0);
+ break;
+ case KindOfTest.memoryLeak1:
+ recepteur_ml(bus, kindOfTest, i);
+ break;
+ case KindOfTest.memoryLeak2:
+ recepteur_tp(bus, kindOfTest, i, testDuration - 5);
+ break;
+ }
+ }
+ void RunTest(string[] args)
+ {
+
+
+ if (!getRegexps(regexpFile))
+ { return; };
+
+ if (kindOfTest != KindOfTest.memoryLeak1)
+ {
+ if (!getMessages(messageFile))
+ { return; };
+ }
+
+ string arguments = string.Join(" ", args);
+ Console.WriteLine("launching {0} receivers", numClients);
+ recReady = new bool[numClients];
+ for (uint i = 0; i < numClients; i++)
+ {
+ recReady[i] = false;
+ }
+ for (uint i = 0; i < numClients; i++)
+ {
+ ProcessStartInfo newInfo = new ProcessStartInfo("IvyThroughput.exe");
+ newInfo.CreateNoWindow = true;
+ newInfo.Arguments += string.Format("{0} -c {1}", arguments, i);
+ newInfo.WindowStyle = ProcessWindowStyle.Minimized;
+
+ Process newproc = Process.Start(newInfo);
+
+ procs.Add(newproc);
+ //Thread.Sleep(1000); // attente du lancment des fils pour eviter le Race Condition Ivy connexion croisée
+
+ }
+ Console.CancelKeyPress += new ConsoleCancelEventHandler(Console_CancelKeyPress);
+
+ emetteur();
+
+ myProcess_Exited();
+
+ }
+
+ void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e)
+ {
+ myProcess_Exited();
+ e.Cancel = true;
+ }
+
+ void myProcess_Exited()
+ {
+ ivy.Stop();
+ Console.WriteLine("end of test killing {0} receivers", numClients);
+ // kill child
+ foreach (Process p in procs)
+ {
+ try
+ {
+ p.Kill();
+ p.WaitForExit(10000);
+ }
+ catch (InvalidOperationException exp)
+ {
+ Console.WriteLine(" can't kill process {0}", exp.Message);
+ }
+ }
+ }
+
+ bool getMessages(string fileName)
+ {
+ string buffer;
+ Regex pcreg = new Regex("\"(.*)\"$");
+ try
+ {
+ using (StreamReader sr = new StreamReader(fileName, System.Text.Encoding.Default))
+ {
+
+
+ while ((buffer = sr.ReadLine()) != null && (nbMess < numMessages))
+ {
+ Match match = pcreg.Match(buffer);
+ if (match.Success)
+ {
+ messages.Add(match.Groups[1].Value);
+ nbMess++;
+ }
+ }
+
+ sr.Close();
+ }
+ }
+ catch (Exception exp)
+ {
+ // Catch all other exceptions
+ Console.WriteLine("impossible d'ouvrir :{0}", exp.Message);
+ return false;
+ }
+ return (true);
+ }
+ bool getRegexps(string fileName)
+ {
+ string buffer;
+ Regex pcreg1 = new Regex(@"add regexp \d+ : (.*)$");
+ Regex pcreg2 = new Regex(@"(\^.*)$");
+
+ try
+ {
+ using (StreamReader sr = new StreamReader(fileName, System.Text.Encoding.Default))
+ {
+
+
+ while ((buffer = sr.ReadLine()) != null && (nbReg < numRegexps))
+ {
+ Match match = pcreg1.Match(buffer);
+ if (match.Success)
+ {
+ regexps.Add(match.Groups[1].Value);
+ nbReg++;
+ }
+ else
+ {
+ Match match2 = pcreg2.Match(buffer);
+
+ if (match2.Success)
+ {
+ regexps.Add(match2.Groups[1].Value);
+ nbReg++;
+ }
+ }
+ }
+
+ sr.Close();
+ }
+ }
+ catch (Exception exp)
+ {
+ // Catch all other exceptions
+ Console.WriteLine("impossible d'ouvrir :{0}", exp.Message);
+ return false;
+ }
+
+ return true;
+ }
+
+ public void emetteur()
+ {
+ Console.WriteLine("DBG> emetteur start, pid={0}", Process.GetCurrentProcess().Id);
+ ivy = new Ivy("IvyThroughputEmit", "IvyThroughputEmit Ready");
+ // double origin = currentTime();
+ //Ivy.DebugProtocol = true;
+ //ivy.ClientConnected += new EventHandler<IvyEventArgs>(ivy_ClientConnected);
+ //ivy.ClientDisconnected += new EventHandler<IvyEventArgs>(ivy_ClientDisconnected);
+ ivy.BindingAdd += bindAddCB;
+ ivy.BindingRemove += bindRemoveCB;
+ ivy.BindingChange += bindChangeCB;
+ ivy.BindingFilter += bindFilterCB;
+ ivy.BindMsg(@"^IvyThroughputReceive_(\d+)\s+Ready", recepteurReadyCB);
+
+ timerEmetteur = new Timer(stopCB, null, testDuration * 1000, Timeout.Infinite);
+
+ ivy.Start(bus);
+ ivy.MainLoop();
+ }
+
+ void ivy_ClientConnected(object sender, IvyEventArgs e)
+ {
+ Console.WriteLine("DBG> client connected {0}", e.Client.ApplicationName);
+ }
+ void ivy_ClientDisconnected(object sender, IvyEventArgs e)
+ {
+ Console.WriteLine("DBG> client disconnected {0}", e.Client.ApplicationName);
+ }
+ public void recepteur_tp(string bus, KindOfTest kod, uint inst, uint exitAfter)
+ {
+ string agentName = string.Format("IvyThroughputReceive_{0}", inst);
+ string agentNameReady = agentName + " Ready";
+ //double origin = currentTime();
+ globalInst = inst;
+
+ Console.WriteLine("DBG> recepteur_{0} start, pid={1}", inst, Process.GetCurrentProcess().Id );
+ ivy = new Ivy(agentName, agentNameReady);
+
+ uint debugInt = 0;
+ foreach (string reg in regexps)
+ {
+ string regex = reg;
+ debugInt++;
+ if (regexpAreUniq) { regex += string.Format(" {0}", inst); }
+ try
+ {
+ ivy.BindMsg(regex, recepteurCB, inst);
+ }
+ catch (Exception exp)
+ {
+ Console.WriteLine(" recepteur bad expression {0} : {1}", regex, exp.Message);
+ }
+ }
+ ivy.BindMsg("^start(OfSequence)", startOfSeqCB );
+ ivy.BindMsg("^end(OfSequence)", endOfSeqCB);
+
+ if (kod == KindOfTest.memoryLeak2)
+ {
+ Timer timer = new Timer( exitCB, null,exitAfter * 1000, Timeout.Infinite);
+ }
+ Console.WriteLine("DBG> recepteur_{0} bindings={1}", inst, debugInt);
+
+ //usleep (inst * 50 * 1000);
+ ivy.Start(bus);
+ ivy.MainLoop();
+ }
+
+ public void recepteur_ml(string bus, KindOfTest kod, uint inst)
+ {
+ string agentName = string.Format("IvyThroughputReceive_{0}", inst);
+ string agentNameReady = agentName + " Ready";
+ //double origin = currentTime();
+ globalInst = inst;
+
+ Console.WriteLine("DBG> recepteur_{0} start, pid={1}", inst, Process.GetCurrentProcess().Id);
+ ivy = new Ivy(agentName, agentNameReady);
+
+ uint debugInt = 0;
+ foreach (string reg in regexps)
+ {
+ string regex = reg;
+ debugInt++;
+ if (regexpAreUniq) { regex += string.Format(" {0}", inst); }
+ try
+ {
+ bindIdList.Add(ivy.BindMsg(reg, recepteurCB, inst));
+ }
+ catch (Exception exp)
+ {
+ Console.WriteLine(" recepteur bad expression {0} : {1}", regex, exp.Message);
+ }
+ }
+ ivy.BindMsg("^start(OfSequence)", startOfSeqCB);
+ ivy.BindMsg("^end(OfSequence)", endOfSeqCB);
+
+ mds.bindIdList = bindIdList;
+ mds.regexps = regexps;
+ mds.inst = inst;
+
+ Timer timer = new Timer(desabonneEtReabonneCB, mds, 1000, Timeout.Infinite);
+
+ ivy.Start(bus);
+ ivy.MainLoop();
+ }
+
+ private InfoBind GetInfoBind(string appName)
+ {
+ InfoBind info;
+
+ if (bindByClnt.ContainsKey(appName))
+ {
+ info = bindByClnt[appName];
+ }
+ else
+ {
+ info = new InfoBind();
+ info.currentBind = 0;
+ info.totalBind = (uint)(regexps.Count + 2);
+ bindByClnt.Add(appName, info);
+ }
+ return info;
+ }
+
+ public void bindAddCB(object sender, IvyEventArgs args)
+ {
+ string appName = args.Client.ApplicationName;
+ Debug.Assert(appName != null);
+ InfoBind info = GetInfoBind(appName);
+ info.currentBind++;
+
+ if (info.currentBind == info.totalBind)
+ {
+ Console.WriteLine("Application:{0} ALL REGEXPS BINDED", appName);
+ }
+ else
+ {
+ //Console.WriteLine("Application:{0} bind [{1}/{2}]", appName,info.currentBind, info.totalBind);
+ }
+
+ }
+
+ public void bindRemoveCB(object sender, IvyEventArgs args)
+ {
+ string appName = args.Client.ApplicationName;
+ Debug.Assert(appName != null);
+
+ InfoBind info = GetInfoBind(appName);
+
+
+
+ if ((args.Id % 10000) == 0)
+ {
+ Console.WriteLine("Application:{0} bind '{1}' REMOVED", appName, args.Id);
+ }
+
+
+ }
+ public void bindFilterCB(object sender, IvyEventArgs args)
+ {
+ string appName = args.Client.ApplicationName;
+ Debug.Assert(appName != null);
+
+ InfoBind info = GetInfoBind(appName);
+
+ Console.WriteLine("Application:{0} bind '{1}' FILTRED", appName, args.Argument);
+
+
+ }
+ public void bindChangeCB(object sender, IvyEventArgs args)
+ {
+ string appName = args.Client.ApplicationName;
+
+ Debug.Assert(appName != null);
+ InfoBind info = GetInfoBind(appName);
+
+ Console.WriteLine("Application:{0} bind '{1}' CHANGED", appName, args.Argument);
+
+ }
+
+
+
+
+ public void stopCB(Object state)
+ {
+ ivy.Stop();
+ }
+
+
+ public void sendAllMessageCB(Object state)
+ {
+ double startTime = currentTime();
+ int envoyes = 0;
+
+ ivy.SendMsg("startOfSequence");
+ foreach (string msg in messages)
+ {
+ envoyes += ivy.SendMsg(msg);
+ }
+ ivy.SendMsg("endOfSequence");
+
+ Console.WriteLine("[ivy {0}] envoyer [{1}/{2}] messages filtres par {3} regexps a {4} clients prends {5:0.00} secondes",
+ Ivy.Version,
+ envoyes, nbMess, nbReg, numClients,
+ (currentTime() - startTime) / 1000.0);
+ timerSendMsg.Change(1000, Timeout.Infinite);
+
+ }
+
+ public void recepteurCB(object sender, IvyMessageEventArgs args)
+ {
+ // ulong recN = (long) user_data;
+ // Console.WriteLine (".");
+ // if (!((argc == 1) && (strcmp (argv[0], "OfSequence")) == 0))
+ nbMess++;
+ }
+
+
+ public void recepteurReadyCB(object sender, IvyMessageEventArgs args)
+ {
+ uint instance = uint.Parse( args[0] );
+ if(recReady[instance])
+ Console.WriteLine(" recepteur {0} allready READY id={1}???", instance, args.Id);
+ recReady[instance] = true;
+ Console.WriteLine(" recepteur {0} ready id={1}", instance, args.Id);
+
+ for (uint i = 0; i < numClients; i++)
+ {
+ if (recReady[i] == false)
+ {
+ return;
+ }
+ }
+ if (ivy.IvyClients.Count != numClients)
+ {
+ Console.WriteLine("Emetteur : {0} recepteurs prevu {1} effectifs !!", numClients, ivy.IvyClients.Count);
+ }
+ if (kindOfTest != KindOfTest.memoryLeak1)
+ {
+ timerSendMsg = new Timer(sendAllMessageCB, messages, 1000, Timeout.Infinite);
+ Console.WriteLine("Emetteur : tous recepteurs prets : on envoie la puree !!");
+ }
+
+
+ }
+
+
+
+ public void startOfSeqCB(object sender, IvyMessageEventArgs args)
+ {
+ nbMess = 0;
+ }
+
+
+ public void endOfSeqCB(object sender, IvyMessageEventArgs args)
+ {
+ //nbMess--;
+ Console.WriteLine("recepteur {0} a recu {1} messages", globalInst, nbMess);
+ }
+
+
+ public void desabonneEtReabonneCB(Object state)
+ {
+
+ // Console.WriteLine ("on entre dans desabonneEtReabonneCB\n");
+
+
+ // DESABONNE
+ foreach (ushort id in mds.bindIdList)
+ {
+ ivy.UnbindMsg(id);
+ }
+ mds.bindIdList.Clear();
+
+ // REABONNE
+ foreach (string reg in mds.regexps)
+ {
+ mds.bindIdList.Add(ivy.BindMsg(reg, recepteurCB, mds.inst ));
+ }
+
+ // CHANGE REGEXP
+ foreach (ushort id in mds.bindIdList)
+ {
+ ivy.ChangeMsg(id, "^Une regexp (BIDON)");
+ }
+
+
+ // DESABONNE
+ foreach (ushort id in mds.bindIdList)
+ {
+ ivy.UnbindMsg(id);
+ }
+ mds.bindIdList.Clear();
+
+ Timer timer = new Timer(changeRegexpCB, mds, 1000, Timeout.Infinite);
+
+ }
+
+
+ public void changeRegexpCB(Object state)
+ {
+
+ // Console.WriteLine ("on entre dans abonneEtDesabonneCB\n");
+
+
+
+ foreach (ushort id in mds.bindIdList)
+ {
+ ivy.ChangeMsg(id, "^Une regexp (BIDON)");
+ }
+ Timer timer = new Timer(changeRegexpCB, mds, 1000, Timeout.Infinite);
+
+ }
+
+ public void exitCB(Object state)
+ {
+ Console.WriteLine("DBG> client exit\n");
+ ivy.Stop();
+ Environment.Exit(0);
+ }
+ public double currentTime()
+ {
+ return DateTime.Now.TimeOfDay.TotalMilliseconds;
+ }
+
+ static void Main(string[] args)
+ {
+
+ Program prg = new Program();
+
+ GetOpt opt = new GetOpt(args, "vpb:r:m:R:M:n:t:d:c:");
+ Arg a;
+ while ((a = opt.NextArg()) != null)
+ switch (a.Flag)
+ {
+ case 'b':
+ prg.bus = a.Parameter;
+ break;
+ case 'v':
+ Console.WriteLine("ivy C# library version {0}", Ivy.Version);
+ break;
+ case 'p':
+ prg.regexpAreUniq = true;
+ break;
+ case 't':
+ if (a.Parameter == "ml")
+ {
+ prg.kindOfTest = KindOfTest.memoryLeak1;
+ }
+ else if (a.Parameter == "ml1")
+ {
+ prg.kindOfTest = KindOfTest.memoryLeak1;
+ }
+ else if (a.Parameter == "ml2")
+ {
+ prg.kindOfTest = KindOfTest.memoryLeak2;
+ }
+ else if (a.Parameter == "tp")
+ {
+ prg.kindOfTest = KindOfTest.throughput;
+ }
+ else
+ {
+ Console.WriteLine("usage: IvyThroughput {0}", prg.helpmsg);
+ Environment.Exit(1);
+ }
+ break;
+ case 'r':
+ prg.regexpFile = a.Parameter;
+ break;
+ case 'm':
+ prg.messageFile = a.Parameter;
+ break;
+ case 'R':
+ prg.numRegexps = uint.Parse(a.Parameter);
+ break;
+ case 'M':
+ prg.numMessages = uint.Parse(a.Parameter);
+ break;
+ case 'n':
+ prg.numClients = uint.Parse(a.Parameter);
+ break;
+ case 'd':
+ prg.testDuration = uint.Parse(a.Parameter);
+ break;
+ case 'c':
+ prg.child = int.Parse(a.Parameter);
+ break;
+ default:
+ Console.WriteLine("usage: {0} {1}", args[0], prg.helpmsg);
+ Environment.Exit(1);
+ break;
+ }
+
+
+
+ if (prg.child>=0)
+ prg.RunChild((uint)prg.child);
+ else
+ prg.RunTest(args);
+
+ }
+ }
+}
diff --git a/IvyThroughput/IvyThroughput/Properties/AssemblyInfo.cs b/IvyThroughput/IvyThroughput/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..e0b3b2f
--- /dev/null
+++ b/IvyThroughput/IvyThroughput/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Les informations générales relatives à un assembly dépendent de
+// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
+// associées à un assembly.
+[assembly: AssemblyTitle("IvyThroughput")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("IvyThroughput")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2008")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly
+// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de
+// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
+[assembly: ComVisible(false)]
+
+// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
+[assembly: Guid("cbd064a4-9d12-45df-abae-d7aaad46a6fb")]
+
+// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
+//
+// Version principale
+// Version secondaire
+// Numéro de build
+// Révision
+//
+// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
+// en utilisant '*', comme indiqué ci-dessous :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]