-
Notifications
You must be signed in to change notification settings - Fork 2
/
pak.R
55 lines (48 loc) · 1.54 KB
/
pak.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
path.analysis_tools<-"/home/liujh/PAK-master/analysis_module/"
path.generator_tools<-"/home/liujh/PAK-master/generator_module/"
odbc.source<-"kdb"
database.user<-"user"
database.pwd<-"pwd"
GetSourceFileDir<-function()
{
frame_files <- lapply(sys.frames(), function(x) x$ofile)
frame_files <- Filter(Negate(is.null), frame_files)
path.sourcefile <- dirname(frame_files[[length(frame_files)]])
return(path.sourcefile)
}
SourceDir <- function(path, trace = FALSE)
{
#if(missing(path)) path <- getwd()
for(i in 1:length(path))
{
for (nm in list.files(path, pattern = ".[Rr]",recursive=TRUE))
{
if(trace) cat(nm,":")
source(file.path(path, nm))
if(trace) cat("\n")
}
}
}
sfdir<-GetSourceFileDir()
source(file.path(sfdir,"framework/dependencies.R"))
SourceDir(file.path(sfdir,"framework/Interface"))
SourceDir(file.path(sfdir,"framework/ExtractorModule"))
SourceDir(file.path(sfdir,"framework/ProducerModule"))
SourceDir(file.path(sfdir,"framework/OptimizerModule"))
SourceDir(file.path(sfdir,"framework/EvaluatorModule"))
SourceDir(file.path(sfdir,"framework/LearnerModule"))
SourceDir(file.path(sfdir,"framework/DBModule"))
SourceDir(file.path(sfdir,"framework/Tuning"))
SourceDir(file.path(sfdir,"framework/lib"))
#PerformKeyAnalysis<-function(app){
# key.analyser.names<-c("appinfo","envinfo")
#result<-list()
#for(ka in key.analyser.names)
#{
# analyser<-PAK.Analyser$new(name=ka,app)
#analyser$enableAllfeatures()
#analyser$anaylze()
#result[[ka]]<-analyser$getResultForDB()
# }
# return (result)
#}