/aosp12/frameworks/av/media/libaaudio/tests/ |
H A D | test_histogram.cpp | 42 ASSERT_EQ(0, histogram.getCount()); in TEST() 45 histogram.add(27); in TEST() 46 histogram.add(53); in TEST() 47 histogram.add(171); in TEST() 48 histogram.add(23); in TEST() 59 histogram.add(-5); in TEST() 62 ASSERT_EQ(5, histogram.getCount()); in TEST() 64 histogram.add(200); in TEST() 71 histogram.add(-1); in TEST() 72 histogram.add(kNumBins); in TEST() [all …]
|
/aosp12/hardware/qcom/sdm845/display/libhistogram/ |
H A D | ringbuffer.cpp | 21 nsecs_t histogram::DefaultTimeKeeper::current_time() const { in current_time() 25 histogram::Ringbuffer::Ringbuffer(size_t ringbuffer_size, std::unique_ptr<histogram::TimeKeeper> tk… in Ringbuffer() 32 std::unique_ptr<histogram::Ringbuffer> histogram::Ringbuffer::create( in create() 36 …return std::unique_ptr<histogram::Ringbuffer>(new histogram::Ringbuffer(ringbuffer_size, std::move… in create() 82 histogram::Ringbuffer::Sample histogram::Ringbuffer::collect_cumulative() const { in collect_cumulative() 89 histogram::Ringbuffer::Sample histogram::Ringbuffer::collect_ringbuffer_all() const { in collect_ringbuffer_all() 94 histogram::Ringbuffer::Sample histogram::Ringbuffer::collect_after( in collect_after() 100 histogram::Ringbuffer::Sample histogram::Ringbuffer::collect_max(uint32_t max_frames) const { in collect_max() 105 histogram::Ringbuffer::Sample histogram::Ringbuffer::collect_max_after( in collect_max_after() 111 histogram::Ringbuffer::Sample histogram::Ringbuffer::collect_max( in collect_max() [all …]
|
H A D | histogram_collector.cpp | 281 histogram::HistogramCollector::HistogramCollector() : in HistogramCollector() 282 histogram(histogram::Ringbuffer::create( in HistogramCollector() 286 histogram::HistogramCollector::~HistogramCollector() { in ~HistogramCollector() 305 std::string histogram::HistogramCollector::Dump() const { in Dump() 329 HWC2::Error histogram::HistogramCollector::collect( in collect() 348 std::tie(num_frames, samples) = histogram->collect_cumulative(); in collect() 377 void histogram::HistogramCollector::start() { in start() 381 void histogram::HistogramCollector::start(uint64_t max_frames) { in start() 391 …histogram = histogram::Ringbuffer::create(max_frames, std::make_unique<histogram::DefaultTimeKeepe… in start() 396 void histogram::HistogramCollector::stop() { in stop() [all …]
|
H A D | color_sampling_tool.cpp | 58 histogram::HistogramCollector histogram; in main() local 59 histogram.start(); in main() 75 histogram.stop(); in main() 90 output_file << histogram.Dump(); in main() 93 std::cout << histogram.Dump() << '\n'; in main()
|
H A D | ringbuffer_test.cpp | 36 struct TimeKeeperWrapper : histogram::TimeKeeper { 37 TimeKeeperWrapper(std::shared_ptr<histogram::TimeKeeper> const &tk) : tk(tk) {} in TimeKeeperWrapper() 39 std::shared_ptr<histogram::TimeKeeper> const tk; 42 struct TickingTimeKeeper : histogram::TimeKeeper { 53 void insertFrameIncrementTimeline(histogram::Ringbuffer &rb, TickingTimeKeeper &tk, in insertFrameIncrementTimeline() 72 std::unique_ptr<histogram::Ringbuffer> createFilledRingbuffer( in createFilledRingbuffer() 99 EXPECT_THAT(histogram::Ringbuffer::create(0, std::make_unique<TickingTimeKeeper>()), in TEST_F() 104 EXPECT_THAT(histogram::Ringbuffer::create(10, nullptr), Eq(nullptr)); in TEST_F() 108 auto rb = histogram::Ringbuffer::create(1, std::make_unique<TickingTimeKeeper>()); in TEST_F() 148 auto rb = histogram::Ringbuffer::create(1, std::make_unique<TimeKeeperWrapper>(tk)); in TEST_F() [all …]
|
H A D | histogram_collector.h | 30 namespace histogram { 64 std::unique_ptr<histogram::Ringbuffer> histogram; variable
|
/aosp12/hardware/qcom/sm8150/display/libhistogram/ |
H A D | ringbuffer.cpp | 21 nsecs_t histogram::DefaultTimeKeeper::current_time() const { in current_time() 25 histogram::Ringbuffer::Ringbuffer(size_t ringbuffer_size, std::unique_ptr<histogram::TimeKeeper> tk… in Ringbuffer() 32 std::unique_ptr<histogram::Ringbuffer> histogram::Ringbuffer::create( in create() 36 …return std::unique_ptr<histogram::Ringbuffer>(new histogram::Ringbuffer(ringbuffer_size, std::move… in create() 82 histogram::Ringbuffer::Sample histogram::Ringbuffer::collect_cumulative() const { in collect_cumulative() 89 histogram::Ringbuffer::Sample histogram::Ringbuffer::collect_ringbuffer_all() const { in collect_ringbuffer_all() 94 histogram::Ringbuffer::Sample histogram::Ringbuffer::collect_after( in collect_after() 100 histogram::Ringbuffer::Sample histogram::Ringbuffer::collect_max(uint32_t max_frames) const { in collect_max() 105 histogram::Ringbuffer::Sample histogram::Ringbuffer::collect_max_after( in collect_max_after() 111 histogram::Ringbuffer::Sample histogram::Ringbuffer::collect_max( in collect_max() [all …]
|
H A D | histogram_collector.cpp | 45 histogram::HistogramCollector::HistogramCollector() : in HistogramCollector() 46 histogram(histogram::Ringbuffer::create( in HistogramCollector() 50 histogram::HistogramCollector::~HistogramCollector() { in ~HistogramCollector() 69 std::string histogram::HistogramCollector::Dump() const { in Dump() 93 HWC2::Error histogram::HistogramCollector::collect( in collect() 112 std::tie(num_frames, samples) = histogram->collect_cumulative(); in collect() 141 void histogram::HistogramCollector::start() { in start() 145 void histogram::HistogramCollector::start(uint64_t max_frames) { in start() 152 …histogram = histogram::Ringbuffer::create(max_frames, std::make_unique<histogram::DefaultTimeKeepe… in start() 156 void histogram::HistogramCollector::stop() { in stop() [all …]
|
H A D | color_sampling_tool.cpp | 58 histogram::HistogramCollector histogram; in main() local 59 histogram.start(); in main() 75 histogram.stop(); in main() 90 output_file << histogram.Dump(); in main() 93 std::cout << histogram.Dump() << '\n'; in main()
|
H A D | ringbuffer_test.cpp | 36 struct TimeKeeperWrapper : histogram::TimeKeeper { 37 TimeKeeperWrapper(std::shared_ptr<histogram::TimeKeeper> const &tk) : tk(tk) {} in TimeKeeperWrapper() 39 std::shared_ptr<histogram::TimeKeeper> const tk; 42 struct TickingTimeKeeper : histogram::TimeKeeper { 53 void insertFrameIncrementTimeline(histogram::Ringbuffer &rb, TickingTimeKeeper &tk, in insertFrameIncrementTimeline() 72 std::unique_ptr<histogram::Ringbuffer> createFilledRingbuffer( in createFilledRingbuffer() 99 EXPECT_THAT(histogram::Ringbuffer::create(0, std::make_unique<TickingTimeKeeper>()), in TEST_F() 104 EXPECT_THAT(histogram::Ringbuffer::create(10, nullptr), Eq(nullptr)); in TEST_F() 108 auto rb = histogram::Ringbuffer::create(1, std::make_unique<TickingTimeKeeper>()); in TEST_F() 148 auto rb = histogram::Ringbuffer::create(1, std::make_unique<TimeKeeperWrapper>(tk)); in TEST_F() [all …]
|
H A D | histogram_collector.h | 33 namespace histogram { 78 std::unique_ptr<histogram::Ringbuffer> histogram; variable
|
/aosp12/hardware/qcom/sm7250/display/libhistogram/ |
H A D | ringbuffer.cpp | 24 nsecs_t histogram::DefaultTimeKeeper::current_time() const { in current_time() 28 histogram::Ringbuffer::Ringbuffer(size_t ringbuffer_size, std::unique_ptr<histogram::TimeKeeper> tk) in Ringbuffer() 33 std::unique_ptr<histogram::Ringbuffer> histogram::Ringbuffer::create( in create() 37 return std::unique_ptr<histogram::Ringbuffer>( in create() 93 histogram::Ringbuffer::Sample histogram::Ringbuffer::collect_cumulative() const { in collect_cumulative() 100 histogram::Ringbuffer::Sample histogram::Ringbuffer::collect_ringbuffer_all() const { in collect_ringbuffer_all() 105 histogram::Ringbuffer::Sample histogram::Ringbuffer::collect_after(nsecs_t timestamp) const { in collect_after() 110 histogram::Ringbuffer::Sample histogram::Ringbuffer::collect_max(uint32_t max_frames) const { in collect_max() 115 histogram::Ringbuffer::Sample histogram::Ringbuffer::collect_max_after(nsecs_t timestamp, in collect_max_after() 121 histogram::Ringbuffer::Sample histogram::Ringbuffer::collect_max( in collect_max() [all …]
|
H A D | histogram_collector.cpp | 45 histogram::HistogramCollector::HistogramCollector() in HistogramCollector() 46 : histogram(histogram::Ringbuffer::create(implementation_defined_max_frame_ringbuffer, in HistogramCollector() 49 histogram::HistogramCollector::~HistogramCollector() { in ~HistogramCollector() 69 std::string histogram::HistogramCollector::Dump() const { in Dump() 92 HWC2::Error histogram::HistogramCollector::collect( in collect() 136 void histogram::HistogramCollector::start() { in start() 140 void histogram::HistogramCollector::start(uint64_t max_frames) { in start() 147 histogram = in start() 148 histogram::Ringbuffer::create(max_frames, std::make_unique<histogram::DefaultTimeKeeper>()); in start() 152 void histogram::HistogramCollector::stop() { in stop() [all …]
|
H A D | color_sampling_tool.cpp | 63 histogram::HistogramCollector histogram; in main() local 64 histogram.start(); in main() 80 histogram.stop(); in main() 95 output_file << histogram.Dump(); in main() 98 std::cout << histogram.Dump() << '\n'; in main()
|
H A D | ringbuffer_test.cpp | 36 struct TimeKeeperWrapper : histogram::TimeKeeper { 37 TimeKeeperWrapper(std::shared_ptr<histogram::TimeKeeper> const &tk) : tk(tk) {} in TimeKeeperWrapper() 39 std::shared_ptr<histogram::TimeKeeper> const tk; 42 struct TickingTimeKeeper : histogram::TimeKeeper { 53 void insertFrameIncrementTimeline(histogram::Ringbuffer &rb, TickingTimeKeeper &tk, in insertFrameIncrementTimeline() 72 std::unique_ptr<histogram::Ringbuffer> createFilledRingbuffer( in createFilledRingbuffer() 74 auto rb = histogram::Ringbuffer::create(4, std::make_unique<TimeKeeperWrapper>(tk)); in createFilledRingbuffer() 103 EXPECT_THAT(histogram::Ringbuffer::create(10, nullptr), Eq(nullptr)); in TEST_F() 107 auto rb = histogram::Ringbuffer::create(1, std::make_unique<TickingTimeKeeper>()); in TEST_F() 147 auto rb = histogram::Ringbuffer::create(1, std::make_unique<TimeKeeperWrapper>(tk)); in TEST_F() [all …]
|
H A D | histogram_collector.h | 33 namespace histogram { 75 std::unique_ptr<histogram::Ringbuffer> histogram; variable
|
/aosp12/packages/modules/Wifi/service/java/com/android/server/wifi/util/ |
H A D | MetricsUtils.java | 117 int newValue = histogram.get(key) + 1; in addValueToLogHistogram() 118 histogram.put(key, newValue); in addValueToLogHistogram() 129 GenericBucket[] protoArray = new GenericBucket[histogram.size()]; in logHistogramToGenericBuckets() 130 for (int i = 0; i < histogram.size(); ++i) { in logHistogramToGenericBuckets() 131 int key = histogram.keyAt(i); in logHistogramToGenericBuckets() 136 protoArray[i].count = histogram.valueAt(i); in logHistogramToGenericBuckets() 163 int newValue = histogram.get(bucket) + 1; in addValueToLinearHistogram() 164 histogram.put(bucket, newValue); in addValueToLinearHistogram() 176 for (int i = 0; i < histogram.size(); ++i) { in linearHistogramToGenericBuckets() 177 int bucket = histogram.keyAt(i); in linearHistogramToGenericBuckets() [all …]
|
/aosp12/art/libartbase/base/metrics/ |
H A D | metrics_test.cc | 141 histogram.Add(10); in TEST_F() 144 histogram.Add(20); in TEST_F() 145 histogram.Add(25); in TEST_F() 148 histogram.Add(56); in TEST_F() 149 histogram.Add(57); in TEST_F() 150 histogram.Add(58); in TEST_F() 151 histogram.Add(59); in TEST_F() 154 histogram.Add(70); in TEST_F() 155 histogram.Add(70); in TEST_F() 156 histogram.Add(70); in TEST_F() [all …]
|
/aosp12/system/update_engine/scripts/update_payload/ |
H A D | histogram_unittest.py | 28 from update_payload import histogram 47 self.CompareToExpectedDefault(str(histogram.Histogram( 51 self.CompareToExpectedDefault(str(histogram.Histogram.FromCountDict( 55 self.CompareToExpectedDefault(str(histogram.Histogram.FromKeyList( 63 actual_str = str(histogram.Histogram([('Yes', 5), ('No', 1)], scale=5)) 71 actual_str = str(histogram.Histogram(
|
/aosp12/packages/modules/Wifi/service/java/com/android/server/wifi/rtt/ |
H A D | RttMetrics.java | 292 SparseIntArray histogram) { in consolidateOverallStatus() argument 295 for (int i = 0; i < histogram.size(); i++) { in consolidateOverallStatus() 297 h[i].statusType = histogram.keyAt(i); in consolidateOverallStatus() 298 h[i].count = histogram.valueAt(i); in consolidateOverallStatus() 324 for (int i = 0; i < histogram.size(); i++) { in consolidateIndividualStatus() 326 h[i].statusType = histogram.keyAt(i); in consolidateIndividualStatus() 327 h[i].count = histogram.valueAt(i); in consolidateIndividualStatus() 365 histogram[i].start = genericHistogram[i].start; in genericBucketsToRttBuckets() 366 histogram[i].end = genericHistogram[i].end; in genericBucketsToRttBuckets() 367 histogram[i].count = genericHistogram[i].count; in genericBucketsToRttBuckets() [all …]
|
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/ |
H A D | GestureLauncherServiceTest.java | 290 verify(mMetricsLogger, times(2)).histogram( in testInterceptPowerKeyDown_intervalInBoundsCameraPowerGestureOffInteractive() 297 verify(mMetricsLogger, times(2)).histogram( in testInterceptPowerKeyDown_intervalInBoundsCameraPowerGestureOffInteractive() 335 verify(mMetricsLogger, times(2)).histogram( in testInterceptPowerKeyDown_intervalMidBoundsCameraPowerGestureOffInteractive() 342 verify(mMetricsLogger, times(2)).histogram( in testInterceptPowerKeyDown_intervalMidBoundsCameraPowerGestureOffInteractive() 382 verify(mMetricsLogger, times(2)).histogram( in testInterceptPowerKeyDown_intervalOutOfBoundsCameraPowerGestureOffInteractive() 389 verify(mMetricsLogger, times(2)).histogram( in testInterceptPowerKeyDown_intervalOutOfBoundsCameraPowerGestureOffInteractive() 432 verify(mMetricsLogger, times(2)).histogram( in testInterceptPowerKeyDown_intervalInBoundsCameraPowerGestureOnInteractiveSetupComplete() 439 verify(mMetricsLogger, times(2)).histogram( in testInterceptPowerKeyDown_intervalInBoundsCameraPowerGestureOnInteractiveSetupComplete() 489 verify(mMetricsLogger, times(2)).histogram( in testInterceptPowerKeyDown_fiveInboundPresses_cameraAndEmergencyEnabled_bothLaunch() 496 verify(mMetricsLogger, times(2)).histogram( in testInterceptPowerKeyDown_fiveInboundPresses_cameraAndEmergencyEnabled_bothLaunch() [all …]
|
/aosp12/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/info/ |
H A D | HistogramView.java | 81 private void drawHistogram(Canvas canvas, int[] histogram, int color, PorterDuff.Mode mode) { in drawHistogram() argument 83 for (int i = 0; i < histogram.length; i++) { in drawHistogram() 84 if (histogram[i] > max) { in drawHistogram() 85 max = histogram[i]; in drawHistogram() 91 float wl = w / histogram.length; in drawHistogram() 114 for (int i = 0; i < histogram.length; i++) { in drawHistogram() 116 float l = histogram[i] * wh; in drawHistogram()
|
/aosp12/frameworks/base/services/core/java/com/android/server/pm/ |
H A D | OtaDexoptService.java | 456 metricsLogger.histogram("ota_dexopt_available_space_before_mb", in performMetricsLogging() 458 metricsLogger.histogram("ota_dexopt_available_space_after_bulk_delete_mb", in performMetricsLogging() 460 metricsLogger.histogram("ota_dexopt_available_space_after_dexopt_mb", in performMetricsLogging() 463 metricsLogger.histogram("ota_dexopt_num_important_packages", importantPackageCount); in performMetricsLogging() 464 metricsLogger.histogram("ota_dexopt_num_other_packages", otherPackageCount); in performMetricsLogging() 466 metricsLogger.histogram("ota_dexopt_num_commands", dexoptCommandCountTotal); in performMetricsLogging() 467 metricsLogger.histogram("ota_dexopt_num_commands_executed", dexoptCommandCountExecuted); in performMetricsLogging() 471 metricsLogger.histogram("ota_dexopt_time_s", elapsedTimeSeconds); in performMetricsLogging()
|
/aosp12/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/ |
H A D | KeyboardParams.java | 171 private static int updateHistogramCounter(final SparseIntArray histogram, final int key) { in updateHistogramCounter() argument 172 final int index = histogram.indexOfKey(key); in updateHistogramCounter() 173 final int count = (index >= 0 ? histogram.get(key) : 0) + 1; in updateHistogramCounter() 174 histogram.put(key, count); in updateHistogramCounter()
|
/aosp12/packages/modules/Wifi/service/java/com/android/server/wifi/aware/ |
H A D | WifiAwareMetrics.java | 828 public static void addNanHalStatusToHistogram(int halStatus, SparseIntArray histogram) { in addNanHalStatusToHistogram() argument 830 int newValue = histogram.get(protoStatus) + 1; in addNanHalStatusToHistogram() 831 histogram.put(protoStatus, newValue); in addNanHalStatusToHistogram() 839 SparseIntArray histogram) { in histogramToProtoArray() argument 843 for (int i = 0; i < histogram.size(); ++i) { in histogramToProtoArray() 845 protoArray[i].nanStatusType = histogram.keyAt(i); in histogramToProtoArray() 846 protoArray[i].count = histogram.valueAt(i); in histogramToProtoArray() 919 histogramToNanRequestProtoArray(SparseIntArray histogram) { in histogramToNanRequestProtoArray() argument 923 for (int i = 0; i < histogram.size(); ++i) { in histogramToNanRequestProtoArray() 925 protoArray[i].ndpRequestType = histogram.keyAt(i); in histogramToNanRequestProtoArray() [all …]
|