synthetic

package
v0.9.9-dev.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package synthetic generates deterministic repository corpora for benchmarks and scale tests.

Index

Constants

View Source
const (
	DefaultRepositoryCount = 40
	DefaultFileCount       = 100_000
	DefaultSymbolCount     = 100_000
	DefaultEdgeCount       = 1_000_000
	DefaultSeed            = int64(42)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Repositories int
	Files        int
	Symbols      int
	Edges        int
	Seed         int64
	OutputDir    string
}

Config controls one deterministic synthetic corpus.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns the corpus size and output location used by the CLI.

type Manifest

type Manifest struct {
	SchemaVersion       string         `json:"schema_version"`
	Seed                int64          `json:"seed"`
	Repositories        int            `json:"repositories"`
	Files               int            `json:"files"`
	Symbols             int            `json:"symbols"`
	Edges               int            `json:"edges"`
	EdgeCounts          map[string]int `json:"edge_counts"`
	IsolatedSymbolCount int            `json:"isolated_symbol_count"`
	HubSymbols          []string       `json:"hub_symbols"`
	DepthFiveChain      []string       `json:"depth_five_chain"`
	ControlledCycle     []string       `json:"controlled_cycle"`
}

Manifest describes the generated corpus without embedding machine-specific timestamps.

func Generate

func Generate(ctx context.Context, config Config) (Manifest, error)

Generate writes a deterministic corpus as JSON Lines plus manifest.json.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL