-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Macro benchmark tests for CT instance creation SDK-3721 #604
base: develop
Are you sure you want to change the base?
Conversation
…creation SDK-3712
…entiate macro benchmarking for different methods of CT instance creation. SDK-3721
…d of reusing sample app. SDK-3721
# Conflicts: # sample/build.gradle # sample/src/main/AndroidManifest.xml
@@ -144,6 +145,7 @@ dependencies { | |||
// When using the BoM, you don't specify versions in Firebase library dependencies | |||
implementation("com.google.firebase:firebase-crashlytics") | |||
implementation("com.google.firebase:firebase-analytics") | |||
implementation libs.profileinstaller |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this dependency?
-dontwarn android.telephony.HwTelephonyManager | ||
-dontwarn com.huawei.android.os.BuildEx$VERSION | ||
-dontwarn com.huawei.android.telephony.ServiceStateEx | ||
-dontwarn com.huawei.hianalytics.process.HiAnalyticsConfig$Builder | ||
-dontwarn com.huawei.hianalytics.process.HiAnalyticsConfig | ||
-dontwarn com.huawei.hianalytics.process.HiAnalyticsInstance$Builder | ||
-dontwarn com.huawei.hianalytics.process.HiAnalyticsInstance | ||
-dontwarn com.huawei.hianalytics.process.HiAnalyticsManager | ||
-dontwarn com.huawei.hianalytics.util.HiAnalyticTools | ||
-dontwarn com.huawei.libcore.io.ExternalStorageFile | ||
-dontwarn com.huawei.libcore.io.ExternalStorageFileInputStream | ||
-dontwarn com.huawei.libcore.io.ExternalStorageFileOutputStream | ||
-dontwarn com.huawei.libcore.io.ExternalStorageRandomAccessFile | ||
-dontwarn com.xiaomi.channel.commonutils.android.Region | ||
-dontwarn com.xiaomi.mipush.sdk.MiPushClient | ||
-dontwarn com.xiaomi.mipush.sdk.MiPushMessage | ||
-dontwarn com.xiaomi.mipush.sdk.PushMessageReceiver | ||
-dontwarn kotlin.jvm.internal.SourceDebugExtension | ||
-dontwarn okhttp3.Call | ||
-dontwarn okhttp3.Callback | ||
-dontwarn okhttp3.OkHttpClient$Builder | ||
-dontwarn okhttp3.OkHttpClient | ||
-dontwarn okhttp3.Request$Builder | ||
-dontwarn okhttp3.Request | ||
-dontwarn okhttp3.Response | ||
-dontwarn org.bouncycastle.crypto.BlockCipher | ||
-dontwarn org.bouncycastle.crypto.engines.AESEngine | ||
-dontwarn org.bouncycastle.crypto.prng.SP800SecureRandom | ||
-dontwarn org.bouncycastle.crypto.prng.SP800SecureRandomBuilder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these part of benchmarking?
setContent { | ||
ClevertapandroidsdkTheme { | ||
// A surface container using the 'background' color from the theme | ||
Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) { | ||
Greeting("Android") | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add correct title and Logo as bare minimum?
android:theme="@style/Theme.Clevertapandroidsdk"> | ||
<profileable | ||
android:shell="true" | ||
tools:targetApi="29" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this have to match with android api which we use?
<meta-data | ||
android:name="CLEVERTAP_ACCOUNT_ID" | ||
android:value="67Z-RRK-696Z" /> | ||
<meta-data | ||
android:name="CLEVERTAP_TOKEN" | ||
android:value="322-1a6" /> | ||
<meta-data | ||
android:name="CLEVERTAP_REGION" | ||
android:value="eu1" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove these secrets?
CleverTapAPI.setDebugLevel(VERBOSE) | ||
|
||
/** | ||
* "bm(benchmark method)" is being passed from macro benchmark tests to tell the Activity which method to benchmark | ||
*/ | ||
when(intent?.extras?.getString("bm") ?: ""){ | ||
"initCT" -> trace("init CT") { | ||
// val measureNanoTime = measureNanoTime { | ||
// cleverTapDefaultInstance = CleverTapAPI.getDefaultInstance(this) | ||
val config = CleverTapInstanceConfig.createInstance(this, "TEST-R78-ZZK-955Z", "TEST-311-ba2") | ||
val cleverTapDefaultInstance = CleverTapAPI.instanceWithConfig(this, config) | ||
// } | ||
// Logger.v("nano time ct init = $measureNanoTime") | ||
} | ||
|
||
"initCTD" -> trace("init CTD") { | ||
// val measureNanoTime = measureNanoTime { | ||
val cleverTapDefaultInstance = CleverTapAPI.getDefaultInstance(this) | ||
// } | ||
// Logger.v("nano time ct init = $measureNanoTime") | ||
} | ||
else -> Log.d("MainActivity","no method specified by benchmark module") | ||
} | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extract in method. Format correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets delete this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments.
Includes following,