Rename recordSuccessMetric to reportPlatformFailures
Summary: Change from `recordSuccessMetric` to `reportPlatformFailures`, because the next diff adds `reportPluginFailures` and I want to distinguish the two. Reviewed By: passy Differential Revision: D13878380 fbshipit-source-id: 9c6b8bfe1ed2e1a8bbe5aacbec31d24e9aa39171
This commit is contained in:
committed by
Facebook Github Bot
parent
1101306249
commit
6d50843eed
@@ -15,7 +15,7 @@ import adb from 'adbkit-fb';
|
||||
import {exec, spawn} from 'child_process';
|
||||
import {remote} from 'electron';
|
||||
import path from 'path';
|
||||
import {recordSuccessMetric} from '../utils/metrics';
|
||||
import {reportPlatformFailures} from '../utils/metrics';
|
||||
|
||||
let CAPTURE_LOCATION = remote.app.getPath('desktop');
|
||||
try {
|
||||
@@ -126,7 +126,7 @@ class ScreenCaptureButtons extends Component<Props, State> {
|
||||
const {selectedDevice} = this.props;
|
||||
|
||||
if (selectedDevice instanceof AndroidDevice) {
|
||||
return recordSuccessMetric(
|
||||
return reportPlatformFailures(
|
||||
selectedDevice.adb
|
||||
.screencap(selectedDevice.serial)
|
||||
.then(writePngStreamToFile)
|
||||
@@ -135,7 +135,7 @@ class ScreenCaptureButtons extends Component<Props, State> {
|
||||
).catch(console.error);
|
||||
} else if (selectedDevice instanceof IOSDevice) {
|
||||
const screenshotPath = path.join(CAPTURE_LOCATION, getFileName('png'));
|
||||
return recordSuccessMetric(
|
||||
return reportPlatformFailures(
|
||||
new Promise((resolve, reject) => {
|
||||
exec(
|
||||
`xcrun simctl io booted screenshot "${screenshotPath}"`,
|
||||
|
||||
Reference in New Issue
Block a user