コード例 #1
0
ファイル: MaMaStat.py プロジェクト: chengkai1121/Replication
                'folders creation failed, probably the folderes are already in place!'
            )

if args.cores:
    cores = args.cores
else:
    cores = int(math.ceil(0.75 * multiprocessing.cpu_count()))
    print("no cores option used, the default option is 75% cores.")

print("starting rearranging the files")
callsdatabase, appslist = TTC.main(dbs, wflag)

if wflag == 'Y':
    callsdatabase = None
    print("starting the abstraction to families")
    _ = cTF.main(dbs, wflag, cores)
    print("abstraction to families is finished")
    print("starting the abstraction to packages")
    _ = cTP.main(dbs, wflag, cores)
    print("abstraction to packages is finished")
    print("starting the Markov model creation in families abstraction")
    MC.main(dbs, wflag, 'Families')
    print(
        "Markov model in families abstraction finished, features file created in Features/Families/"
    )
    print("starting the Markov model creation in packages abstraction")
    MC.main(dbs, wflag, 'Packages')
    print(
        "Markov model in packages abstraction finished, features file created in Features/Packages/"
    )
else:
コード例 #2
0
def getindex(line):
    global packages

    for i in range(0, len(packages)):
        #if line.lower() == packages[i].lower():
        if line.lower().startswith(packages[i].lower()):
            return i + 1

    #print "no package found for %s" % (line)
    return 422


if wflag == 'Y':
    callsdatabase = None
    print "starting the abstraction to families"
    _ = cTF.main(dbs, wflag, cores)
    print "abstraction to families is finished"
    print "starting the abstraction to packages"
    _ = cTP.main(dbs, wflag, cores)
    print "abstraction to packages is finished"
    print "starting the Markov model creation in families abstraction"
    MC.main(dbs, wflag, 'Families')
    print "Markov model in families abstraction finished, features file created in Features/Families/"
    print "starting the Markov model creation in packages abstraction"
    MC.main(dbs, wflag, 'Packages')
    print "Markov model in packages abstraction finished, features file created in Features/Packages/"
else:
    #print "starting the abstraction to families"
    #famdatabase=cTF.main(dbs,wflag,cores,callsdatabase)
    #print "abstraction to families is finished"