// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.import'package:args/command_runner.dart';import'../framework/cocoon.dart';classUploadMetricsCommandextendsCommand<void>{UploadMetricsCommand(){argParser.addOption('results-file',help:'Test results JSON to upload to Cocoon.');argParser.addOption('service-account-token-file',help:'Authentication token for uploading results.',);}@overrideStringgetname=>'upload-metrics';@overrideStringgetdescription=>'[Flutter infrastructure] Upload metrics data to Cocoon';@overrideFuture<void>run()async{finalStringresultsPath=argResults['results-file']asString;finalStringserviceAccountTokenFile=argResults['service-account-token-file']asString;finalCocooncocoon=Cocoon(serviceAccountTokenPath:serviceAccountTokenFile);returncocoon.sendResultsPath(resultsPath);}}