Automatic ELM detection and study of statistical ELM properties by Li-BES on COMPASS