Skip to content

Commit

Permalink
Redis性能测试
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Nov 10, 2018
1 parent ba13043 commit c7b13ae
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Test/Program.cs
Expand Up @@ -19,14 +19,17 @@ static void Main(String[] args)
// 激活FullRedis,否则Redis.Create会得到默认的Redis对象
FullRedis.Register();

Test1();
Test4();

Console.ReadKey();
}

static void Test1()
{
var ic = Redis.Create("127.0.0.1:6000", 3);
//var ic = new FullRedis();
//ic.Server = "127.0.0.1:6000";
//ic.Db = 3;
ic.Log = XTrace.Log;

// 简单操作
Expand Down Expand Up @@ -59,7 +62,7 @@ static void Test1()
Console.WriteLine(arr.Join(","));

// 集合
var set = ic.GetSet<String>("sss");
var set = ic.GetSet<String>("181110_1234");
set.Add("xx1");
set.Add("xx2");
set.Add("xx3");
Expand Down Expand Up @@ -117,5 +120,11 @@ static void Test3()
Console.WriteLine(item);
}
}

static void Test4()
{
var ic = Redis.Create("127.0.0.1:6000", 5);
ic.Bench();
}
}
}

0 comments on commit c7b13ae

Please sign in to comment.