Lines Matching refs:samples1
69 PersistentSampleMap samples1(1, allocator1.get(), &meta1); in TEST() local
70 samples1.Accumulate(1, 100); in TEST()
71 samples1.Accumulate(2, 100); in TEST()
72 samples1.Accumulate(3, 100); in TEST()
82 samples1.Add(samples2); in TEST()
83 EXPECT_EQ(300, samples1.GetCount(1)); in TEST()
84 EXPECT_EQ(300, samples1.GetCount(2)); in TEST()
85 EXPECT_EQ(100, samples1.GetCount(3)); in TEST()
86 EXPECT_EQ(200, samples1.GetCount(4)); in TEST()
87 EXPECT_EQ(2000, samples1.sum()); in TEST()
88 EXPECT_EQ(900, samples1.TotalCount()); in TEST()
89 EXPECT_EQ(samples1.redundant_count(), samples1.TotalCount()); in TEST()
91 samples1.Subtract(samples2); in TEST()
92 EXPECT_EQ(100, samples1.GetCount(1)); in TEST()
93 EXPECT_EQ(100, samples1.GetCount(2)); in TEST()
94 EXPECT_EQ(100, samples1.GetCount(3)); in TEST()
95 EXPECT_EQ(0, samples1.GetCount(4)); in TEST()
96 EXPECT_EQ(600, samples1.sum()); in TEST()
97 EXPECT_EQ(300, samples1.TotalCount()); in TEST()
98 EXPECT_EQ(samples1.redundant_count(), samples1.TotalCount()); in TEST()
105 PersistentSampleMap samples1(12, allocator1.get(), &meta12); in TEST() local
106 samples1.Accumulate(1, 100); in TEST()
107 samples1.Accumulate(2, 200); in TEST()
108 samples1.Accumulate(1, -200); in TEST()
109 samples1.Accumulate(-1, 1); in TEST()
110 EXPECT_EQ(-100, samples1.GetCount(1)); in TEST()
111 EXPECT_EQ(200, samples1.GetCount(2)); in TEST()
112 EXPECT_EQ(1, samples1.GetCount(-1)); in TEST()
113 EXPECT_EQ(299, samples1.sum()); in TEST()
114 EXPECT_EQ(101, samples1.TotalCount()); in TEST()
115 EXPECT_EQ(samples1.redundant_count(), samples1.TotalCount()); in TEST()
120 EXPECT_EQ(samples1.id(), samples2.id()); in TEST()
121 EXPECT_EQ(samples1.sum(), samples2.sum()); in TEST()
122 EXPECT_EQ(samples1.redundant_count(), samples2.redundant_count()); in TEST()
123 EXPECT_EQ(samples1.TotalCount(), samples2.TotalCount()); in TEST()
131 samples1.Accumulate(-1, -1); in TEST()
133 EXPECT_EQ(0, samples1.GetCount(3)); in TEST()
136 EXPECT_EQ(300, samples1.GetCount(3)); in TEST()
137 EXPECT_EQ(samples1.sum(), samples2.sum()); in TEST()
138 EXPECT_EQ(samples1.redundant_count(), samples2.redundant_count()); in TEST()
139 EXPECT_EQ(samples1.TotalCount(), samples2.TotalCount()); in TEST()
142 EXPECT_EQ(0, samples1.GetCount(4)); in TEST()
143 samples1.Accumulate(4, 400); in TEST()
145 EXPECT_EQ(400, samples1.GetCount(4)); in TEST()
148 EXPECT_EQ(4400, samples1.GetCount(4)); in TEST()
149 EXPECT_EQ(samples1.sum(), samples2.sum()); in TEST()
150 EXPECT_EQ(samples1.redundant_count(), samples2.redundant_count()); in TEST()
151 EXPECT_EQ(samples1.TotalCount(), samples2.TotalCount()); in TEST()
196 PersistentSampleMap samples1(1, allocator1.get(), &meta1); in TEST() local
197 samples1.Accumulate(5, 1); in TEST()
198 samples1.Accumulate(10, 2); in TEST()
199 samples1.Accumulate(15, 3); in TEST()
200 samples1.Accumulate(20, 4); in TEST()
201 samples1.Accumulate(25, 5); in TEST()
211 samples1.Subtract(samples2); in TEST()
213 std::unique_ptr<SampleCountIterator> it = samples1.Iterator(); in TEST()