Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
DX990307 committed Mar 28, 2024
1 parent a559714 commit b02c132
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions samples/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ func (r *Runner) buildTimingPlatform() {
func (*Runner) setAnalyszer(
b R9NanoPlatformBuilder,
) R9NanoPlatformBuilder {
if *analyszerPeriodFlag != 0 && *analyszerNameFlag == "" {
panic("must specify -analyszer-name when using -analyszer-period")
if *analyszerPeriodFlag == 0 && *analyszerNameFlag != "" {
panic("must specify -analyszer-period when using -analyszer-name")
}

if *analyszerNameFlag != "" {
if *analyszerPeriodFlag != 0 {
b = b.WithPerfAnalyzer(
*analyszerNameFlag,
*analyszerPeriodFlag,
Expand Down
12 changes: 5 additions & 7 deletions samples/runner/timingplatform.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,11 @@ func (b *R9NanoPlatformBuilder) setupVisTracing() {
}

func (b *R9NanoPlatformBuilder) setupPerformanceAnalyzer() {
if b.perfAnalysisFileName != "" {
b.perfAnalyzer = analysis.MakePerfAnalyzerBuilder().
WithPeriod(sim.VTimeInSec(b.perfAnalyzingPeriod)).
WithDBFilename(b.perfAnalysisFileName).
WithEngine(b.engine).
Build()
}
b.perfAnalyzer = analysis.MakePerfAnalyzerBuilder().
WithPeriod(sim.VTimeInSec(b.perfAnalyzingPeriod)).
WithDBFilename(b.perfAnalysisFileName).
WithEngine(b.engine).
Build()

if b.monitor != nil {
b.monitor.RegisterPerfAnalyzer(b.perfAnalyzer)

Check failure on line 251 in samples/runner/timingplatform.go

View workflow job for this annotation

GitHub Actions / Lint

b.monitor.RegisterPerfAnalyzer undefined (type *monitoring.Monitor has no field or method RegisterPerfAnalyzer) (typecheck)

Check failure on line 251 in samples/runner/timingplatform.go

View workflow job for this annotation

GitHub Actions / Lint

b.monitor.RegisterPerfAnalyzer undefined (type *monitoring.Monitor has no field or method RegisterPerfAnalyzer)) (typecheck)

Check failure on line 251 in samples/runner/timingplatform.go

View workflow job for this annotation

GitHub Actions / Lint

b.monitor.RegisterPerfAnalyzer undefined (type *monitoring.Monitor has no field or method RegisterPerfAnalyzer)) (typecheck)

Check failure on line 251 in samples/runner/timingplatform.go

View workflow job for this annotation

GitHub Actions / Lint

b.monitor.RegisterPerfAnalyzer undefined (type *monitoring.Monitor has no field or method RegisterPerfAnalyzer)) (typecheck)

Check failure on line 251 in samples/runner/timingplatform.go

View workflow job for this annotation

GitHub Actions / Lint

b.monitor.RegisterPerfAnalyzer undefined (type *monitoring.Monitor has no field or method RegisterPerfAnalyzer)) (typecheck)

Check failure on line 251 in samples/runner/timingplatform.go

View workflow job for this annotation

GitHub Actions / Compile

b.monitor.RegisterPerfAnalyzer undefined (type *monitoring.Monitor has no field or method RegisterPerfAnalyzer)

Check failure on line 251 in samples/runner/timingplatform.go

View workflow job for this annotation

GitHub Actions / Compile

b.monitor.RegisterPerfAnalyzer undefined (type *monitoring.Monitor has no field or method RegisterPerfAnalyzer)
Expand Down

0 comments on commit b02c132

Please sign in to comment.