Пример #1
0
def build(scriptDir, buildJobs, application, target, mode, logLevel, profile, multiThreading, showStuff, rebuild):
    if(rebuild):
        targetBuildDir = scriptDir + '/build/' + target + '/' + mode
        if os.path.exists(targetBuildDir):
            rebuildCommand = []
            rebuildCommand.append('rm')
            rebuildCommand.append('-rf')
            rebuildCommand.append(targetBuildDir)
            gbl.execute(rebuildCommand)
        else:
            print(targetBuildDir + ' does not exists. Continuing happily.')

    buildCommand = []
    buildCommand.append('scons')
    buildCommand.append('--directory')
    buildCommand.append(scriptDir)
    buildCommand.append('--jobs')
    buildCommand.append(buildJobs)
    buildCommand.append('target=' + target)
    buildCommand.append('mode=' + mode)
    buildCommand.append('logLevel=' + logLevel)
    buildCommand.append('profile=' + profile)
    buildCommand.append('multiThreading=' + multiThreading)
    buildCommand.append('showstuff=' + showStuff)
    buildCommand.append(application)
    gbl.execute(buildCommand)
    return 0
Пример #2
0
def build(scriptDir, buildJobs, application, target, mode, logLevel, profile,
          multiThreading, showStuff, rebuild):
    if (rebuild):
        targetBuildDir = scriptDir + '/build/' + target + '/' + mode
        if os.path.exists(targetBuildDir):
            rebuildCommand = []
            rebuildCommand.append('rm')
            rebuildCommand.append('-rf')
            rebuildCommand.append(targetBuildDir)
            gbl.execute(rebuildCommand)
        else:
            print(targetBuildDir + ' does not exists. Continuing happily.')

    buildCommand = []
    buildCommand.append('scons')
    buildCommand.append('--directory')
    buildCommand.append(scriptDir)
    buildCommand.append('--jobs')
    buildCommand.append(buildJobs)
    buildCommand.append('target=' + target)
    buildCommand.append('mode=' + mode)
    buildCommand.append('logLevel=' + logLevel)
    buildCommand.append('profile=' + profile)
    buildCommand.append('multiThreading=' + multiThreading)
    buildCommand.append('showstuff=' + showStuff)
    buildCommand.append(application)
    gbl.execute(buildCommand)
    return 0
Пример #3
0
def executeApplicationHelper(fname, sequence, alg, address, port, profile):
    command = getProfilePrefix(profile)
    command.append(fname)
    command.append(sequence)
    command.append(alg)
    command.append(address)
    command.append(str(port))

    # Time execution
    start_time = time.time()
    gbl.execute(command)
    end_time = time.time()
    print("Elapsed time measured by Python was %g seconds" % (end_time - start_time))
Пример #4
0
def executeApplicationHelper(fname, sequence, alg, address, port, profile):
    command = getProfilePrefix(profile)
    command.append(fname)
    command.append(sequence)
    command.append(alg)
    command.append(address)
    command.append(str(port))

    # Time execution
    start_time = time.time()
    gbl.execute(command)
    end_time = time.time()
    print("Elapsed time measured by Python was %g seconds" %
          (end_time - start_time))
Пример #5
0
def processProfilingInformation(profile):
    if profile == 'perf':
        command = ['perf', 'report']
        gbl.execute(command)

    if profile == 'gprof':
        readableOutputFile = 'profileAnalysis.txt'
        command = []
        command.append('gprof')
        command.append(fname)
        command.append('gmon.out')
        command.append(readableOutputFile)

        gbl.execute(command)
        print('You can find the result of the gprof profiling in {readableOutput}'.format(readableOutput = readableOutputFile))
Пример #6
0
def processProfilingInformation(profile):
    if profile == 'perf':
        command = ['perf', 'report']
        gbl.execute(command)

    if profile == 'gprof':
        readableOutputFile = 'profileAnalysis.txt'
        command = []
        command.append('gprof')
        command.append(fname)
        command.append('gmon.out')
        command.append(readableOutputFile)

        gbl.execute(command)
        print(
            'You can find the result of the gprof profiling in {readableOutput}'
            .format(readableOutput=readableOutputFile))