Documentation
¶
Index ¶
- Constants
- Variables
- func PrintNerdStats(stats nerdstats.NerdStats, context string)
- func PrintRunSummary(rs RunSummary, flags *Flags)
- func PrintVersionInfo(extendedInfo bool)
- func SummariseSmashedFile(stats slicer.SlicerStats, ffs *indexer.FileFS, ms int64, ...)
- type App
- type AppRuntime
- type AppSession
- type DuplicateFiles
- type EmptyFiles
- type File
- type Flags
- type ReportDuplicateSummary
- type ReportFailSummary
- type ReportFileBaseSummary
- type ReportFileSummary
- type ReportFiles
- type ReportMeta
- type ReportOutput
- type ReportSummary
- type ReportTopFilesSummary
- type RunSummary
Constants ¶
View Source
const ( TreeNextChild = "├─" TreeLastChild = "└─" )
View Source
const ( GithubHomeText = "github.com/thushan/smash" GithubHomeUri = "https://github.com/thushan/smash" GithubLatestUri = "https://github.com/thushan/smash/releases/latest" )
View Source
const ReportOutputTemplate = "report-*.json"
Variables ¶
View Source
var ( Version = "v0.9.0" Commit = "none" Date = "unknown" Time = "nowish" User = "local" )
Functions ¶
func PrintNerdStats ¶ added in v0.0.7
func PrintRunSummary ¶ added in v0.0.7
func PrintRunSummary(rs RunSummary, flags *Flags)
func PrintVersionInfo ¶
func PrintVersionInfo(extendedInfo bool)
func SummariseSmashedFile ¶ added in v0.0.7
func SummariseSmashedFile(stats slicer.SlicerStats, ffs *indexer.FileFS, ms int64, duplicates *xsync.MapOf[string, *DuplicateFiles], empty *EmptyFiles)
Types ¶
type App ¶
type App struct { Flags *Flags Session *AppSession Runtime *AppRuntime Summary *RunSummary Args []string Locations []indexer.LocationFS }
func (*App) ExportReport ¶ added in v0.0.7
func (app *App) ExportReport()
func (*App) GenerateReportOutput ¶ added in v0.0.7
func (app *App) GenerateReportOutput() ReportOutput
func (*App) PrintRunAnalysis ¶ added in v0.0.4
type AppRuntime ¶ added in v0.0.4
type AppSession ¶ added in v0.0.3
type AppSession struct { Dupes *xsync.MapOf[string, *DuplicateFiles] Fails *xsync.MapOf[string, error] Empty *EmptyFiles StartTime int64 EndTime int64 }
type DuplicateFiles ¶ added in v0.0.7
type EmptyFiles ¶ added in v0.0.7
type Flags ¶
type Flags struct { OutputFile string `yaml:"output"` Base []string `yaml:"base"` ExcludeDir []string `yaml:"exclude-dir"` ExcludeFile []string `yaml:"exclude-file"` MinSize int64 `yaml:"min-size"` MaxSize int64 `yaml:"max-size"` SliceThreshold int64 `yaml:"slice-threshold"` SliceSize int64 `yaml:"slice-size"` Slices int `yaml:"slices"` Algorithm int `yaml:"algorithm"` MaxThreads int `yaml:"max-threads"` MaxWorkers int `yaml:"max-workers"` ProgressUpdate int `yaml:"progress-update"` ShowTop int `yaml:"show-top"` DisableSlicing bool `yaml:"disable-slicing"` DisableMeta bool `yaml:"disable-meta"` DisableAutoText bool `yaml:"disable-autotext"` IgnoreEmpty bool `yaml:"ignore-empty"` IgnoreHidden bool `yaml:"ignore-hidden"` IgnoreSystem bool `yaml:"ignore-system"` ShowVersion bool `yaml:"version"` ShowNerdStats bool `yaml:"nerd-stats"` Recurse bool `yaml:"recurse"` ShowDuplicates bool `yaml:"show-duplicates"` Silent bool `yaml:"silent"` HideTopList bool `yaml:"no-top-list"` HideProgress bool `yaml:"no-progress"` HideOutput bool `yaml:"no-output"` Profile bool `yaml:"profile"` Verbose bool `yaml:"verbose"` }
type ReportDuplicateSummary ¶ added in v0.0.7
type ReportDuplicateSummary struct { Duplicates []ReportFileSummary `json:"duplicates"` ReportFileSummary }
type ReportFailSummary ¶ added in v0.0.7
type ReportFileBaseSummary ¶ added in v0.0.7
type ReportFileSummary ¶ added in v0.0.7
type ReportFileSummary struct { ReportFileBaseSummary Hash string `json:"hash"` Size uint64 `json:"size"` FullHash bool `json:"fullHash"` }
type ReportFiles ¶ added in v0.0.7
type ReportFiles struct { Fails []ReportFailSummary `json:"fails"` Empty []ReportFileBaseSummary `json:"empty"` Dupes []ReportDuplicateSummary `json:"dupes"` }
type ReportMeta ¶ added in v0.0.7
type ReportOutput ¶ added in v0.0.7
type ReportOutput struct { Meta ReportMeta `json:"_meta"` Analysis ReportFiles `json:"analysis"` Summary ReportSummary `json:"summary"` }
type ReportSummary ¶ added in v0.0.7
type ReportSummary struct { TopFiles []ReportTopFilesSummary `json:"top"` DuplicateFileSize uint64 `json:"duplicateFileSize"` TotalFiles int64 `json:"totalFiles"` TotalFileErrors int64 `json:"totalFileFails"` ElapsedTime int64 `json:"elapsedTime"` UniqueFiles int64 `json:"uniqueFiles"` EmptyFiles int64 `json:"emptyFiles"` DuplicateFiles int64 `json:"duplicateFiles"` }
type ReportTopFilesSummary ¶ added in v0.0.7
Click to show internal directories.
Click to hide internal directories.