How to use the autoconfig.generator_path function in autoconfig

To help you get started, we’ve selected a few autoconfig examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gccxml / pygccxml / unittests / misc / test_performance.py View on Github external
def test_project_on_include_std_dot_hpp():
    include_std_header = os.path.join(
        autoconfig.data_directory,
        'include_std.hpp')
    clock_prev = timeit.default_timer()
    dcache = parser.file_cache_t(dcache_file_name)
    reader = parser.project_reader_t(
        parser.xml_generator_configuration_t(
            xml_generator_path=autoconfig.generator_path),
        dcache)
    reader.read_files([include_std_header])
    dcache.flush()
    clock_now = timeit.default_timer()
    print('without cache: %f seconds' % (clock_now - clock_prev))

    clock_prev = timeit.default_timer()
    dcache = parser.file_cache_t(dcache_file_name)
    reader = parser.project_reader_t(
        parser.xml_generator_configuration_t(
            xml_generator_path=autoconfig.generator_path),
        dcache)
    reader.read_files([include_std_header])
    clock_now = timeit.default_timer()
    print('with cache   : %f seconds' % (clock_now - clock_prev))
github gccxml / pygccxml / unittests / misc / test_performance.py View on Github external
clock_prev = timeit.default_timer()
    dcache = parser.file_cache_t(dcache_file_name)
    reader = parser.source_reader_t(
        parser.xml_generator_configuration_t(
            xml_generator_path=autoconfig.generator_path),
        dcache)
    reader.read_file(windows_header)
    dcache.flush()
    clock_now = timeit.default_timer()
    print('without cache: %f seconds' % (clock_now - clock_prev))

    clock_prev = timeit.default_timer()
    dcache = parser.file_cache_t(dcache_file_name)
    reader = parser.source_reader_t(
        parser.xml_generator_configuration_t(
            xml_generator_path=autoconfig.generator_path),
        dcache)
    reader.read_file(windows_header)
    clock_now = timeit.default_timer()
    print('with cache   : %f seconds' % (clock_now - clock_prev))