-
Notifications
You must be signed in to change notification settings - Fork 1
/
analyzer.go
45 lines (34 loc) · 1.13 KB
/
analyzer.go
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
package main
import (
"flag"
"github.com/jbreitbart/coBench/commands"
"github.com/jbreitbart/coBench/stats"
log "github.com/sirupsen/logrus"
)
func main() {
//log.SetLevel(log.DebugLevel)
inputFile := flag.String("input", "", "Input result file")
flag.Parse()
if *inputFile == "" {
log.Fatalln("No input file provided. Use -input <file>")
}
err := stats.ReadFromFile(*inputFile)
if err != nil {
log.WithError(err).Fatalln("Cannot read input file")
}
apps := stats.GetAllApplications()
log.Infoln("Found data for the following applications:")
for i, app := range apps {
log.WithFields(log.Fields{
"app": app,
}).Infof("%v", i)
}
indvApps := commands.GenerateIndv(apps)
CATDatFiles, perfNames := createIndvCATDatFiles(indvApps)
writeGNUPlotCATIndvFile(indvApps, CATDatFiles, perfNames)
pairs := commands.GeneratePairs(apps)
CATCoSchedDatFiles, perfNames := createCoSchedCATDatFiles(pairs, false)
writeGNUPlotCATCoSchedFile(pairs, CATCoSchedDatFiles, perfNames, false)
CATCoSchedDatFiles, perfNames = createCoSchedCATDatFiles(pairs, true)
writeGNUPlotCATCoSchedFile(pairs, CATCoSchedDatFiles, perfNames, true)
}