blob: dfa39226ef96e03c11ffa82000cd39f032e4ae4a [file] [log] [blame]
Jeff Sharkey52f7a912017-09-15 12:57:44 -06001/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_VOLD_BENCHMARK_TASK_H
18#define ANDROID_VOLD_BENCHMARK_TASK_H
19
20#include "android/os/IVoldTaskListener.h"
21#include "Utils.h"
22
23#include <string>
24#include <thread>
25
26namespace android {
27namespace vold {
28
29class BenchmarkTask {
30public:
31 BenchmarkTask(const std::string& path,
32 const android::sp<android::os::IVoldTaskListener>& listener);
33 virtual ~BenchmarkTask();
34
35 void start();
36
37private:
38 std::string mPath;
39 android::sp<android::os::IVoldTaskListener> mListener;
40 std::thread mThread;
41
42 void run();
43
44 DISALLOW_COPY_AND_ASSIGN(BenchmarkTask);
45};
46
47} // namespace vold
48} // namespace android
49
50#endif