Ejemplo n.º 1
0
 public async Task <string> IndexGetPerf()
 {
     return(await SimplePerfTest.Run(64, 2000, async (i, j) =>
     {
         var q = new Store.IndexGet(Consts.SYS_EMPLOEE_MODEL_ID, Consts.EMPLOEE_UI_ACCOUNT_ID);
         q.Where(new Store.KeyPredicate(Consts.EMPLOEE_ACCOUNT_ID, Store.KeyPredicateType.Equal, "Admin"));
         var _ = await q.ToIndexRowAsync();
     }));
 }
Ejemplo n.º 2
0
        public async Task <string> IndexGet()
        {
            sessionId.Value = 12345678;
            Log.Debug($"1.ThreadId: {Thread.CurrentThread.ManagedThreadId} {Thread.CurrentThread.IsThreadPoolThread} SessionId: {sessionId.Value}");
            var q = new Store.IndexGet(Consts.SYS_EMPLOEE_MODEL_ID, Consts.EMPLOEE_UI_ACCOUNT_ID);

            q.Where(new Store.KeyPredicate(Consts.EMPLOEE_ACCOUNT_ID, Store.KeyPredicateType.Equal, "Admin"));
            var res = await q.ToIndexRowAsync();

            Log.Debug($"2.ThreadId: {Thread.CurrentThread.ManagedThreadId} {Thread.CurrentThread.IsThreadPoolThread} SessionId: {sessionId.Value}");
            return(res.IsEmpty ? "Null\n" : "Ok\n");
        }