Saturday, October 21, 2023

The "Bottleneck" in a Test Engineer's Eyes

 

Preference to Bottle Over Jar! Why?


Have you heard Jar Neck anytime when describing a problem or solution?

  • I have heard Bottleneck often and consistently; but, not Jar Neck .  Why? 
  • Be it in Software Engineering or day-to-day life problem solving description,
    • The Bottleneck is referenced and not a Jar Neck.

Looks like people want Bottle but not the Bottleneck speed and benefits.  Bottle without its neck is a jar?!



Bottleneck exist for better controllability
.

  • In a bottle, the bottleneck is a solution!  It is not a problem!
    • It is to mitigate any risk and problem that arises from the flow of content in the bottle.

Yet we describe, learn and communicate the neck of a bottle as a relativity and analogy to a problem.  


Are you aware of Gateway in the software system?

  • The Gateway can be seen as a neck of a bottle which controls the incoming requests and outgoing response.
  • Gateway is a necessity.
    • We need Gateway to be adaptable in size of its neck based on traffic volume it is handling.  Here, the gateway's neck size should adapt and scale contextually.
      • When describing a problem, we are talking about how this bottleneck size which is not adaptable for the context.
      • That adaptability has to be built in engineering to scale in any dimensions and magnitude.
        • When this is not done, we equate the software system's problem to a bottleneck as a analogy, which is incorrect!  The bottle has got its size and its neck size fixed for a purpose and as a solution.
          • The context of a bottle and today's any systems are different.
            • It is good to draw similarities from General Systems Thinking and observations.
            • But the solution cannot be generic to all systems; it has to be contextual.  The software system has to have its contextual solution.


So, next time when someone in your team or network talk about bottleneck, do share them bottleneck is for better controllability.  Having a contextually resizable and adaptable bottleneck is the need for Software Engineering; not the elimination of bottleneck.

In fact, a software system should have and will have a bottleneck in a point.  And, this bottleneck will be adaptable to the context for having what it should let through and process.

Is the runway of an airport a bottleneck when it is compared to a sky?  Is that a solution or a problem?  Likewise, the ship will have a defined route path and it does not sail without a route path.  Is this a bottleneck to ship and its business?  A elevator can accommodate the defined number of people or kilograms allowed, and not beyond that to move.  Is that a bottleneck?  The esophagus in human body has a size which medical science observes as normal and acceptable; any deviation from that size measurement, the medical science test investigates it as a risk and problem. Why?  Is the circumference size and length of esophagus a bottleneck to human anatomy and physiology system?

The engineering solution will and should have a bottleneck at a point.  Having a adaptable bottleneck to the context is one what tries to accomplish in a software system's scalability and operability.


Please, do not equate solving a "bottleneck" situation with Agile practice.  Does it look like a joke?  I will not be surprised if someone says bottleneck problem is solved if practiced Agile.


The Internal Metrics of High Performance Mobile App

 

Do you have a question -- What are KPIs and Metrics and the differences between them?  Then read this blog post.  It will help in knowing the differences and how each help the other mutually and remain exclusive.

The sixth question from season two of 100 Days of Skilled Testing is:

How do you determine the essential performance metrics and Key Performance Indicators (KPIs) when assessing the performance of a mobile native app?


Why I Focus on Metrics Here?

Here, in this blog post, I will focus on Metrics and not KPIs.  If you have read the above referenced blog post on KPIs and Metrics, you will learn,

  • The KPIs are defined objectives by the business.
    • Knowing this is important.
    • But, to accomplish the KPIs objective, one has to extract the contextually suitable metric from the system and have to evaluate it.

As a test engineer, I evaluate from technical perspective with an orientation of business thoughts.

  • So, the identifying and defining the metrics makes more sense to my role.
    • Hence, I pick the Metrics.

A KPI example for a mobile app,

  • The set percentage [what percentage?] of five start rating in store with positive emotions in a review.

What may be the KPIs, I will have to correlate it with [a] metrics so that we work towards accomplishing the KPIs set.



What is Performance to Mobile Native App?


The Native App

A native mobile app is an app developed for a particular mobile device or platform like Android and iOS.  The native apps developed for one platform cannot be run on another platform.  That is, Android app cannot run on iPhone, and vice versa.

The Android apps are written in Kotlin, today.  The iOS apps are written in Swift.  The native apps can be developed in a way that it can run both in offline and online mode based on its business objectives.

An example of the native app which we can easily understand is,

  • WhatsApp for Android and iOS devices


Performance and Native App

For first, my mobile device is not my customers device.  The Android device fragmentation makes it much more challenge with computing power offered for devices by OEMs.

Though, iOS have its fragmentation on OS version and device's computing power, it is not huge when compared with fragmentation of Android devices.  This is a challenge for Android mobile app in all aspects and especially in performance.

The performance will indicate different advantage, risks and problems to a native app on a platform and its devices.  The performance can be classified into different areas for native mobile apps.

It can range from, being deep technical areas to the experience a user expresses in using the app in a given context.  Everything is performance here!

Hence it is not easy when talking about performance in the mobile's app space.  While it is so ambiguous and hard subject, how one can pull the metrics for the performance here?

From a technical perspective, the word "performance" is not specific; it is vague.  If one says, the mobile app is performing well, what does it mean?

  • Is it fast?
  • Is it consuming low battery power?
  • Is it consuming less memory?
  • Is it not consuming much network?
  • Is it smooth to interact, responsive, and no jank experience?
  • Is it intuitive and secure?
  • Is it number of crashes?
  • Is it having a consistent update and bug fixes?

What you say?

All these leads to a question - What is a high performance app?  You ask this question to yourself and to your tech team, business team and consumers.  Figure out what is a high performance app to them.  This helps!


The Common Metrics - Android and iOS


Below are some of the common metrics for which a Test Engineer extracts data and evaluate it via testing and automation.

  1. App Install Time
  2. App Launch Time
    1. Cold Start
    2. Warm Start
    3. Hot Start
  3. Private Memory Size of App on available Heap
  4. Number of Views
  5. Garbage Collection - Frequency
  6. Data Residual Size and Sharing
  7. Network Payload Size
  8. Energy Consumption in Workflows
  9. Wakelocks and its Impact
  10. Frames Skipped
  11. Open Threads and Processes
  12. Storage & Data Size
  13. App Size

And, more.  Each of these are own deep area for analysis and tuning the performance.

I have been practicing this for last 11 years in my testing.  It is one of my research areas in Software Testing & Engineering

These days, instrumentation also offers different metrics for the mobile apps which can correlate with the KPIs set for the native mobile apps.



To conclude, start understanding the internals of Android and iOS.  It opens up you to the performance and practice of high performance apps.

I'm happy to share if you are interested in practicing these subjects and testing.  Let us connect and converse!