def METHOD_NAME(self, resource_group):
    profile_name = 'profile123'
    self.afd_profile_create_cmd(resource_group, profile_name)
    endpoint_name = self.create_random_name(prefix='endpoint', length=24)
    enabled_state = "Enabled"
    checks = [JMESPathCheck('enabledState', 'Enabled')]
    self.afd_endpoint_create_cmd(resource_group,
                                 profile_name,
                                 endpoint_name,
                                 enabled_state,
                                 checks=checks)
    endpoint = self.afd_endpoint_show_cmd(resource_group, profile_name, endpoint_name).get_output_in_json()
    domain = endpoint["hostName"]  
    start_time = datetime.datetime.now().astimezone().replace(microsecond=0)
    if self.is_playback_mode():
        start_time = datetime.datetime(2022, 3, 24, 7, 14, 35, tzinfo=datetime.timezone.utc)
    end_time = start_time + datetime.timedelta(seconds=300)
    location_list_commands = f"afd log-analytic location list -g {resource_group} --profile-name {profile_name}"
    self.cmd(location_list_commands, expect_failure=False)
    resource_list_commands = f"afd log-analytic resource list -g {resource_group} --profile-name {profile_name}"
    self.cmd(resource_list_commands, expect_failure=False)
    metric_list_commands = f"afd log-analytic metric list -g {resource_group} --profile-name {profile_name} --metrics clientRequestCount " + \
                           f"--date-time-begin {start_time.isoformat()} --granularity PT5M --date-time-end {end_time.isoformat()} --custom-domains {domain} --protocols http --group-by cacheStatus"
    self.cmd(metric_list_commands, expect_failure=False)
    ranking_list_commands = f"afd log-analytic ranking list -g {resource_group} --profile-name {profile_name} --metrics clientRequestCount " + \
                            f"--date-time-begin {start_time.isoformat()} --date-time-end {end_time.isoformat()} --custom-domains {domain} --rankings referrer --max-ranking 10"
    self.cmd(ranking_list_commands, expect_failure=False)
    self.afd_endpoint_delete_cmd(resource_group, endpoint_name, profile_name)