2 * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * @file test_results_collector_commons.cpp
18 * @author Lukasz Wrzosek (l.wrzosek@samsung.com)
19 * @author Marcin Niesluchowski (m.niesluchow@samsung.com)
21 * @brief Source file containing definitions of collectors common
25 #include "dpl/test/test_results_collector_commons.h"
30 double get_milliseconds (const std::chrono::system_clock::duration& performanceTime)
32 return (static_cast<double>(std::chrono::duration_cast<std::chrono::microseconds>
33 (performanceTime).count()))/1000.0;
36 bool ParseCollectorFileArg(const std::string &arg, std::string &filename)
38 const std::string argname = "--file=";
39 if (arg.find(argname) == 0 ) {
40 filename = arg.substr(argname.size());