Searched refs:CoerceToTs (Results 1 – 7 of 7) sorted by relevance
/external/perfetto/src/trace_processor/importers/json/ |
D | json_utils_unittest.cc | 45 TEST(JsonTraceUtilsTest, CoerceToTs) { in TEST() argument 46 ASSERT_EQ(CoerceToTs(TimeUnit::kUs, Json::Value(42)).value_or(-1), 42000); in TEST() 47 ASSERT_EQ(CoerceToTs(TimeUnit::kUs, Json::Value("42")).value_or(-1), 42000); in TEST() 48 ASSERT_EQ(CoerceToTs(TimeUnit::kUs, Json::Value(42.1)).value_or(-1), 42100); in TEST() 49 ASSERT_EQ(CoerceToTs(TimeUnit::kUs, Json::Value("42.1")).value_or(-1), 42100); in TEST() 50 ASSERT_EQ(CoerceToTs(TimeUnit::kUs, Json::Value(".42")).value_or(-1), 420); in TEST() 51 ASSERT_EQ(CoerceToTs(TimeUnit::kUs, Json::Value("42.")).value_or(-1), 42000); in TEST() 52 ASSERT_EQ(CoerceToTs(TimeUnit::kUs, Json::Value("42.0")).value_or(-1), 42000); in TEST() 53 ASSERT_EQ(CoerceToTs(TimeUnit::kUs, Json::Value("0.2")).value_or(-1), 200); in TEST() 54 ASSERT_EQ(CoerceToTs(TimeUnit::kUs, Json::Value("0.2e-1")).value_or(-1), 20); in TEST() [all …]
|
D | json_tracker_unittest.cc | 30 ASSERT_EQ(tracker.CoerceToTs(Json::Value(42)).value_or(-1), 42); in TEST() 35 ASSERT_EQ(tracker.CoerceToTs(Json::Value(42)).value_or(-1), 42000); in TEST()
|
D | json_tracker.h | 47 base::Optional<int64_t> CoerceToTs(const Json::Value& value) { in CoerceToTs() function 48 return json::CoerceToTs(time_unit_, value); in CoerceToTs()
|
D | json_utils.h | 44 base::Optional<int64_t> CoerceToTs(TimeUnit unit, const Json::Value& value);
|
D | json_trace_parser.cc | 142 JsonTracker::GetOrCreate(context_)->CoerceToTs(value["dur"]); in ParseTracePacket()
|
D | json_utils.cc | 49 base::Optional<int64_t> CoerceToTs(TimeUnit unit, const Json::Value& value) { in CoerceToTs() function
|
D | json_trace_tokenizer.cc | 574 opt_raw_ts ? json_tracker->CoerceToTs(*opt_raw_ts) : base::nullopt; in ParseInternal()
|