public override async Task ProfileAsync(IElasticClient client, ColoredConsoleWriter output)
		{
			for (int i = 0; i < _iterations; i++)
			{
				var analyzeResponse = await client.AnalyzeAsync(a => a
					.Analyzer("standard")
					.Text(_sentenceGenerator.Sentance())
				).ConfigureAwait(false);

				if (!analyzeResponse.IsValid)
					output.WriteOrange($"Invalid response from {nameof(AnalyzeAsyncOperation)} operation");
			}
		}
Exemplo n.º 2
0
        public override async Task ProfileAsync(IElasticClient client, ColoredConsoleWriter output)
        {
            for (int i = 0; i < _iterations; i++)
            {
                var analyzeResponse = await client.AnalyzeAsync(a => a
                                                                .Analyzer("standard")
                                                                .Text(_sentenceGenerator.Sentence())
                                                                ).ConfigureAwait(false);

                if (!analyzeResponse.IsValid)
                {
                    output.WriteOrange($"Invalid response from {nameof(AnalyzeAsyncOperation)} operation");
                }
            }
        }