ui: Remove unused global properties & unused publishXXX functions am: c0fc4430a1
Original change: https://android-review.googlesource.com/c/platform/external/perfetto/+/3253436
Change-Id: I90b1909650604ad48a3c763a3eec87554f1cf49e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/ui/src/common/metric_data.ts b/ui/src/common/metric_data.ts
deleted file mode 100644
index a9db6c8..0000000
--- a/ui/src/common/metric_data.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (C) 2020 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-export interface MetricResult {
- name: string;
- // Either result or error should be set.
- resultString?: string;
- error?: string;
-}
diff --git a/ui/src/frontend/globals.ts b/ui/src/frontend/globals.ts
index e3477a1..b74918a 100644
--- a/ui/src/frontend/globals.ts
+++ b/ui/src/frontend/globals.ts
@@ -24,7 +24,6 @@
ConversionJobStatus,
} from '../common/conversion_jobs';
import {createEmptyState} from '../common/empty_state';
-import {MetricResult} from '../common/metric_data';
import {CurrentSearchResults} from '../common/search_data';
import {EngineConfig, State, getLegacySelection} from '../common/state';
import {TabManager} from '../common/tab_registry';
@@ -58,7 +57,6 @@
type DispatchMultiple = (actions: DeferredAction[]) => void;
type TrackDataStore = Map<string, {}>;
-type QueryResultsStore = Map<string, {} | undefined>;
type AggregateDataStore = Map<string, AggregateData>;
type Description = Map<string, string>;
@@ -206,7 +204,6 @@
// TODO(hjd): Unify trackDataStore, queryResults, overviewStore, threads.
private _trackDataStore?: TrackDataStore = undefined;
- private _queryResults?: QueryResultsStore = undefined;
private _overviewStore?: OverviewStore = undefined;
private _aggregateDataStore?: AggregateDataStore = undefined;
private _threadMap?: ThreadMap = undefined;
@@ -220,7 +217,6 @@
private _recordingLog?: string = undefined;
private _traceErrors?: number = undefined;
private _metricError?: string = undefined;
- private _metricResult?: MetricResult = undefined;
private _jobStatus?: Map<ConversionJobName, ConversionJobStatus> = undefined;
private _embeddedMode?: boolean = undefined;
private _hideSidebar?: boolean = undefined;
@@ -351,7 +347,6 @@
// TODO(hjd): Unify trackDataStore, queryResults, overviewStore, threads.
this._trackDataStore = new Map<string, {}>();
- this._queryResults = new Map<string, {}>();
this._overviewStore = new Map<string, QuantizedLoad[]>();
this._aggregateDataStore = new Map<string, AggregateData>();
this._threadMap = new Map<number, ThreadDesc>();
@@ -414,10 +409,6 @@
return assertExists(this._trackDataStore);
}
- get queryResults(): QueryResultsStore {
- return assertExists(this._queryResults);
- }
-
get threads() {
return assertExists(this._threadMap);
}
@@ -482,14 +473,6 @@
this._metricError = arg;
}
- get metricResult() {
- return this._metricResult;
- }
-
- setMetricResult(result: MetricResult) {
- this._metricResult = result;
- }
-
set numQueuedQueries(value: number) {
this._numQueriesQueued = value;
}
@@ -645,14 +628,12 @@
// TODO(hjd): Unify trackDataStore, queryResults, overviewStore, threads.
this._trackDataStore = undefined;
- this._queryResults = undefined;
this._overviewStore = undefined;
this._threadMap = undefined;
this._sliceDetails = undefined;
this._threadStateDetails = undefined;
this._aggregateDataStore = undefined;
this._numQueriesQueued = 0;
- this._metricResult = undefined;
this._currentSearchResults = {
eventIds: new Float64Array(0),
tses: new BigInt64Array(0),
diff --git a/ui/src/frontend/publish.ts b/ui/src/frontend/publish.ts
index c425b30..f402e5f 100644
--- a/ui/src/frontend/publish.ts
+++ b/ui/src/frontend/publish.ts
@@ -15,7 +15,6 @@
import {Actions} from '../common/actions';
import {AggregateData} from '../common/aggregation_data';
import {ConversionJobStatusUpdate} from '../common/conversion_jobs';
-import {MetricResult} from '../common/metric_data';
import {CurrentSearchResults} from '../common/search_data';
import {raf} from '../core/raf_scheduler';
import {HttpRpcState} from '../trace_processor/http_rpc_engine';
@@ -56,11 +55,6 @@
raf.scheduleRedraw();
}
-export function publishMetricResult(metricResult: MetricResult) {
- globals.setMetricResult(metricResult);
- globals.publishRedraw();
-}
-
export function publishSelectedFlows(selectedFlows: Flow[]) {
globals.selectedFlows = selectedFlows;
globals.publishRedraw();
@@ -123,11 +117,6 @@
globals.publishRedraw();
}
-export function publishQueryResult(args: {id: string; data?: {}}) {
- globals.queryResults.set(args.id, args.data);
- globals.publishRedraw();
-}
-
export function publishThreads(data: ThreadDesc[]) {
globals.threads.clear();
data.forEach((thread) => {