コード例 #1
0
 protected override async Task OnExecuteAsync(CommandLineApplication app)
 {
     ValidateParameters();
     var storageAccount = AzureStorageAccount.CreateStorageAccountFromConnectionString(ConnectionString);
     var serviceTable   = new ServiceTable(AzureStorageAccount.GetStorageTable(ConnectionString));
     var versionTable   = new VersionTable(AzureStorageAccount.GetStorageTable(ConnectionString));
     await Helper.LoadTestForQuery(serviceTable, versionTable);
 }
コード例 #2
0
        protected override async Task OnExecuteAsync(CommandLineApplication app)
        {
            ValidateParameters();
            var monitorTable = Helper.GenMonitorTable(TableName, AzureStorageAccount.GetStorageTable(ConnectionString));
            var stopWatch    = new Stopwatch();

            stopWatch.Start();
            var entries = await monitorTable.GetBasedTimestamp(DaysBeforeNow);

            stopWatch.Stop();
            Console.WriteLine($"Get {entries.Count} entries takes {stopWatch.ElapsedMilliseconds} milli-seconds");
        }
コード例 #3
0
        protected override async Task OnExecuteAsync(CommandLineApplication app)
        {
            ValidateParameters();
            var storageAccount = AzureStorageAccount.CreateStorageAccountFromConnectionString(ConnectionString);
            var monitorTable   = Helper.GenMonitorTable(TableName, AzureStorageAccount.GetStorageTable(ConnectionString));
            var stopWatch      = new Stopwatch();

            stopWatch.Start();
            var deleted = await monitorTable.DeleteOldEntities(DaysBeforeNow);

            stopWatch.Stop();
            Console.WriteLine($"Delete {deleted} entries takes {stopWatch.ElapsedMilliseconds} milli-seconds");
        }
コード例 #4
0
 protected override async Task OnExecuteAsync(CommandLineApplication app)
 {
     ValidateParameters();
     if (string.IsNullOrEmpty(SubscriptionId) || string.IsNullOrEmpty(ResourceName))
     {
         ReportError(new ArgumentException("Missing subscriptionId or resource name"));
     }
     var signalrInstanceTbl = new SignalRInstanceTable(SignalRConstants.SignalRInstanceTableName, AzureStorageAccount.GetStorageTable(ConnectionString));
     await Helper.SearchEntity(signalrInstanceTbl, SubscriptionId, ResourceName);
 }