This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class SlowQueryInterceptor : IDbCommandInterceptor | |
| { | |
| private const int SlowQueryThreshold = 200; // milliSecond | |
| public DbDataReader ReaderExecuted( | |
| DbCommand command, | |
| CommandExecutedEventData eventData, | |
| DbDataReader result) | |
| { | |
| if (!(eventData.Duration.TotalMilliseconds > SlowQueryThreshold)) return result; | |
| var factory = eventData.Context!.Database.GetService<ILoggerFactory>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3.3' | |
| services: | |
| elasticsearch: | |
| image: elasticsearch:7.14.2 | |
| container_name: elasticsearch | |
| environment: | |
| - discovery.type=single-node | |
| ulimits: | |
| memlock: | |
| soft: -1 |