Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc7a04b8 authored by Stefan Lafon's avatar Stefan Lafon
Browse files

Create statsd loadtest app.

That app automatically sends a bunch of events to logd.
The frequency is adjustable.

Test: Ran statsd.

Change-Id: I7a88c140e39d22549cc76ef68059d292e85a8a24
parent 304494b6
Loading
Loading
Loading
Loading
+35 −0
Original line number Diff line number Diff line
# Copyright (C) 2017 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_SRC_FILES += ../../src/stats_log.proto \
                   ../../src/atoms_copy.proto \
                   ../../src/statsd_config.proto

LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/../../src/

LOCAL_PROTOC_OPTIMIZE_TYPE := lite-static

LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res

LOCAL_PACKAGE_NAME := StatsdLoadtest
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
LOCAL_DEX_PREOPT := false
include $(BUILD_PACKAGE)
+43 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2007, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
**     http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.statsd.loadtest"
    android:sharedUserId="android.uid.system"
    android:versionCode="1"
    android:versionName="1.0" >

  <uses-permission android:name="android.permission.DUMP" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  <application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name" >
    <activity
        android:name=".LoadtestActivity"
        android:label="@string/app_name"
        android:launchMode="singleTop" >
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
    </activity>
    <receiver android:name=".LoadtestActivity$PusherAlarmReceiver" />
    <receiver android:name=".LoadtestActivity$StopperAlarmReceiver"/>
  </application>
</manifest>
+7.6 KiB
Loading image diff...
+3.67 KiB
Loading image diff...
+12.1 KiB
Loading image diff...
Loading