Start work on improving recordings.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"git.stormux.org/storm/skald/diskwriter"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var directory string
|
||||
var sources int
|
||||
var duration time.Duration
|
||||
|
||||
flag.StringVar(&directory, "out", ".", "output directory")
|
||||
flag.IntVar(&sources, "sources", 5, "synthetic active source count")
|
||||
flag.DurationVar(&duration, "duration", 10*time.Second, "recording duration")
|
||||
flag.Parse()
|
||||
|
||||
result, err := diskwriter.RunSyntheticRecording(directory, sources, duration)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
fmt.Printf("Recording: %s\n", result.Path)
|
||||
fmt.Printf("Duration: %v\n", result.Metrics.Duration.Round(time.Millisecond))
|
||||
fmt.Printf("Decoder starts: %d\n", result.Metrics.DecoderStarts)
|
||||
fmt.Printf("Decoder stops: %d\n", result.Metrics.DecoderStops)
|
||||
fmt.Printf("Source frame drops: %d\n", result.Metrics.DroppedSourceFrames)
|
||||
fmt.Printf("Stale source ticks: %d\n", result.Metrics.StaleSourceTicks)
|
||||
fmt.Printf("Mixed frame drops: %d\n", result.Metrics.DroppedMixedFrames)
|
||||
fmt.Printf("Encoder write errors: %d\n", result.Metrics.EncoderWriteErrors)
|
||||
}
|
||||
Reference in New Issue
Block a user