shared

package
v4.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BenchmarkWorkerRequestCoreChunk identifies one core-list chunk preparation request.
	BenchmarkWorkerRequestCoreChunk = "prepare-core-chunk"
	// BenchmarkWorkerRequestContentChunk identifies one content-card chunk preparation request.
	BenchmarkWorkerRequestContentChunk = "prepare-content-chunk"
	// BenchmarkWorkerRequestCoreBatch identifies one core-list multi-chunk batch preparation request.
	BenchmarkWorkerRequestCoreBatch = "prepare-core-batch"
	// BenchmarkWorkerRequestContentBatch identifies one content-card multi-chunk batch preparation request.
	BenchmarkWorkerRequestContentBatch = "prepare-content-batch"
)

Variables

This section is empty.

Functions

func BuildBenchmarkWorkerContentItemDigest

func BuildBenchmarkWorkerContentItemDigest(parseItem BenchmarkContentCardData, parseIndex int, parseWorkScale int) uint64

BuildBenchmarkWorkerContentItemDigest computes one deterministic digest for one content-card source item.

func BuildBenchmarkWorkerCoreItemDigest

func BuildBenchmarkWorkerCoreItemDigest(parseText string, parseDigestSeed int, parseWorkScale int) uint64

BuildBenchmarkWorkerCoreItemDigest computes one deterministic digest for one core-list source item.

Types

type BenchmarkContentCardData

type BenchmarkContentCardData struct {
	GetID      int      `json:"id"`
	GetTitle   string   `json:"title"`
	GetSummary string   `json:"summary"`
	GetStatus  string   `json:"status"`
	GetMeta    string   `json:"meta"`
	GetTags    []string `json:"tags"`
}

BenchmarkContentCardData stores one content-card source item used by the browser benchmark.

type BenchmarkCoreRowData

type BenchmarkCoreRowData struct {
	GetID   int    `json:"id"`
	GetText string `json:"text"`
}

BenchmarkCoreRowData stores one core-list source row used by the browser benchmark.

type BenchmarkPreparedContentCard

type BenchmarkPreparedContentCard struct {
	GetID      int      `json:"id"`
	GetTitle   string   `json:"title"`
	GetSummary string   `json:"summary"`
	GetStatus  string   `json:"status"`
	GetMeta    string   `json:"meta"`
	GetTags    []string `json:"tags"`
	GetDigest  uint64   `json:"digest"`
}

BenchmarkPreparedContentCard stores one worker-prepared content-card view model.

func BuildBenchmarkPreparedContentCard

func BuildBenchmarkPreparedContentCard(parseItem BenchmarkContentCardData, parseIndex int, parseWorkScale int) BenchmarkPreparedContentCard

BuildBenchmarkPreparedContentCard builds one prepared content-card item with its deterministic digest.

type BenchmarkPreparedCoreItem

type BenchmarkPreparedCoreItem struct {
	GetID     int    `json:"id"`
	GetText   string `json:"text"`
	GetDigest uint64 `json:"digest"`
}

BenchmarkPreparedCoreItem stores one worker-prepared core-list item.

func BuildBenchmarkPreparedCoreItem

func BuildBenchmarkPreparedCoreItem(parseItem BenchmarkCoreRowData, parseIndex int, parseWorkScale int) BenchmarkPreparedCoreItem

BuildBenchmarkPreparedCoreItem builds one prepared core-list item with its deterministic digest.

type BenchmarkWorkerContentBatchChunkRequest

type BenchmarkWorkerContentBatchChunkRequest struct {
	GetChunkIndex       int                        `json:"chunkIndex"`
	GetItems            []BenchmarkContentCardData `json:"items"`
	GetDirtyItemIndexes []int                      `json:"dirtyItemIndexes,omitempty"`
}

BenchmarkWorkerContentBatchChunkRequest stores one chunk payload in a multi-chunk content batch request.

type BenchmarkWorkerContentBatchRequest

type BenchmarkWorkerContentBatchRequest struct {
	GetChunks     []BenchmarkWorkerContentBatchChunkRequest `json:"chunks"`
	GetWorkScale  int                                       `json:"workScale"`
	GetGeneration uint64                                    `json:"generation"`
}

BenchmarkWorkerContentBatchRequest stores one worker request for a multi-chunk content-card batch.

type BenchmarkWorkerContentBatchResult

type BenchmarkWorkerContentBatchResult struct {
	GetChunks         []BenchmarkWorkerContentChunkResult `json:"chunks"`
	GetWorker         string                              `json:"worker"`
	GetWorkDigest     uint64                              `json:"workDigest"`
	GetWorkDurationMS float64                             `json:"workDurationMs"`
	GetGeneration     uint64                              `json:"generation"`
	GetCacheHitCount  int                                 `json:"cacheHitCount"`
	HasStale          bool                                `json:"stale"`
}

BenchmarkWorkerContentBatchResult stores one worker-prepared content-card batch response.

type BenchmarkWorkerContentChunkRequest

type BenchmarkWorkerContentChunkRequest struct {
	GetChunkIndex int                        `json:"chunkIndex"`
	GetItems      []BenchmarkContentCardData `json:"items"`
	GetWorkScale  int                        `json:"workScale"`
	GetGeneration uint64                     `json:"generation"`
}

BenchmarkWorkerContentChunkRequest stores one worker request for a content-card chunk.

type BenchmarkWorkerContentChunkResult

type BenchmarkWorkerContentChunkResult struct {
	GetChunkIndex     int                            `json:"chunkIndex"`
	GetItems          []BenchmarkPreparedContentCard `json:"items"`
	GetWorker         string                         `json:"worker"`
	GetWorkDigest     uint64                         `json:"workDigest"`
	GetWorkDurationMS float64                        `json:"workDurationMs"`
	GetGeneration     uint64                         `json:"generation"`
	HasStale          bool                           `json:"stale"`
}

BenchmarkWorkerContentChunkResult stores one worker-prepared content-card chunk.

func BuildBenchmarkWorkerContentChunkResult

func BuildBenchmarkWorkerContentChunkResult(parseWorkerName string, parseRequest BenchmarkWorkerContentChunkRequest) BenchmarkWorkerContentChunkResult

BuildBenchmarkWorkerContentChunkResult builds one prepared content-card chunk result.

type BenchmarkWorkerCoreBatchChunkRequest

type BenchmarkWorkerCoreBatchChunkRequest struct {
	GetChunkIndex       int                    `json:"chunkIndex"`
	GetItems            []BenchmarkCoreRowData `json:"items"`
	GetDirtyItemIndexes []int                  `json:"dirtyItemIndexes,omitempty"`
}

BenchmarkWorkerCoreBatchChunkRequest stores one chunk payload in a multi-chunk core batch request.

type BenchmarkWorkerCoreBatchRequest

type BenchmarkWorkerCoreBatchRequest struct {
	GetChunks     []BenchmarkWorkerCoreBatchChunkRequest `json:"chunks"`
	GetWorkScale  int                                    `json:"workScale"`
	GetGeneration uint64                                 `json:"generation"`
}

BenchmarkWorkerCoreBatchRequest stores one worker request for a multi-chunk core-list batch.

type BenchmarkWorkerCoreBatchResult

type BenchmarkWorkerCoreBatchResult struct {
	GetChunks         []BenchmarkWorkerCoreChunkResult `json:"chunks"`
	GetWorker         string                           `json:"worker"`
	GetWorkDigest     uint64                           `json:"workDigest"`
	GetWorkDurationMS float64                          `json:"workDurationMs"`
	GetGeneration     uint64                           `json:"generation"`
	GetCacheHitCount  int                              `json:"cacheHitCount"`
	HasStale          bool                             `json:"stale"`
}

BenchmarkWorkerCoreBatchResult stores one worker-prepared core-list batch response.

type BenchmarkWorkerCoreChunkRequest

type BenchmarkWorkerCoreChunkRequest struct {
	GetChunkIndex int                    `json:"chunkIndex"`
	GetItems      []BenchmarkCoreRowData `json:"items"`
	GetWorkScale  int                    `json:"workScale"`
	GetGeneration uint64                 `json:"generation"`
}

BenchmarkWorkerCoreChunkRequest stores one worker request for a core-list chunk.

type BenchmarkWorkerCoreChunkResult

type BenchmarkWorkerCoreChunkResult struct {
	GetChunkIndex     int                         `json:"chunkIndex"`
	GetItems          []BenchmarkPreparedCoreItem `json:"items"`
	GetWorker         string                      `json:"worker"`
	GetWorkDigest     uint64                      `json:"workDigest"`
	GetWorkDurationMS float64                     `json:"workDurationMs"`
	GetGeneration     uint64                      `json:"generation"`
	HasStale          bool                        `json:"stale"`
}

BenchmarkWorkerCoreChunkResult stores one worker-prepared core-list chunk.

func BuildBenchmarkWorkerCoreChunkResult

func BuildBenchmarkWorkerCoreChunkResult(parseWorkerName string, parseRequest BenchmarkWorkerCoreChunkRequest) BenchmarkWorkerCoreChunkResult

BuildBenchmarkWorkerCoreChunkResult builds one prepared core-list chunk result.

Jump to

Keyboard shortcuts

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