diff options
author | fcolin | 2007-02-01 12:03:55 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 12:03:55 +0000 |
commit | 98ab5d0164040427f7c554febae125686284e2a7 (patch) | |
tree | a6ab9c20fbf1172553d364c91447149e4dc72ab0 /IvyToDel/IvyPerf | |
parent | 531dfa4389ba34a0d32eed0ba8c82839e437d992 (diff) | |
download | ivy-csharp-98ab5d0164040427f7c554febae125686284e2a7.zip ivy-csharp-98ab5d0164040427f7c554febae125686284e2a7.tar.gz ivy-csharp-98ab5d0164040427f7c554febae125686284e2a7.tar.bz2 ivy-csharp-98ab5d0164040427f7c554febae125686284e2a7.tar.xz |
modification structure svn
Diffstat (limited to 'IvyToDel/IvyPerf')
-rw-r--r-- | IvyToDel/IvyPerf/App.ico | bin | 0 -> 1078 bytes | |||
-rw-r--r-- | IvyToDel/IvyPerf/AssemblyInfo.cs | 58 | ||||
-rw-r--r-- | IvyToDel/IvyPerf/IvyPerf.cs | 74 | ||||
-rw-r--r-- | IvyToDel/IvyPerf/IvyPerf.csproj | 140 | ||||
-rw-r--r-- | IvyToDel/IvyPerf/IvyPerf.csproj.vspscc | 10 | ||||
-rw-r--r-- | IvyToDel/IvyPerf/IvyPerf_TemporaryKey.pfx | bin | 0 -> 1676 bytes |
6 files changed, 282 insertions, 0 deletions
diff --git a/IvyToDel/IvyPerf/App.ico b/IvyToDel/IvyPerf/App.ico Binary files differnew file mode 100644 index 0000000..3a5525f --- /dev/null +++ b/IvyToDel/IvyPerf/App.ico diff --git a/IvyToDel/IvyPerf/AssemblyInfo.cs b/IvyToDel/IvyPerf/AssemblyInfo.cs new file mode 100644 index 0000000..65a2ee8 --- /dev/null +++ b/IvyToDel/IvyPerf/AssemblyInfo.cs @@ -0,0 +1,58 @@ +using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// Les informations générales relatives à un assembly dépendent de
+// l'ensemble d'attributs suivant. Pour modifier les informations
+// associées à un assembly, changez les valeurs de ces attributs.
+//
+[assembly: AssemblyTitle("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//
+// 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 des numéros de révision et de build par défaut
+// en utilisant '*', comme ci-dessous :
+
+[assembly: AssemblyVersion("2.0.*")]
+
+//
+// Pour signer votre assembly, vous devez spécifier la clé à utiliser. Consultez
+// la documentation Microsoft .NET Framework pour plus d'informations sur la signature d'un assembly.
+//
+// Utilisez les attributs ci-dessous pour contrôler la clé utilisée lors de la signature.
+//
+// Remarques :
+// (*) Si aucune clé n'est spécifiée, l'assembly n'est pas signé.
+// (*) KeyName fait référence à une clé installée dans le fournisseur de
+// services cryptographiques (CSP) de votre ordinateur. KeyFile fait référence à un fichier qui contient
+// une clé.
+// (*) Si les valeurs de KeyFile et de KeyName sont spécifiées, le
+// traitement suivant se produit :
+// (1) Si KeyName se trouve dans le CSP, la clé est utilisée.
+// (2) Si KeyName n'existe pas mais que KeyFile existe, la clé
+// de KeyFile est installée dans le CSP et utilisée.
+// (*) Pour créer KeyFile, vous pouvez utiliser l'utilitaire sn.exe (Strong Name, Nom fort).
+// Lors de la spécification de KeyFile, son emplacement doit être
+// relatif au répertoire de sortie du projet qui est
+// %Project Directory%\obj\<configuration>. Par exemple, si votre KeyFile se trouve
+// dans le répertoire du projet, vous devez spécifier l'attribut
+// AssemblyKeyFile sous la forme [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+// (*) DelaySign (signature différée) est une option avancée. Pour plus d'informations, consultez la
+// documentation Microsoft .NET Framework.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
diff --git a/IvyToDel/IvyPerf/IvyPerf.cs b/IvyToDel/IvyPerf/IvyPerf.cs new file mode 100644 index 0000000..9d37883 --- /dev/null +++ b/IvyToDel/IvyPerf/IvyPerf.cs @@ -0,0 +1,74 @@ +using System;
+using IvyBus;
+using System.Threading;
+using System.Globalization;
+using System.Collections.Specialized;
+
+namespace IvyPerf
+{
+ /// <summary>
+ /// Description résumée de IvyPerf.
+ /// mesure des perfo de round trip entre deux applis
+ /// </summary>
+ class IvyPerf
+ {
+ static Ivy bus;
+ static double origin = 0;
+
+ static double currentTime() // en ms
+ {
+ double time;
+ time = (double)(DateTime.Now.Ticks) / (double)(TimeSpan.TicksPerMillisecond);
+ //time = Environment.TickCount;
+ return time;
+ }
+ [IvyBinding("^ping ts=(.*)")]
+ static void Reply(object sender, IvyMessageEventArgs args)
+ {
+ bus.SendMsg("pong ts={0} tr={1}", args[0], currentTime() - origin );
+ }
+ [IvyBinding("^pong ts=(.*) tr=(.*)")]
+ static void Pong(object sender, IvyMessageEventArgs args)
+ {
+ double current = currentTime() - origin;
+ double ts = double.Parse(args[0], bus.Culture );
+ double tr = double.Parse(args[1], bus.Culture );
+ double roundtrip1 = tr - ts;
+ double roundtrip2 = current - tr;
+ double roundtrip3 = current - ts;
+ Console.WriteLine("round trip {0} {1} {2}", roundtrip1, roundtrip2, roundtrip3);
+ }
+ /// <summary>
+ /// Point d'entrée principal de l'application.
+ /// </summary>
+ [STAThread]
+ static void Main(string[] args)
+ {
+ int timeout = 1000;
+ if (args.Length > 0)
+ timeout = int.Parse(args[0]);
+ bus = new Ivy("IvyPerf", "IvyPref ready");
+ bus.SentMessageFilter.Add("ping");
+ bus.SentMessageFilter.Add("pong");
+ bus.SentMessageFilter.Add("IvyPref");
+ bus.BindingFilter += new EventHandler<IvyEventArgs>(bus_BindingFilter);
+ //TODO how to autobind
+ //bus.BindAttibute(typeof(IvyPerf));
+ //TODO auto generation of testtarget ?? how to
+ //bus.BindMsg("test", new EventHandler<IvyMessageEventArgs>(testtarget));
+ bus.Start(null);
+ origin = currentTime();
+ while( true )
+ {
+ Thread.Sleep( timeout );
+ int count = bus.SendMsg("ping ts={0}", currentTime() - origin );
+ if ( count == 0 ) Console.Write( "." );
+ }
+ }
+
+ static void bus_BindingFilter(object sender, IvyEventArgs e)
+ {
+ Console.WriteLine( "The app {0} regexp {1} was Filtred.", e.Client.ApplicationName,e.Argument);
+ }
+ }
+}
diff --git a/IvyToDel/IvyPerf/IvyPerf.csproj b/IvyToDel/IvyPerf/IvyPerf.csproj new file mode 100644 index 0000000..c3742e6 --- /dev/null +++ b/IvyToDel/IvyPerf/IvyPerf.csproj @@ -0,0 +1,140 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{839C9A55-7EFD-4326-95C3-2960DF390FF2}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ApplicationIcon>App.ico</ApplicationIcon>
+ <AssemblyKeyContainerName>
+ </AssemblyKeyContainerName>
+ <AssemblyName>IvyPerf</AssemblyName>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ <DefaultClientScript>JScript</DefaultClientScript>
+ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+ <DefaultTargetSchema>IE50</DefaultTargetSchema>
+ <DelaySign>false</DelaySign>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>IvyPerf</RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <StartupObject>
+ </StartupObject>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <SccProjectName>SAK</SccProjectName>
+ <SccLocalPath>SAK</SccLocalPath>
+ <SccAuxPath>SAK</SccAuxPath>
+ <SccProvider>SAK</SccProvider>
+ <ManifestCertificateThumbprint>51C861139B0DCA6D2FAD5BDB1D5280AAE1E59696</ManifestCertificateThumbprint>
+ <ManifestKeyFile>IvyPerf_TemporaryKey.pfx</ManifestKeyFile>
+ <GenerateManifests>true</GenerateManifests>
+ <SignManifests>true</SignManifests>
+ <PublishUrl>\\samba\fcolin\public_html\ClickOnce\IvyPerf\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Web</InstallFrom>
+ <UpdateEnabled>true</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <InstallUrl>http://www.tls.cena.fr/~fcolin/ClickOnce/IvyPerf/</InstallUrl>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>true</IsWebBootstrapper>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <OutputPath>bin\Debug\</OutputPath>
+ <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+ <BaseAddress>285212672</BaseAddress>
+ <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+ <ConfigurationOverrideFile>
+ </ConfigurationOverrideFile>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DocumentationFile>
+ </DocumentationFile>
+ <DebugSymbols>true</DebugSymbols>
+ <FileAlignment>4096</FileAlignment>
+ <NoStdLib>false</NoStdLib>
+ <NoWarn>
+ </NoWarn>
+ <Optimize>false</Optimize>
+ <RegisterForComInterop>false</RegisterForComInterop>
+ <RemoveIntegerChecks>false</RemoveIntegerChecks>
+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+ <WarningLevel>4</WarningLevel>
+ <DebugType>full</DebugType>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <OutputPath>bin\Release\</OutputPath>
+ <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+ <BaseAddress>285212672</BaseAddress>
+ <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+ <ConfigurationOverrideFile>
+ </ConfigurationOverrideFile>
+ <DefineConstants>TRACE</DefineConstants>
+ <DocumentationFile>
+ </DocumentationFile>
+ <DebugSymbols>false</DebugSymbols>
+ <FileAlignment>4096</FileAlignment>
+ <NoStdLib>false</NoStdLib>
+ <NoWarn>
+ </NoWarn>
+ <Optimize>true</Optimize>
+ <RegisterForComInterop>false</RegisterForComInterop>
+ <RemoveIntegerChecks>false</RemoveIntegerChecks>
+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+ <WarningLevel>4</WarningLevel>
+ <DebugType>none</DebugType>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System">
+ <Name>System</Name>
+ </Reference>
+ <Reference Include="System.Data">
+ <Name>System.Data</Name>
+ </Reference>
+ <Reference Include="System.XML">
+ <Name>System.XML</Name>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="App.ico" />
+ <Compile Include="AssemblyInfo.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="IvyPerf.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Ivy\Ivy.csproj">
+ <Project>{F2F03CF7-0087-4EDB-AD15-80C9E8DA2617}</Project>
+ <Name>Ivy</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="IvyPerf_TemporaryKey.pfx" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 2.0</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ <PostBuildEvent>
+ </PostBuildEvent>
+ </PropertyGroup>
+</Project>
\ No newline at end of file diff --git a/IvyToDel/IvyPerf/IvyPerf.csproj.vspscc b/IvyToDel/IvyPerf/IvyPerf.csproj.vspscc new file mode 100644 index 0000000..5ee9e23 --- /dev/null +++ b/IvyToDel/IvyPerf/IvyPerf.csproj.vspscc @@ -0,0 +1,10 @@ +""
+{
+"FILE_VERSION" = "9237"
+"ENLISTMENT_CHOICE" = "NEVER"
+"PROJECT_FILE_RELATIVE_PATH" = "relative:IvyPerf"
+"NUMBER_OF_EXCLUDED_FILES" = "0"
+"ORIGINAL_PROJECT_FILE_PATH" = ""
+"NUMBER_OF_NESTED_PROJECTS" = "0"
+"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
+}
diff --git a/IvyToDel/IvyPerf/IvyPerf_TemporaryKey.pfx b/IvyToDel/IvyPerf/IvyPerf_TemporaryKey.pfx Binary files differnew file mode 100644 index 0000000..db02b60 --- /dev/null +++ b/IvyToDel/IvyPerf/IvyPerf_TemporaryKey.pfx |