Documentation ¶
Index ¶
- type BinariesFromCommitOrPatchset
- type Binary
- type CommitOrPatchset
- type DownloadFn
- type Store
- func (s *Store) GetBinary(commitOrPatchset CommitOrPatchset, binaryName, compileTaskName string) (Binary, bool)
- func (s *Store) GetBloatyOutputFileContents(ctx context.Context, binary Binary) ([]byte, error)
- func (s *Store) GetBloatySizeDiffOutputFileContents(ctx context.Context, binary Binary) ([]byte, error)
- func (s *Store) GetMostRecentBinaries(limit int) []BinariesFromCommitOrPatchset
- func (s *Store) Index(ctx context.Context, bloatyOutputFileGCSPath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinariesFromCommitOrPatchset ¶
type BinariesFromCommitOrPatchset struct { CommitOrPatchset Binaries []Binary `json:"binaries" go2ts:"ignorenil"` }
BinariesFromCommitOrPatchset groups all the binaries produced by a single commit or patchset.
type Binary ¶
type Binary struct { Metadata common.BloatyOutputMetadata `json:"metadata"` BloatyOutputFileGCSPath string `json:"-"` BloatySizeDiffOutputFileGCSPath string `json:"-"` // Timestamp should reflect the "timestamp" field in the JSON metadata. Timestamp time.Time `json:"-"` }
Binary represents a single binary that has been analyzed with Bloaty.
type CommitOrPatchset ¶
type CommitOrPatchset struct { Commit string `json:"commit"` PatchIssue string `json:"patch_issue"` PatchSet string `json:"patch_set"` }
CommitOrPatchset is used to group Bloaty outputs by commit, i.e. those generated by a post-submit task, or by patchset, i.e. those generated by a tryjob.
func (CommitOrPatchset) IsPatchset ¶
func (c CommitOrPatchset) IsPatchset() bool
type DownloadFn ¶
DownloadFn is the type of a function that downloads a file from GCS.
Its purpose is to abstract away any interactions with GCS to facilitate testing.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store keeps track of the Bloaty output files found in GCS, and provides methods to access them.
func (*Store) GetBinary ¶
func (s *Store) GetBinary(commitOrPatchset CommitOrPatchset, binaryName, compileTaskName string) (Binary, bool)
GetBinary returns a specific binary.
func (*Store) GetBloatyOutputFileContents ¶
GetBloatyOutputFileContents downloads and returns the raw contents of a Bloaty output file.
func (*Store) GetBloatySizeDiffOutputFileContents ¶
func (s *Store) GetBloatySizeDiffOutputFileContents(ctx context.Context, binary Binary) ([]byte, error)
GetBloatySizeDiffOutputFileContents downloads and returns the raw contents of a Bloaty size diff output file.
func (*Store) GetMostRecentBinaries ¶
func (s *Store) GetMostRecentBinaries(limit int) []BinariesFromCommitOrPatchset
GetMostRecentBinaries gets the most recent binaries grouped by commit or patchset.