ldbc

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package ldbc implements the harness GoGraph uses against the LDBC Social Network Benchmark workloads. The official LDBC SNB datasets are external; this harness either ingests a directory produced by the LDBC SNB Datagen or, in CI / regression mode, synthesises a graph of similar scale via the deterministic RMAT generator (see Synthetic).

The two scale factors documented in the project roadmap (SF1 and SF10) map to ScaleSF1 and ScaleSF10. The function Run executes the canonical interactive query set against the given engine and returns the per-query latency percentiles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortStats

func SortStats(rep Report) []string

SortStats returns the names of the query types in the report in stable alphabetical order. Useful when emitting deterministic markdown summaries from a benchmark report.

func Synthetic

func Synthetic(ctx context.Context, v, e uint64, loader *bulk.Loader)

Synthetic populates loader with a deterministic synthetic LPG approximating a social-network-style graph: every node connects to ~e/v random neighbours. The implementation reuses bulk.Edge records to avoid duplicating the encoding logic.

Types

type QueryStats

type QueryStats struct {
	Latencies []time.Duration
	P50       time.Duration
	P95       time.Duration
	P99       time.Duration
	Count     int
}

QueryStats reports the percentile latencies of a single benchmark query type. Latencies stores the per-query sample for histogram reconstruction; P50/P95/P99 are pre-computed snapshots.

type Report

type Report struct {
	Stats      map[string]QueryStats
	Spec       Spec
	IngestTime time.Duration
}

Report is the top-level run summary.

func Run

func Run(ctx context.Context, spec Spec) (Report, error)

Run executes the benchmark. The v1 implementation builds a synthetic graph (the ingest cost of the official LDBC dataset requires the external Datagen tool); per-scale vertex/edge counts are derived from the Scale preset.

The harness is structured as a thin orchestrator so a future revision can swap the synthetic builder for an LDBC Datagen loader without changing the rest of the surface.

type Scale

type Scale int

Scale enumerates the LDBC SF presets the harness supports.

const (
	ScaleSF1 Scale = iota + 1
	ScaleSF10
)

Supported scale presets. Numbers approximate the order of magnitude of the official LDBC datasets; the harness scales the synthetic substitute accordingly.

type Spec

type Spec struct {
	OutDir      string
	BulkOutFile string
	Scale       Scale
	Queries     int  // number of interactive queries to issue per run
	Synthetic   bool // when true, ingest a deterministic synthetic graph
}

Spec describes a benchmark run.

Jump to

Keyboard shortcuts

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