Home
last modified time | relevance | path

Searched refs:CoerceToTs (Results 1 – 7 of 7) sorted by relevance

/external/perfetto/src/trace_processor/importers/json/
Djson_utils_unittest.cc45 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 …]
Djson_tracker_unittest.cc30 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()
Djson_tracker.h47 base::Optional<int64_t> CoerceToTs(const Json::Value& value) { in CoerceToTs() function
48 return json::CoerceToTs(time_unit_, value); in CoerceToTs()
Djson_utils.h44 base::Optional<int64_t> CoerceToTs(TimeUnit unit, const Json::Value& value);
Djson_trace_parser.cc142 JsonTracker::GetOrCreate(context_)->CoerceToTs(value["dur"]); in ParseTracePacket()
Djson_utils.cc49 base::Optional<int64_t> CoerceToTs(TimeUnit unit, const Json::Value& value) { in CoerceToTs() function
Djson_trace_tokenizer.cc574 opt_raw_ts ? json_tracker->CoerceToTs(*opt_raw_ts) : base::nullopt; in ParseInternal()