[gold] remove tracedb and traceserver
Change-Id: Idb4c30e0a60d0c151c4917340468594907c0b46b
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/235196
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
diff --git a/golden/go/ingestion_processors/tracedb_impl.go b/golden/go/ingestion_processors/tracedb_impl.go
deleted file mode 100644
index 459915e..0000000
--- a/golden/go/ingestion_processors/tracedb_impl.go
+++ /dev/null
@@ -1,200 +0,0 @@
-package ingestion_processors
-
-import (
- "context"
- "fmt"
- "net/http"
- "sort"
- "strings"
-
- "go.skia.org/infra/go/eventbus"
- "go.skia.org/infra/go/ingestion"
- "go.skia.org/infra/go/sharedconfig"
- "go.skia.org/infra/go/skerr"
- "go.skia.org/infra/go/sklog"
- "go.skia.org/infra/go/tiling"
- tracedb "go.skia.org/infra/go/trace/db"
- "go.skia.org/infra/go/vcsinfo"
- "go.skia.org/infra/golden/go/config"
- "go.skia.org/infra/golden/go/jsonio"
- "go.skia.org/infra/golden/go/types"
-)
-
-const (
- // Configuration option that identifies the address of the traceDB service.
- tracedbServiceConfig = "TraceService"
-)
-
-// Register the processor with the ingestion framework.
-func init() {
- ingestion.Register(config.CONSTRUCTOR_GOLD, newDeprecatedTraceDBProcessor)
-}
-
-// traceDBProcessor implements the ingestion.Processor interface for gold.
-type traceDBProcessor struct {
- traceDB tracedb.DB
- vcs vcsinfo.VCS
-}
-
-// implements the ingestion.Constructor signature.
-func newDeprecatedTraceDBProcessor(vcs vcsinfo.VCS, config *sharedconfig.IngesterConfig, _ *http.Client, _ eventbus.EventBus) (ingestion.Processor, error) {
- traceDB, err := tracedb.NewTraceServiceDBFromAddress(config.ExtraParams[tracedbServiceConfig], types.GoldenTraceBuilder)
- if err != nil {
- return nil, err
- }
-
- ret := &traceDBProcessor{
- traceDB: traceDB,
- vcs: vcs,
- }
- return ret, nil
-}
-
-// See ingestion.Processor interface.
-func (g *traceDBProcessor) Process(ctx context.Context, resultsFile ingestion.ResultFileLocation) error {
- dmResults, err := processDMResults(resultsFile)
- if err != nil {
- return skerr.Fmt("could not process results file: %s", err)
- }
-
- if len(dmResults.Results) == 0 {
- sklog.Infof("ignoring file %s because it has no results", resultsFile.Name())
- return ingestion.IgnoreResultsFileErr
- }
-
- var commit *vcsinfo.LongCommit = nil
- // If the target commit is not in the primary repository we look it up
- // in the secondary that has the primary as a dependency.
- targetHash, err := getCanonicalCommitHash(ctx, g.vcs, dmResults.GitHash)
- if err != nil {
- if err == ingestion.IgnoreResultsFileErr {
- return ingestion.IgnoreResultsFileErr
- }
- return skerr.Fmt("could not identify canonical commit from %q: %s", dmResults.GitHash, err)
- }
-
- commit, err = g.vcs.Details(ctx, targetHash, true)
- if err != nil {
- return skerr.Fmt("could not get details for git commit %q: %s", targetHash, err)
- }
-
- if !commit.Branches["master"] {
- sklog.Warningf("Commit %s is not in master branch. Got branches: %v", commit.Hash, commit.Branches)
- return ingestion.IgnoreResultsFileErr
- }
-
- // Add the column to the trace db.
- cid, err := g.getCommitID(commit)
- if err != nil {
- return skerr.Fmt("could not get trace db id: %s", err)
- }
-
- // Get the entries that should be added to the tracedb.
- entries, err := extractTraceDBEntries(dmResults)
- if err != nil {
- return skerr.Fmt("could not create entries for results: %s", err)
- }
-
- // Write the result to the tracedb.
- err = g.traceDB.Add(cid, entries)
- if err != nil {
- return skerr.Fmt("could not add to tracedb: %s", err)
- }
- return nil
-}
-
-// See ingestion.Processor interface.
-func (g *traceDBProcessor) BatchFinished() error { return nil }
-
-// getCommitID extracts the commitID from the given commit.
-func (g *traceDBProcessor) getCommitID(commit *vcsinfo.LongCommit) (*tracedb.CommitID, error) {
- return &tracedb.CommitID{
- Timestamp: commit.Timestamp.Unix(),
- ID: commit.Hash,
- Source: "master",
- }, nil
-}
-
-// extractTraceDBEntries returns the traceDB entries to be inserted into the data store.
-func extractTraceDBEntries(dm *dmResults) (map[tiling.TraceId]*tracedb.Entry, error) {
- ret := make(map[tiling.TraceId]*tracedb.Entry, len(dm.Results))
- for _, result := range dm.Results {
- traceId, params := idAndParams(dm, result)
- if ignoreResult(dm, params) {
- continue
- }
-
- ret[traceId] = &tracedb.Entry{
- Params: params,
- Value: []byte(result.Digest),
- }
- }
-
- // If all results were ignored then we return an error.
- if len(ret) == 0 {
- return nil, fmt.Errorf("No valid results in file %s.", dm.name)
- }
-
- return ret, nil
-}
-
-// idAndParams constructs the Trace ID and the Trace params from the keys and options.
-// It returns the id as a string of all the values, in the alphabetic order of the
-// keys, separated by a colon. The trace params returned are a single map of
-// key-> values. "Options" are omitted from the trace id, as per design.
-func idAndParams(dm *dmResults, r *jsonio.Result) (tiling.TraceId, map[string]string) {
- combinedLen := len(dm.Key) + len(r.Key)
- traceIdParts := make(map[string]string, combinedLen)
- params := make(map[string]string, combinedLen+len(r.Options))
- for k, v := range dm.Key {
- traceIdParts[k] = v
- params[k] = v
- }
- for k, v := range r.Key {
- traceIdParts[k] = v
- params[k] = v
- }
- for k, v := range r.Options {
- params[k] = v
- }
-
- keys := []string{}
- for k := range traceIdParts {
- keys = append(keys, k)
- }
- sort.Strings(keys)
- values := []string{}
- for _, k := range keys {
- values = append(values, traceIdParts[k])
- }
- return tiling.TraceId(strings.Join(values, ":")), params
-}
-
-// ignoreResult returns true if the result with the given parameters should be
-// ignored.
-func ignoreResult(dm *dmResults, params map[string]string) bool {
- // Ignore anything that is not a png. In the early days (pre-2015), ext was omitted
- // but implied to be "png". Thus if ext is not provided, it will be ingested.
- // New entries (created by goldctl) will always have ext set.
- if ext, ok := params["ext"]; ok && (ext != "png") {
- return true
- }
-
- // Make sure the test name meets basic requirements.
- testName := params[types.PRIMARY_KEY_FIELD]
-
- // Ignore results that don't have a test given and log an error since that
- // should not happen. But we want to keep other results in the same input file.
- if testName == "" {
- sklog.Errorf("Missing test name in %s", dm.name)
- return true
- }
-
- // Make sure the test name does not exceed the allowed length.
- if len(testName) > types.MAXIMUM_NAME_LENGTH {
- sklog.Errorf("Received test name which is longer than the allowed %d bytes: %s", types.MAXIMUM_NAME_LENGTH, testName)
- return true
- }
-
- return false
-}
diff --git a/golden/go/ingestion_processors/tracedb_impl_test.go b/golden/go/ingestion_processors/tracedb_impl_test.go
deleted file mode 100644
index 8a77c5a..0000000
--- a/golden/go/ingestion_processors/tracedb_impl_test.go
+++ /dev/null
@@ -1,216 +0,0 @@
-package ingestion_processors
-
-import (
- "context"
- "os"
- "strings"
- "testing"
- "time"
-
- assert "github.com/stretchr/testify/require"
- "go.skia.org/infra/go/depot_tools"
- "go.skia.org/infra/go/eventbus"
- "go.skia.org/infra/go/ingestion"
- "go.skia.org/infra/go/sharedconfig"
- "go.skia.org/infra/go/testutils"
- "go.skia.org/infra/go/testutils/unittest"
- "go.skia.org/infra/go/tiling"
- tracedb "go.skia.org/infra/go/trace/db"
- "go.skia.org/infra/go/util"
- "go.skia.org/infra/go/vcsinfo"
- "go.skia.org/infra/go/vcsinfo/mocks"
- trace_utils "go.skia.org/infra/golden/go/testutils"
- "go.skia.org/infra/golden/go/types"
-)
-
-const (
- // Same information as testdata/dm.json but uses a secondary repository.
- TEST_SECONDARY_FILE = "testdata/dm-secondary.json"
-
- // Ingestion file that contains a commit that is neither in the primary nor the secondary repo.
- TEST_SECONDARY_FILE_INVALID = "testdata/dm-secondary-invalid.json"
-
- // Ingestion file that contains a valid commit but does not have a valid commit in the primary.
- TEST_SECONDARY_FILE_NO_DEPS = "testdata/dm-secondary-missing-deps.json"
-
- // temporary file used to store traceDB content.
- TRACE_DB_FILENAME = "./test_trace.db"
-)
-
-var (
- // trace ids and values that are contained in the test file.
- // These trace ids are the old format, new ones are like:
- // ,key1=value1,key2=value2
- TEST_ENTRIES = []struct {
- key tiling.TraceId
- value types.Digest
- }{
- {key: "x86_64:MSVC:pipe-8888:Debug:CPU:AVX2:ShuttleB:aaclip:Win8:gm", value: "fa3c371d201d6f88f7a47b41862e2e85"},
- {key: "x86_64:MSVC:pipe-8888:Debug:CPU:AVX2:ShuttleB:clipcubic:Win8:gm", value: "64e446d96bebba035887dd7dda6db6c4"},
- }
-
- // Fix the current point as reference. We remove the nano seconds from
- // now (below) because commits are only precise down to seconds.
- now = time.Now()
-
- // TEST_COMMITS are the commits we are considering. It needs to contain at
- // least all the commits referenced in the test file.
- TEST_COMMITS = []*vcsinfo.LongCommit{
- {
- ShortCommit: &vcsinfo.ShortCommit{
- Hash: "02cb37309c01506e2552e931efa9c04a569ed266",
- Subject: "Really big code change",
- },
- Timestamp: now.Add(-time.Second * 10).Add(-time.Nanosecond * time.Duration(now.Nanosecond())),
- Branches: map[string]bool{"master": true},
- },
- }
-
- // Commits in the secondary input files.
- VALID_COMMIT = "500920e65ced121bf72e690b31316e8bce606b4c"
- INVALID_COMMIT = "789e59b3592bc07288aa13c3dc10422c684a8bd3"
- NO_DEPS_COMMIT = "94252352a0dc5e2fcca754548018029562de0fb1"
-
- SECONDARY_TEST_COMMITS = []*vcsinfo.LongCommit{
- {ShortCommit: &vcsinfo.ShortCommit{Hash: VALID_COMMIT, Subject: "Really big code change"}},
- {ShortCommit: &vcsinfo.ShortCommit{Hash: NO_DEPS_COMMIT, Subject: "Small code change without DEPS"}},
- }
-
- SECONDARY_DEPS_FILE_MAP = map[string]string{
- VALID_COMMIT: `
- # the commit queue can handle CLs rolling Skia
- # and whatever else without interference from each other.
- 'skia_revision': '02cb37309c01506e2552e931efa9c04a569ed266',
- # Three lines of non-changing comments so that
- # the commit queue can handle CLs rolling Skia
- `,
- NO_DEPS_COMMIT: `
- # and whatever else without interference from each other.
- 'skia_revision': '86a1022463a21fc779321c1db029fc3fdb6da2d6',
- # Three lines of non-changing comments so that
- `,
- }
-)
-
-// Tests parsing and processing of a single file.
-func TestExtractTraceDBEntries(t *testing.T) {
- unittest.SmallTest(t)
- f, err := os.Open(TEST_INGESTION_FILE)
- assert.NoError(t, err)
-
- dmResults, err := parseDMResultsFromReader(f, TEST_INGESTION_FILE)
- assert.NoError(t, err)
-
- entries, err := extractTraceDBEntries(dmResults)
- assert.NoError(t, err)
- assert.Equal(t, len(TEST_ENTRIES), len(entries))
-
- for _, testEntry := range TEST_ENTRIES {
- found, ok := entries[testEntry.key]
- assert.True(t, ok)
- assert.Equal(t, testEntry.value, types.Digest(found.Value))
- }
-}
-
-// Tests the processor in conjunction with the vcs.
-func TestTraceDBProcessor(t *testing.T) {
- unittest.MediumTest(t)
-
- // Set up mock VCS and run a server with the given data directory.
- ctx := context.Background()
- vcs := mocks.DeprecatedMockVCS(TEST_COMMITS, nil, nil)
- server, serverAddr := trace_utils.StartTraceDBTestServer(t, TRACE_DB_FILENAME, "")
- defer server.Stop()
- defer testutils.Remove(t, TRACE_DB_FILENAME)
-
- ingesterConf := &sharedconfig.IngesterConfig{
- ExtraParams: map[string]string{
- tracedbServiceConfig: serverAddr,
- },
- }
-
- // Set up the processor.
- eventBus := eventbus.New()
- processor, err := newDeprecatedTraceDBProcessor(vcs, ingesterConf, nil, eventBus)
- assert.NoError(t, err)
- defer util.Close(processor.(*traceDBProcessor).traceDB)
-
- _ = testTraceDBProcessor(t, ctx, processor, TEST_INGESTION_FILE)
-
- // Fail when there is not secondary repo defined.
- err = testTraceDBProcessor(t, ctx, processor, TEST_SECONDARY_FILE)
- assert.Equal(t, err, ingestion.IgnoreResultsFileErr)
-
- // Inject a secondary repo and test its use.
- secVCS := mocks.DeprecatedMockVCS(SECONDARY_TEST_COMMITS, SECONDARY_DEPS_FILE_MAP, nil)
- extractor := depot_tools.NewRegExDEPSExtractor(depot_tools.DEPSSkiaVarRegEx)
- vcs.(mocks.MockVCSImpl).SetSecondaryRepo(secVCS, extractor)
-
- _ = testTraceDBProcessor(t, ctx, processor, TEST_SECONDARY_FILE)
- err = testTraceDBProcessor(t, ctx, processor, TEST_SECONDARY_FILE_INVALID)
- assert.Equal(t, err, ingestion.IgnoreResultsFileErr)
- err = testTraceDBProcessor(t, ctx, processor, TEST_SECONDARY_FILE_NO_DEPS)
- assert.Equal(t, err, ingestion.IgnoreResultsFileErr)
-}
-
-func testTraceDBProcessor(t *testing.T, ctx context.Context, processor ingestion.Processor, testFileName string) error {
- // Load the example file and process it.
- fsResult, err := ingestion.FileSystemResult(testFileName, "./")
- assert.NoError(t, err)
- err = processor.Process(ctx, fsResult)
- if err != nil {
- return err
- }
- assert.NoError(t, err)
-
- // Steal the traceDB used by the processor to verify the results.
- traceDB := processor.(*traceDBProcessor).traceDB
-
- startTime := time.Now().Add(-time.Hour * 24 * 10)
- commitIDs, err := traceDB.List(startTime, time.Now())
- assert.NoError(t, err)
-
- assert.Equal(t, 1, len(filterCommitIDs(commitIDs, "master")))
- assert.Equal(t, 1, len(commitIDs))
- assert.Equal(t, &tracedb.CommitID{
- Timestamp: TEST_COMMITS[0].Timestamp.Unix(),
- ID: TEST_COMMITS[0].Hash,
- Source: "master",
- }, commitIDs[0])
-
- // Get a tile and make sure we have the right number of traces.
- tile, _, err := traceDB.TileFromCommits(commitIDs)
- assert.NoError(t, err)
-
- traces := tile.Traces
- assert.Equal(t, len(TEST_ENTRIES), len(traces))
-
- for _, testEntry := range TEST_ENTRIES {
- found, ok := traces[testEntry.key]
- assert.True(t, ok)
- goldTrace, ok := found.(*types.GoldenTrace)
- assert.True(t, ok)
- assert.Equal(t, 1, len(goldTrace.Digests))
- assert.Equal(t, testEntry.value, goldTrace.Digests[0])
- }
-
- assert.Equal(t, "master", commitIDs[0].Source)
- assert.NoError(t, traceDB.Close())
- return nil
-}
-
-// filterCommitIDs returns all commitIDs that have the given prefix. If the
-// prefix is an empty string it will return the input slice.
-func filterCommitIDs(commitIDs []*tracedb.CommitID, prefix string) []*tracedb.CommitID {
- if prefix == "" {
- return commitIDs
- }
-
- ret := make([]*tracedb.CommitID, 0, len(commitIDs))
- for _, cid := range commitIDs {
- if strings.HasPrefix(cid.Source, prefix) {
- ret = append(ret, cid)
- }
- }
- return ret
-}
diff --git a/golden/go/ingestion_processors/tryjob_ingestion.go b/golden/go/ingestion_processors/tryjob_ingestion.go
index e8f9568..1412744 100644
--- a/golden/go/ingestion_processors/tryjob_ingestion.go
+++ b/golden/go/ingestion_processors/tryjob_ingestion.go
@@ -168,7 +168,7 @@
return ingestion.IgnoreResultsFileErr
}
- entries, err := extractTraceDBEntries(dmResults)
+ entries, err := extractTraceStoreEntries(dmResults)
if err != nil {
sklog.Errorf("Error getting tracedb entries: %s", err)
return ingestion.IgnoreResultsFileErr
@@ -199,14 +199,14 @@
resultsMap := make(map[string]*tryjobstore.TryjobResult, len(entries))
for _, entry := range entries {
testName := types.TestName(entry.Params[types.PRIMARY_KEY_FIELD])
- key := string(testName) + string(entry.Value)
+ key := string(testName) + string(entry.Digest)
if found, ok := resultsMap[key]; ok {
found.Params.AddParams(entry.Params)
} else {
resultsMap[key] = &tryjobstore.TryjobResult{
BuildBucketID: tryjob.BuildBucketID,
TestName: testName,
- Digest: types.Digest(entry.Value),
+ Digest: entry.Digest,
Params: paramtools.NewParamSet(entry.Params),
}
}
diff --git a/tracedb/DESIGN.md b/tracedb/DESIGN.md
deleted file mode 100644
index 19f8dd0..0000000
--- a/tracedb/DESIGN.md
+++ /dev/null
@@ -1,22 +0,0 @@
-tracedb
-=======
-
-The traceserver and tools for talking to traceservers.
-
-traceserver
------------
-
-The traceserver is a simple gRPC server that serves up the traceservice
-endpoint. In production we run the following services at these ports:
-
- Server | Port | Data
- --------------|--------|--------
- skia-tracedb | 9090 | Gold
-
-These ports are not available externally from GCE so to access them from your
-desktop there is a helper script, `gold_tunnel.sh` which will set up SSH port
-forwarding from localhost:9090 to skia-tracedb:9090.
-
-Note that `tracetool` defaults to trying to talk to the endpoint on
-localhost:9090, so you shouldn't need to pass the --address argument
-to `tracetool` when using the port forwaring scripts.
diff --git a/tracedb/Makefile b/tracedb/Makefile
deleted file mode 100644
index 429110d..0000000
--- a/tracedb/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-KGO := CGO_ENABLED=0 GOOS=linux go build
-
-default:
- go install -v ./go/traceserver
- go install -v ./go/tracetool
- go install -v ./go/importtile
- go install -v ./go/difftile
-
-.PHONY: k8s-binaries
-k8s-binaries:
- mkdir -p ./build
- rm -f ./build/*
- $(KGO) -o build/traceserver_k8s -a ./go/traceserver/main.go
-
-.PHONY: k8s-release-traceserver
-k8s-release-traceserver: k8s-binaries
- ./k8s_push_traceserver
diff --git a/tracedb/README.md b/tracedb/README.md
deleted file mode 100644
index 5536958..0000000
--- a/tracedb/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-TraceDB and Ingesters
-=====================
-
-To build the package with the ingesters, the *pdfium_test* executable needs to
-be installed on your system. The *build_release_ingestiond* will automatically
-install the latest version.
-
-See the *infra/pdfium* directory for details.
diff --git a/tracedb/build_release_traceserverd b/tracedb/build_release_traceserverd
deleted file mode 100755
index 8bb98e2..0000000
--- a/tracedb/build_release_traceserverd
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-# Builds and uploads a debian package for traceserver.
-APPNAME="traceserverd"
-SYSTEMD="gold-traceserver.service pdfium-gold-traceserver.service chromevr-gold-traceserver.service"
-DESCRIPTION="Traceserver datastores for Gold, Pdfium-Gold and ChromeVR-Gold traces."
-
-set -x -e
-
-# Copy files into the right locations in ${ROOT}.
-copy_release_files()
-{
-
-INSTALL="fakeroot install -D --verbose --backup=none --group=root --owner=root"
-INSTALL_DIR="fakeroot install -d --verbose --backup=none --group=root --owner=root"
-${INSTALL} --mode=644 -T ./sys/gold-traceserver.service ${ROOT}/etc/systemd/system/gold-traceserver.service
-${INSTALL} --mode=644 -T ./sys/pdfium-gold-traceserver.service ${ROOT}/etc/systemd/system/pdfium-gold-traceserver.service
-${INSTALL} --mode=644 -T ./sys/chromevr-gold-traceserver.service ${ROOT}/etc/systemd/system/chromevr-gold-traceserver.service
-${INSTALL} --mode=755 -T ${GOPATH}/bin/traceserver ${ROOT}/usr/local/bin/gold_traceserver
-${INSTALL} --mode=755 -T ${GOPATH}/bin/traceserver ${ROOT}/usr/local/bin/pdfium_gold_traceserver
-${INSTALL} --mode=755 -T ${GOPATH}/bin/traceserver ${ROOT}/usr/local/bin/chromevr_gold_traceserver
-${INSTALL_DIR} --mode=777 ${ROOT}/mnt/pd0/gold/traceserver
-${INSTALL_DIR} --mode=777 ${ROOT}/mnt/pd0/pdfium_gold/traceserver
-${INSTALL_DIR} --mode=777 ${ROOT}/mnt/pd0/chromevr_gold/traceserver
-}
-
-source ../bash/release.sh
diff --git a/tracedb/dockerfiles/Dockerfile_traceserver b/tracedb/dockerfiles/Dockerfile_traceserver
deleted file mode 100644
index bc0b000..0000000
--- a/tracedb/dockerfiles/Dockerfile_traceserver
+++ /dev/null
@@ -1,9 +0,0 @@
-FROM gcr.io/skia-public/basealpine:3.8
-
-USER root
-
-COPY . /
-
-USER skia
-
-ENTRYPOINT ["/usr/local/bin/gold-traceserver"]
diff --git a/tracedb/go/difftile/main.go b/tracedb/go/difftile/main.go
deleted file mode 100644
index 064e5e9..0000000
--- a/tracedb/go/difftile/main.go
+++ /dev/null
@@ -1,119 +0,0 @@
-package main
-
-import (
- "flag"
- "log"
- "time"
-
- "github.com/davecgh/go-spew/spew"
- "go.skia.org/infra/go/common"
- "go.skia.org/infra/go/filetilestore"
- "go.skia.org/infra/go/grpclog"
- "go.skia.org/infra/go/sklog"
- "go.skia.org/infra/go/tiling"
- "go.skia.org/infra/go/trace/db"
- "go.skia.org/infra/go/util"
- gtypes "go.skia.org/infra/golden/go/types"
- "google.golang.org/grpc"
-)
-
-// flags
-var (
- address = flag.String("address", "localhost:9090", "The address of the traceserver gRPC endpoint.")
- tilestore = flag.String("tilestore", "/usr/local/google/home/jcgregorio/projects/tiles/tileStore3/", "The directory of the file tile store.")
-)
-
-func diff(tile *tiling.Tile, ts db.DB) error {
- commits := tile.Commits
- startTime := time.Unix(commits[0].CommitTime, 0)
- commitIDs, err := ts.List(startTime, time.Now())
- if err != nil {
- return err
- }
-
- sklog.Infof("COMMIT ids:\n\n\n %s\n\n\n", spew.Sdump(commitIDs))
- sklog.Infof("LOADING tile")
-
- traceDBTile, _, err := ts.TileFromCommits(commitIDs)
- if err != nil {
- return err
- }
-
- minLen := util.MinInt(len(commits), len(traceDBTile.Commits))
- tdbTraces := traceDBTile.Traces
-
- sklog.Infof("Commits/traces in tilestore: %d - %d", len(commits), len(tile.Traces))
- sklog.Infof("Commits/traces in tracedb : %d - %d", len(traceDBTile.Commits), len(tdbTraces))
-
- count := 0
- matchingCount := 0
- for traceID, trace := range tile.Traces {
- _, ok := tdbTraces[traceID]
- if !ok {
- sklog.Fatalf("Trace missing: %s", traceID)
- }
-
- v1 := trace.(*gtypes.GoldenTrace).Digests[:minLen]
- v2 := tdbTraces[traceID].(*gtypes.GoldenTrace).Digests[:minLen]
- identicalCount := 0
- indices := make([]int, 0, minLen)
- for idx, val := range v1 {
- if val == v2[idx] {
- identicalCount++
- } else {
- indices = append(indices, idx)
- }
-
- }
- if identicalCount != minLen {
- sklog.Infof("Trace differs by %d / %d / %.2f, %v", identicalCount, minLen, float64(identicalCount)/float64(minLen), indices)
- } else {
- matchingCount++
- }
-
- count++
- }
- sklog.Infof("Compared %d traces. Matching: %d", count, matchingCount)
-
- return nil
-}
-
-func main() {
- common.Init()
- grpclog.Init()
-
- // Load the 0,-1 tile.
- fileTilestore := filetilestore.NewFileTileStore(*tilestore, "gold", time.Hour)
- tile, err := fileTilestore.Get(0, -1)
- if err != nil {
- sklog.Fatalf("Failed to load tile: %s", err)
- }
-
- // Trim to the last 50 commits.
- begin := 0
- end := tile.LastCommitIndex()
- if end >= 49 {
- begin = end - 49
- }
- sklog.Infof("Loaded Tile")
- tile, err = tile.Trim(begin, end)
-
- // Set up a connection to the server.
- conn, err := grpc.Dial(*address, grpc.WithInsecure())
- if err != nil {
- sklog.Fatalf("did not connect: %v", err)
- }
- defer util.Close(conn)
-
- builder := gtypes.GoldenTraceBuilder
-
- sklog.Infof("START load tracedb.")
- ts, err := db.NewTraceServiceDB(conn, builder)
- if err != nil {
- log.Fatalf("Failed to create db.DB: %s", err)
- }
- sklog.Infof("DONE load tracedb.")
- if err = diff(tile, ts); err != nil {
- sklog.Fatalf("Diff error: %s", err)
- }
-}
diff --git a/tracedb/go/importtile/main.go b/tracedb/go/importtile/main.go
deleted file mode 100644
index 68d5695..0000000
--- a/tracedb/go/importtile/main.go
+++ /dev/null
@@ -1,87 +0,0 @@
-// importtile allows importing a .gob based Tile into tracedb.
-//
-// It also has hooks for profiling.
-package main
-
-import (
- "flag"
- "log"
- "os"
- "runtime/pprof"
- "time"
-
- "go.skia.org/infra/go/common"
- "go.skia.org/infra/go/grpclog"
- "go.skia.org/infra/go/sklog"
- "go.skia.org/infra/go/trace/db"
- "go.skia.org/infra/go/util"
- "go.skia.org/infra/golden/go/types"
- "google.golang.org/grpc"
-)
-
-// flags
-var (
- address = flag.String("address", "localhost:9090", "The address of the traceserver gRPC endpoint.")
- cpuprofile = flag.String("cpuprofile", "", "Write cpu profile to file.")
-)
-
-func _main(ts db.DB) {
- week := time.Hour * 24 * 7
- commits, err := ts.List(time.Now().Add(-week), time.Now())
- if err != nil {
- sklog.Errorf("Failed to load commits: %s", err)
- return
- }
- if len(commits) > 50 {
- commits = commits[:50]
- }
-
- begin := time.Now()
- _, _, err = ts.TileFromCommits(commits)
- if err != nil {
- sklog.Errorf("Failed to load Tile: %s", err)
- return
- }
- sklog.Infof("Time to load tile: %v", time.Now().Sub(begin))
- // Now load a second time.
- begin = time.Now()
- _, _, err = ts.TileFromCommits(commits)
- if err != nil {
- sklog.Errorf("Failed to load Tile: %s", err)
- return
- }
- sklog.Infof("Time to load tile the second time: %v", time.Now().Sub(begin))
-}
-
-func main() {
- common.Init()
- grpclog.Init()
-
- // Set up a connection to the server.
- conn, err := grpc.Dial(*address, grpc.WithInsecure())
- if err != nil {
- sklog.Fatalf("did not connect: %v", err)
- }
- defer util.Close(conn)
-
- // Build a TraceService client.
- builder := types.GoldenTraceBuilder
- ts, err := db.NewTraceServiceDB(conn, builder)
- if err != nil {
- log.Fatalf("Failed to create db.DB: %s", err)
- }
- sklog.Infof("Opened tracedb")
- if *cpuprofile != "" {
- f, err := os.Create(*cpuprofile)
- if err != nil {
- sklog.Fatalf("Failed to open profiling file: %s", err)
- }
- if err := pprof.StartCPUProfile(f); err != nil {
- sklog.Fatalf("Failed to start profiling: %s", err)
- }
- defer pprof.StopCPUProfile()
- _main(ts)
- } else {
- _main(ts)
- }
-}
diff --git a/tracedb/go/traceserver/main.go b/tracedb/go/traceserver/main.go
deleted file mode 100644
index bec6b67..0000000
--- a/tracedb/go/traceserver/main.go
+++ /dev/null
@@ -1,84 +0,0 @@
-// traceserver is a gRPC server for trace.service.
-package main
-
-import (
- "flag"
- "log"
- "net"
- "net/http"
- "os"
- "path/filepath"
- "runtime/pprof"
-
- "go.skia.org/infra/go/cleanup"
- "go.skia.org/infra/go/common"
- "go.skia.org/infra/go/httputils"
- "go.skia.org/infra/go/sklog"
- tracedb "go.skia.org/infra/go/trace/db"
- traceservice "go.skia.org/infra/go/trace/service"
- "google.golang.org/grpc"
-)
-
-// flags
-var (
- cpuprofile = flag.String("cpuprofile", "", "Write cpu profile to file.")
- db_file = flag.String("db_file", "", "The name of the BoltDB file that will store the traces.")
- httpPort = flag.String("http_port", ":9091", "The http port where ready-ness endpoints are served.")
- local = flag.Bool("local", false, "Running locally if true. As opposed to in production.")
- port = flag.String("port", ":9090", "The port to serve the gRPC endpoint on.")
- promPort = flag.String("prom_port", ":20000", "Metrics service address (e.g., ':10110')")
- noCloudLog = flag.Bool("no_cloud_log", false, "Disables cloud logging. Primarily for running locally.")
-)
-
-func main() {
- // Parse the options. So we can configure logging.
- flag.Parse()
-
- // Set up the logging options.
- logOpts := []common.Opt{
- common.PrometheusOpt(promPort),
- }
-
- // Should we disable cloud logging.
- if !(*noCloudLog) {
- logOpts = append(logOpts, common.CloudLoggingOpt())
- }
- common.InitWithMust(filepath.Base(os.Args[0]), logOpts...)
-
- ts, err := traceservice.NewTraceServiceServer(*db_file)
- if err != nil {
- sklog.Fatalf("Failed to initialize the tracestore server: %s", err)
- }
-
- lis, err := net.Listen("tcp", *port)
- if err != nil {
- sklog.Fatalf("failed to listen: %v", err)
- }
- s := grpc.NewServer(grpc.MaxSendMsgSize(tracedb.MAX_MESSAGE_SIZE), grpc.MaxRecvMsgSize(tracedb.MAX_MESSAGE_SIZE))
- traceservice.RegisterTraceServiceServer(s, ts)
-
- go func() {
- if *cpuprofile != "" {
- f, err := os.Create(*cpuprofile)
- if err != nil {
- sklog.Fatalf("Failed to open profiling file: %s", err)
- }
- if err := pprof.StartCPUProfile(f); err != nil {
- sklog.Fatalf("Failed to start profiling: %s", err)
- }
- }
- sklog.Fatalf("Failure while serving: %s", s.Serve(lis))
- }()
-
- // Handle SIGINT and SIGTERM.
- if *cpuprofile != "" {
- cleanup.AtExit(func() {
- pprof.StopCPUProfile()
- })
- }
-
- // Set up the http handler to indicate ready-ness and start serving.
- http.HandleFunc("/healthz", httputils.ReadyHandleFunc)
- sklog.Infof("Serving port http://%s", *httpPort)
- log.Fatal(http.ListenAndServe(*httpPort, nil))
-}
diff --git a/tracedb/go/tracetool/main.go b/tracedb/go/tracetool/main.go
deleted file mode 100644
index 48b4f69..0000000
--- a/tracedb/go/tracetool/main.go
+++ /dev/null
@@ -1,402 +0,0 @@
-// tracetool is a command-line tool for interrogating a tracedb server.
-package main
-
-import (
- "context"
- "crypto/md5"
- "flag"
- "fmt"
- "math/rand"
- "os"
- "regexp"
- "sort"
- "strings"
- "time"
-
- "go.skia.org/infra/go/common"
- "go.skia.org/infra/go/human"
- "go.skia.org/infra/go/sklog"
- traceservice "go.skia.org/infra/go/trace/service"
- "go.skia.org/infra/go/util"
- "google.golang.org/grpc"
-)
-
-// flags
-var (
- address = flag.String("address", "localhost:9090", "The address of the traceservice gRPC endpoint.")
- begin = flag.String("begin", "1w", "Select the commit ids for the range beginning this long ago.")
- end = flag.String("end", "0s", "Select the commit ids for the range ending this long ago.")
- id = flag.String("id", "", "Selects the CommitID with an ID that begins with id.")
- regex = flag.String("regex", "", "A regular expression to match against traceids.")
- verbose = flag.Bool("verbose", false, "Verbose output.")
- only = flag.Bool("only", false, "If true then only print values, otherwise print keys and values.")
- showMD5 = flag.Bool("md5", false, "If true then include the MD5 hash value for each commit id to compare across databases. Warning: Slow !")
-)
-
-var Usage = func() {
- fmt.Printf(`Usage: tracetool <command> [OPTIONS]...
-Inspect and interrogate a running tracedb server.
-
-Commands:
-
- ls List all the commit ids for the given time range.
-
- Flags: --begin --end --md5
-
- count Return the number of samples stored for all commits in the given time range.
-
- Flags: --begin --end
-
- ping Call the Ping service method every 1s.
-
- sample Get a sampling of values for the given ID.
- Flags: --begin --end --id --regex --only
-
- The first commitid with an ID that begins with the value of --id
- will be loaded and a sampling of 10 values will be displayed.
-
- param_grep Find parameter values that match a regular expression.
- Flags: --begin --end --regex
-
- It loads all commits in the defined range and matches the
- parameter values of each trace in those commits against the
- regular expression. For each commit it outputs the paramaters
- and their values that match the regex.
-
- value_grep Find commits where at least one value matches a regular expression.
- Flags: --begin --end --regex --verbose
-
- It loads all commits in the defined range and matches the
- values of each trace in those commits against the
- regular expression. For each commit it outputs the values of the
- "name" parameter across traces.
- This only makes sense for Gold data since the digests are stored
- strings.
-
-Examples:
-
- To list all the commits for the first 6 days of the previous week:
-
- tracetool ls -begin 1w -end 1d
-
- To count all the values for every commit id in the last day:
-
- tracetool -begin 1d
-
-Flags:
-
-`)
- flag.PrintDefaults()
-}
-
-func _list(client traceservice.TraceServiceClient) (*traceservice.ListResponse, error) {
- req := &traceservice.ListRequest{}
- now := time.Now()
- b, err := human.ParseDuration(*begin)
- if err != nil {
- return nil, fmt.Errorf("Invalid begin value: %s", err)
- }
- e, err := human.ParseDuration(*end)
- if err != nil {
- return nil, fmt.Errorf("Invalid begin value: %s", err)
- }
-
- req.Begin = now.Add(-b).Unix()
- req.End = now.Add(-e).Unix()
- if *verbose {
- fmt.Printf("Requesting from %s to %s\n", now.Add(-b), now.Add(-e))
- }
- return client.List(context.Background(), req)
-}
-
-func count(client traceservice.TraceServiceClient) {
- listResp, err := _list(client)
- if err != nil {
- fmt.Printf("Failed to retrieve the list: %s\n", err)
- return
- }
- for _, cid := range listResp.Commitids {
- if *id != "" && !strings.HasPrefix(cid.Id, *id) {
- continue
- }
- req := &traceservice.GetValuesRequest{
- Commitid: cid,
- }
- resp, err := client.GetValues(context.Background(), req)
- if err != nil {
- fmt.Printf("Failed to retrieve values: %s", err)
- return
- }
- fmt.Printf("%s %s %s: Count %d\n", cid.Id, cid.Source, time.Unix(cid.Timestamp, 0), len(resp.Values))
- }
-}
-
-func list(client traceservice.TraceServiceClient) {
- resp, err := _list(client)
- if err != nil {
- sklog.Fatalf("Failed to retrieve the list: %s\n", err)
- }
-
- for _, cid := range resp.Commitids {
- if *id != "" && !strings.HasPrefix(cid.Id, *id) {
- continue
- }
- fmt.Printf("%s %s %s", cid.Id, cid.Source, time.Unix(cid.Timestamp, 0).UTC())
- if *showMD5 {
- fmt.Printf(" %s", calcMD5FromValues(client, cid))
- }
- fmt.Printf("\n")
- }
-}
-
-// calcMD5FromValues loads the values for the given commit ID and sorts the bytes of the
-// values in lexicographical order and calculates the hash. This can be used to compare
-// commit values across databases.
-func calcMD5FromValues(client traceservice.TraceServiceClient, cid *traceservice.CommitID) string {
- req := &traceservice.GetValuesRequest{Commitid: cid}
- resp, err := client.GetValues(context.Background(), req)
- if err != nil {
- sklog.Fatalf("Failed to retrieve value: %s", err)
- }
-
- sortedStr := make([]string, 0, len(resp.Values))
- for _, val := range resp.Values {
- sortedStr = append(sortedStr, string(val.Value))
- }
- sort.Strings(sortedStr)
-
- ret := md5.New()
- for _, val := range sortedStr {
- _, err := ret.Write([]byte(val))
- if err != nil {
- sklog.Fatalf("Error writint to MD5: %s", err)
- }
- }
- return fmt.Sprintf("%x", ret.Sum(nil))
-}
-
-func _pingStep(ctx context.Context, req *traceservice.Empty, client traceservice.TraceServiceClient) {
- begin := time.Now()
- _, err := client.Ping(ctx, req)
- end := time.Now()
- if err != nil {
- fmt.Printf("Failure: %s\n", err)
- } else {
- fmt.Printf("Success: time=%s\n", end.Sub(begin))
- }
-}
-
-func ping(client traceservice.TraceServiceClient) {
- ctx := context.Background()
- req := &traceservice.Empty{}
- _pingStep(ctx, req, client)
- for range time.Tick(time.Second) {
- _pingStep(ctx, req, client)
- }
-}
-
-// converter is a func that will convert the raw byte slice returned into the correct type.
-type converter func([]byte) interface{}
-
-// goldConverter in an implementation of converter for digests (strings).
-func goldConverter(b []byte) interface{} {
- return string(b)
-}
-
-func sample(client traceservice.TraceServiceClient) {
- // Get all the CommitIDs in the given time range.
- listResp, err := _list(client)
- if err != nil {
- fmt.Printf("Failed to retrieve the list: %s\n", err)
- return
- }
-
- for _, cid := range listResp.Commitids {
- if *id != "" && !strings.HasPrefix(cid.Id, *id) {
- continue
- }
- req := &traceservice.GetValuesRequest{
- Commitid: cid,
- }
- resp, err := client.GetValues(context.Background(), req)
- if err != nil {
- fmt.Printf("Failed to retrieve values: %s", err)
- return
- }
- if *regex == "" {
- // Dump a sample of at most 10 values along with their traceids.
- N := 10
- if len(resp.Values) < N {
- N = len(resp.Values)
- }
- for i := 0; i < N; i++ {
- pair := resp.Values[rand.Intn(len(resp.Values))]
- if *only {
- fmt.Printf("%v\n", goldConverter(pair.Value))
- } else {
- fmt.Printf("%110s - %v\n", pair.Key, goldConverter(pair.Value))
- }
- }
- } else {
- r, err := regexp.Compile(*regex)
- if err != nil {
- fmt.Printf("Invalid value for regex %q: %s\n", *regex, err)
- }
- for _, pair := range resp.Values {
- if r.MatchString(pair.Key) {
- if *only {
- fmt.Printf("%v\n", goldConverter(pair.Value))
- } else {
- fmt.Printf("%110s - %v\n", pair.Key, goldConverter(pair.Value))
- }
- }
- }
- }
- }
-}
-
-func param_grep(client traceservice.TraceServiceClient) {
- if *regex == "" {
- sklog.Fatalf("No regex given for param_grep")
- }
- r, err := regexp.Compile(*regex)
- if err != nil {
- sklog.Fatalf("Invalid value for regex %q: %s\n", *regex, err)
- }
-
- ctx := context.Background()
- resp, err := _list(client)
- if err != nil {
- sklog.Fatalf("Failed to retrieve the list: %s\n", err)
- }
-
- for _, cid := range resp.Commitids {
- traceIdsResp, err := client.GetValues(ctx, &traceservice.GetValuesRequest{Commitid: cid})
- if err != nil {
- sklog.Errorf("Could not get trace ids: %s", err)
- continue
- }
-
- traceIds := make([]string, 0, len(traceIdsResp.Values))
- for _, valuePair := range traceIdsResp.Values {
- traceIds = append(traceIds, valuePair.Key)
- }
-
- paramsResp, err := client.GetParams(ctx, &traceservice.GetParamsRequest{Traceids: traceIds})
- if err != nil {
- sklog.Errorf("Unable to retrieve params for %s. Error: %s", cid, err)
- continue
- }
-
- result := make(map[string]bool, len(paramsResp.Params))
- for _, p := range paramsResp.Params {
- for key, val := range p.Params {
- if r.MatchString(val) {
- result[fmt.Sprintf("%s = %s", key, val)] = true
- }
- }
- }
-
- fmt.Printf("%.3d %s %s %s \n", len(result), cid.Id, cid.Source, time.Unix(cid.Timestamp, 0))
- for p := range result {
- fmt.Printf(" %s\n", p)
- }
- }
-}
-
-func value_grep(client traceservice.TraceServiceClient) {
- if *regex == "" {
- sklog.Fatalf("No regex given for param_grep")
- }
- r, err := regexp.Compile(*regex)
- if err != nil {
- sklog.Fatalf("Invalid value for regex %q: %s\n", *regex, err)
- }
-
- ctx := context.Background()
- resp, err := _list(client)
- if err != nil {
- sklog.Fatalf("Failed to retrieve the list: %s\n", err)
- }
-
- for _, cid := range resp.Commitids {
- traceIdsResp, err := client.GetValues(ctx, &traceservice.GetValuesRequest{Commitid: cid})
- if err != nil {
- sklog.Errorf("Could not get trace ids: %s", err)
- continue
- }
-
- traceIds := make([]string, 0, len(traceIdsResp.Values))
- for _, valuePair := range traceIdsResp.Values {
- if r.MatchString(string(valuePair.Value)) {
- traceIds = append(traceIds, valuePair.Key)
- }
- }
-
- if len(traceIds) == 0 {
- if *verbose {
- fmt.Printf("NOT FOUND IN %s %s %s\n", cid.Id, cid.Source, time.Unix(cid.Timestamp, 0))
- }
- continue
- }
-
- paramsResp, err := client.GetParams(ctx, &traceservice.GetParamsRequest{Traceids: traceIds})
- if err != nil {
- sklog.Errorf("Unable to retrieve params for %s. Error: %s", cid, err)
- continue
- }
-
- result := map[string]bool{}
- for _, p := range paramsResp.Params {
- if name, ok := p.Params["name"]; ok {
- result[name] = true
- }
- }
-
- fmt.Printf("%.3d %s %s %s : ", len(result), cid.Id, cid.Source, time.Unix(cid.Timestamp, 0))
- for name := range result {
- fmt.Print(name + " ")
- }
- fmt.Println()
- }
-}
-
-func main() {
- rand.Seed(time.Now().Unix())
- // Grab the first argument off of os.Args, the command, before we call flag.Parse.
- if len(os.Args) < 2 {
- Usage()
- return
- }
- cmd := os.Args[1]
- os.Args = append([]string{os.Args[0]}, os.Args[2:]...)
-
- // Now parge the flags.
- common.Init()
-
- // Set up a connection to the server.
- conn, err := grpc.Dial(*address, grpc.WithInsecure())
- if err != nil {
- sklog.Fatalf("did not connect: %v", err)
- }
- defer util.Close(conn)
- client := traceservice.NewTraceServiceClient(conn)
-
- switch cmd {
- case "ls":
- list(client)
- case "ping":
- ping(client)
- case "count":
- count(client)
- case "sample":
- sample(client)
- case "param_grep":
- param_grep(client)
- case "value_grep":
- value_grep(client)
- default:
- fmt.Printf("Unknown command: %s\n", cmd)
- Usage()
- }
-}
diff --git a/tracedb/gold_tunnel.sh b/tracedb/gold_tunnel.sh
deleted file mode 100755
index 0c328d4..0000000
--- a/tracedb/gold_tunnel.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-# Sets up an SSH port forwarding from localhost:9090 to skia-tracedb:10000,
-# which is where the traceserver for Gold traces should be listening.
-gcloud compute ssh default@skia-tracedb --zone=us-central1-c --ssh-flag="-L 9090:localhost:9090"
diff --git a/tracedb/k8s_config_maps/gold-lottie-ingestion-config.json5 b/tracedb/k8s_config_maps/gold-lottie-ingestion-config.json5
deleted file mode 100644
index 5f22519..0000000
--- a/tracedb/k8s_config_maps/gold-lottie-ingestion-config.json5
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- GitRepoDir: "/data/lottie-ci-repo",
- GitRepoURL: "https://skia.googlesource.com/lottie-ci",
- EventTopic: "gold-lottie-eventbus",
-
- Ingesters: {
- // Lottie Gold ingester
- gold: {
- RunEvery: "5m",
- NCommits: 75,
- MinDays: 20,
- MetricName: "gold-lottie-ingestion",
- Sources: [
- {
- Bucket: "skia-gold-lottie",
- Dir: "dm-json-v1"
- }
- ],
- ExtraParams: {
- TraceService: "gold-lottie-traceservice:9090"
- }
- }
- }
-}
diff --git a/tracedb/k8s_push_traceserver b/tracedb/k8s_push_traceserver
deleted file mode 100755
index 7ed1099..0000000
--- a/tracedb/k8s_push_traceserver
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-set -x -e
-
-# Builds and uploads a container image for traceserver.
-
-APPNAME="gold-traceserver"
-
-# Copy files into the right locations in ${ROOT}.
-copy_release_files()
-{
-INSTALL="install -D --verbose --backup=none"
-INSTALL_DIR="install -d --verbose --backup=none"
-
-${INSTALL} --mode=644 -T ./dockerfiles/Dockerfile_traceserver ${ROOT}/Dockerfile
-${INSTALL} --mode=755 -T ./build/traceserver_k8s ${ROOT}/usr/local/bin/gold-traceserver
-}
-
-source ../bash/docker_build.sh
diff --git a/tracedb/sys/chromevr-gold-traceserver.service b/tracedb/sys/chromevr-gold-traceserver.service
deleted file mode 100644
index 6801886..0000000
--- a/tracedb/sys/chromevr-gold-traceserver.service
+++ /dev/null
@@ -1,20 +0,0 @@
-[Unit]
-Description=ChromeVR Gold traceserver
-Requires=mnt-pd0.mount
-Wants=network-online.target
-After=mnt-pd0.mount network-online.target
-
-[Service]
-ExecStart=/usr/local/bin/chromevr_gold_traceserver \
- --db_file=/mnt/pd0/chromevr_gold/traceserver/chromevr_gold_traces.db \
- --http_port=:9192 \
- --port=:9092 \
- --prom_port=:20005 \
- --logtostderr
-Restart=always
-User=default
-Group=default
-LimitNOFILE=10000
-
-[Install]
-WantedBy=multi-user.target
diff --git a/tracedb/sys/gold-traceserver.service b/tracedb/sys/gold-traceserver.service
deleted file mode 100644
index 17e56e26..0000000
--- a/tracedb/sys/gold-traceserver.service
+++ /dev/null
@@ -1,20 +0,0 @@
-[Unit]
-Description=Gold traceserver
-Requires=mnt-pd0.mount
-Wants=network-online.target
-After=mnt-pd0.mount network-online.target
-
-[Service]
-ExecStart=/usr/local/bin/gold_traceserver \
- --db_file=/mnt/pd0/gold/traceserver/goldtraces.db \
- --http_port=:9190 \
- --port=:9090 \
- --prom_port=:20004 \
- --logtostderr
-Restart=always
-User=default
-Group=default
-LimitNOFILE=10000
-
-[Install]
-WantedBy=multi-user.target
diff --git a/tracedb/sys/pdfium-gold-traceserver.service b/tracedb/sys/pdfium-gold-traceserver.service
deleted file mode 100644
index c5e751b..0000000
--- a/tracedb/sys/pdfium-gold-traceserver.service
+++ /dev/null
@@ -1,20 +0,0 @@
-[Unit]
-Description=Pdfium Gold traceserver
-Requires=mnt-pd0.mount
-Wants=network-online.target
-After=mnt-pd0.mount network-online.target
-
-[Service]
-ExecStart=/usr/local/bin/pdfium_gold_traceserver \
- --db_file=/mnt/pd0/pdfium_gold/traceserver/pdfium_gold_traces.db \
- --http_port=:9191 \
- --port=:9091 \
- --prom_port=:20003 \
- --logtostderr
-Restart=always
-User=default
-Group=default
-LimitNOFILE=10000
-
-[Install]
-WantedBy=multi-user.target
diff --git a/tracedb/vm.go b/tracedb/vm.go
deleted file mode 100644
index ac422f1..0000000
--- a/tracedb/vm.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package main
-
-import (
- "go.skia.org/infra/go/gce"
- "go.skia.org/infra/go/gce/server"
-)
-
-func IngestionTraceDBBase(name string) *gce.Instance {
- vm := server.Server20170928(name)
- vm.DataDisks[0].SizeGb = 1000
- vm.DataDisks[0].Type = gce.DISK_TYPE_PERSISTENT_STANDARD
- vm.MachineType = gce.MACHINE_TYPE_HIGHMEM_32
- vm.Metadata["owner_primary"] = "stephana"
- vm.Metadata["owner_secondary"] = "jcgregorio"
- return vm
-}
-
-func TraceDBProd() *gce.Instance {
- return IngestionTraceDBBase("skia-tracedb")
-}
-
-func IngestionProd() *gce.Instance {
- vm := IngestionTraceDBBase("skia-ingestion")
- vm.ServiceAccount = "gold-ingestion@skia-buildbots.google.com.iam.gserviceaccount.com"
- vm.DataDisks[0].SizeGb = 100
- vm.MachineType = gce.MACHINE_TYPE_STANDARD_16
- return vm
-}
-
-func main() {
- server.Main(gce.ZONE_DEFAULT, map[string]*gce.Instance{
- "tracedb": TraceDBProd(),
- "ingestion": IngestionProd(),
- })
-}