Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
c270d6bb
Commit
c270d6bb
authored
Mar 23, 2014
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Windows monobuild sorted
parent
c2ee411b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
135 additions
and
5 deletions
+135
-5
BasicTest.csproj
BasicTest/BasicTest.csproj
+57
-0
Program.cs
BasicTest/Program.cs
+54
-0
StackExchange.Redis.sln
StackExchange.Redis.sln
+12
-0
monobuild.bash
monobuild.bash
+4
-1
monobuild.bash~
monobuild.bash~
+0
-3
monobuild.cmd
monobuild.cmd
+8
-1
No files found.
BasicTest/BasicTest.csproj
0 → 100644
View file @
c270d6bb
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"12.0"
DefaultTargets=
"Build"
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>
{BE213DFB-5334-4441-B975-0DBCFD5F5A73}
</ProjectGuid>
<OutputType>
Exe
</OutputType>
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
BasicTest
</RootNamespace>
<AssemblyName>
BasicTest
</AssemblyName>
<TargetFrameworkVersion>
v4.5
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
</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"
/>
</ItemGroup>
<ItemGroup>
<Compile
Include=
"Program.cs"
/>
</ItemGroup>
<ItemGroup>
<ProjectReference
Include=
"..\StackExchange.Redis\StackExchange.Redis.csproj"
>
<Project>
{7cec07f2-8c03-4c42-b048-738b215824c1}
</Project>
<Name>
StackExchange.Redis
</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder
Include=
"Properties\"
/>
</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
BasicTest/Program.cs
0 → 100644
View file @
c270d6bb
using
System
;
using
System.Diagnostics
;
using
System.Runtime.CompilerServices
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
StackExchange.Redis
;
namespace
BasicTest
{
class
Program
{
static
void
Main
()
{
MassiveBulkOpsAsync
(
true
,
true
);
MassiveBulkOpsAsync
(
true
,
false
);
MassiveBulkOpsAsync
(
false
,
true
);
MassiveBulkOpsAsync
(
false
,
false
);
}
const
int
AsyncOpsQty
=
100000
;
static
void
MassiveBulkOpsAsync
(
bool
preserveOrder
,
bool
withContinuation
)
{
using
(
var
muxer
=
ConnectionMultiplexer
.
Connect
(
"127.0.0.1"
))
{
muxer
.
PreserveAsyncOrder
=
preserveOrder
;
RedisKey
key
=
"MBOA"
;
var
conn
=
muxer
.
GetDatabase
();
muxer
.
Wait
(
conn
.
PingAsync
());
Action
<
Task
>
nonTrivial
=
delegate
{
Thread
.
SpinWait
(
5
);
};
var
watch
=
Stopwatch
.
StartNew
();
for
(
int
i
=
0
;
i
<=
AsyncOpsQty
;
i
++)
{
var
t
=
conn
.
StringSetAsync
(
key
,
i
);
if
(
withContinuation
)
t
.
ContinueWith
(
nonTrivial
);
}
int
val
=
(
int
)
muxer
.
Wait
(
conn
.
StringGetAsync
(
key
));
watch
.
Stop
();
Console
.
WriteLine
(
"After {0}: {1}"
,
AsyncOpsQty
,
val
);
Console
.
WriteLine
(
"({3}, {4})\r\n{2}: Time for {0} ops: {1}ms; ops/s: {5}"
,
AsyncOpsQty
,
watch
.
ElapsedMilliseconds
,
Me
(),
withContinuation
?
"with continuation"
:
"no continuation"
,
preserveOrder
?
"preserve order"
:
"any order"
,
AsyncOpsQty
/
watch
.
Elapsed
.
TotalSeconds
);
}
}
protected
static
string
Me
([
CallerMemberName
]
string
caller
=
null
)
{
return
caller
;
}
}
}
StackExchange.Redis.sln
View file @
c270d6bb
...
...
@@ -34,6 +34,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Redis Configs", "Redis Conf
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{709E0CE4-F0BA-4933-A4FD-4A8B6668A5D4}"
ProjectSection(SolutionItems) = preProject
monobuild.bash = monobuild.bash
monobuild.cmd = monobuild.cmd
StackExchange.Redis.nuspec = StackExchange.Redis.nuspec
EndProjectSection
EndProject
...
...
@@ -41,6 +43,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConnectionWatcher", "Connec
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Docs", "Docs\Docs.csproj", "{7909952C-0F38-4E62-A7BA-1A77E1452FDA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BasicTest", "BasicTest\BasicTest.csproj", "{BE213DFB-5334-4441-B975-0DBCFD5F5A73}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
...
...
@@ -81,6 +85,14 @@ Global
{7909952C-0F38-4E62-A7BA-1A77E1452FDA}.Release|Any CPU.Build.0 = Release|Any CPU
{7909952C-0F38-4E62-A7BA-1A77E1452FDA}.Verbose|Any CPU.ActiveCfg = Release|Any CPU
{7909952C-0F38-4E62-A7BA-1A77E1452FDA}.Verbose|Any CPU.Build.0 = Release|Any CPU
{BE213DFB-5334-4441-B975-0DBCFD5F5A73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BE213DFB-5334-4441-B975-0DBCFD5F5A73}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BE213DFB-5334-4441-B975-0DBCFD5F5A73}.Log Output|Any CPU.ActiveCfg = Release|Any CPU
{BE213DFB-5334-4441-B975-0DBCFD5F5A73}.Log Output|Any CPU.Build.0 = Release|Any CPU
{BE213DFB-5334-4441-B975-0DBCFD5F5A73}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BE213DFB-5334-4441-B975-0DBCFD5F5A73}.Release|Any CPU.Build.0 = Release|Any CPU
{BE213DFB-5334-4441-B975-0DBCFD5F5A73}.Verbose|Any CPU.ActiveCfg = Release|Any CPU
{BE213DFB-5334-4441-B975-0DBCFD5F5A73}.Verbose|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
...
...
monobuild.bash
View file @
c270d6bb
rm
-rf
StackExchange.Redis/bin/mono
rm
-rf
BasicTest/bin/mono
mkdir
StackExchange.Redis/bin/mono
mcs
-recurse
:StackExchange.Redis/
*
.cs
-out
:StackExchange.Redis/bin/mono/StackExchange.Redis.dll
-target
:library
-unsafe
+
-r
:System.IO.Compression.dll
-d
:MONO
mkdir
BasicTest/bin/mono
mcs
-recurse
:StackExchange.Redis/
*
.cs
-out
:StackExchange.Redis/bin/mono/StackExchange.Redis.dll
-target
:library
-unsafe
+
-o
+
-r
:System.IO.Compression.dll
-d
:MONO
mcs BasicTest/Program.cs
-out
:BasicTest/bin/mono/BasicTest.exe
-target
:exe
-o
+
-r
:StackExchange.Redis/bin/mono/StackExchange.Redis.dll
monobuild.bash~
deleted
100755 → 0
View file @
c2ee411b
rm -rf StackExchange.Redis\bin\mono
mkdir StackExchange.Redis\bin\mono
mcs -recurse:StackExchange.Redis\*.cs -out:StackExchange.Redis\bin\mono\StackExchange.Redis.dll -target:library -unsafe+ -r:System.IO.Compression.dll -d:MONO
monobuild.cmd
View file @
c270d6bb
@rd /s /q StackExchange.Redis\bin\mono
@rd /s /q BasicTest\bin\mono
@md StackExchange.Redis\bin\mono
@call mcs -recurse:StackExchange.Redis\*.cs -out:StackExchange.Redis\bin\mono\StackExchange.Redis.dll -target:library -unsafe+ -r:System.IO.Compression.dll -d:MONO
\ No newline at end of file
@md BasicTest\bin\mono
@echo Building StackExchange.Redis.dll ...
@call mcs -recurse:StackExchange.Redis\*.cs -out:StackExchange.Redis\bin\mono\StackExchange.Redis.dll -target:library -unsafe+ -o+ -r:System.IO.Compression.dll -d:MONO
@echo Building BasicTest.exe ...
@call mcs BasicTest\Program.cs -out:BasicTest\bin\mono\BasicTest.exe -target:exe -o+ -r:StackExchange.Redis\bin\mono\StackExchange.Redis.dll
@copy StackExchange.Redis\bin\mono\*.* BasicTest\bin\mono > nul
@call BasicTest\bin\mono\BasicTest.exe
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment