def METHOD_NAME(aggregator, dd_run_check, instance_custom_queries, custom_only):
    instance_custom_queries['only_custom_queries'] = custom_only
    check = SapHanaCheck('sap_hana', {}, [instance_custom_queries])
    _run_until_stable(dd_run_check, check, aggregator)
    if custom_only:
        for metric in metrics.STANDARD:
            aggregator.assert_metric(metric, count=0)
    else:
        _assert_standard_metrics(aggregator, instance_custom_queries)
    for _db in ('SYSTEMDB', 'HXE'):
        aggregator.assert_metric(
            'sap_hana.data_volume.total',
            metric_type=0,
            tags=[
                'server:{}'.format(instance_custom_queries['server']),
                'port:{}'.format(instance_custom_queries['port']),
                'db:{}'.format(_db),
                'test:sap_hana',
            ],
        )
    aggregator.assert_all_metrics_covered()