programsheet

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 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 programsheet narrows a partner program's benchmark sheets (GET /v1/programs/{program}/benchmarks) to one model and/or one SoC. The `melange program benchmarks` command and the get_program_benchmarks MCP tool share it, so both answer a filter the same way.

Filtering works on the raw response: objects keep their key order and every value its exact bytes. The generated client decodes metric values as float32, so a decode/re-encode round trip through it would rewrite numbers such as 0.463; this package never does that.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(body []byte, f Filter) ([]byte, error)

Apply returns body narrowed by f, or body itself when f is empty.

  • Model keeps only that model in "models".
  • SoC keeps only that SoC in "targets" and, in each model, only that SoC's result; models with no result on it are dropped.

"metrics" and the other top-level fields pass through unchanged. A model or SoC the page does not list is an error naming the ones it does.

Types

type Filter

type Filter struct {
	// Model is a model slug (case-insensitive).
	Model string
	// SoC is a SoC code from the program's catalog (case-insensitive).
	SoC string
}

Filter selects part of a program page. Empty fields select everything.

func (Filter) Empty

func (f Filter) Empty() bool

Empty reports whether the filter selects the whole page.

Jump to

Keyboard shortcuts

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