বেঞ্চমার্ক

অ্যান্ড্রয়েড স্টুডিওর মধ্যেই আপনার কোডের পারফরম্যান্স নির্ভুলভাবে পরিমাপ করুন।
সর্বশেষ আপডেট স্থিতিশীল রিলিজ রিলিজ প্রার্থী বিটা রিলিজ আলফা রিলিজ
২৫ মার্চ, ২০২৬ ১.৪.১ - - ১.৫.০-আলফা০৫

নির্ভরতা ঘোষণা করা

Benchmark-এর উপর নির্ভরতা যোগ করতে হলে, আপনাকে আপনার প্রজেক্টে Google Maven রিপোজিটরি যোগ করতে হবে। আরও তথ্যের জন্য Google-এর Maven রিপোজিটরি পড়ুন।

ম্যাক্রোবেঞ্চমার্ক

আপনার প্রোজেক্টে ম্যাক্রোবেঞ্চমার্ক ব্যবহার করতে, আপনার ম্যাক্রোবেঞ্চমার্ক মডিউলের জন্য build.gradle ফাইলে নিম্নলিখিত ডিপেন্ডেন্সিগুলো যোগ করুন:

গ্রোভি

dependencies {
  androidTestImplementation "androidx.benchmark:benchmark-macro-junit4:1.4.1"
}

কোটলিন

dependencies {
  androidTestImplementation("androidx.benchmark:benchmark-macro-junit4:1.4.1")
}

মাইক্রোবেঞ্চমার্ক

আপনার প্রোজেক্টে মাইক্রোবেঞ্চমার্ক ব্যবহার করতে, আপনার মাইক্রোবেঞ্চমার্ক মডিউলের জন্য build.gradle ফাইলে নিম্নলিখিত ডিপেন্ডেন্সিগুলো যোগ করুন:

গ্রোভি

dependencies {
    androidTestImplementation "androidx.benchmark:benchmark-junit4:1.4.1"
}

android {
    ...
    defaultConfig {
        ...
        testInstrumentationRunner "androidx.benchmark.junit4.AndroidBenchmarkRunner"
    }
}

কোটলিন

dependencies {
    androidTestImplementation("androidx.benchmark:benchmark-junit4:1.4.1")
}

android {
    ...
    defaultConfig {
        ...
        testInstrumentationRunner = "androidx.benchmark.junit4.AndroidBenchmarkRunner"
    }
}

মাইক্রোবেঞ্চমার্ক লাইব্রেরি আপনার মাইক্রোবেঞ্চমার্ক মডিউলের সাথে ব্যবহার করার জন্য একটি গ্রেডল প্লাগইনও প্রদান করে। এই প্লাগইনটি মডিউলের জন্য বিল্ড কনফিগারেশন ডিফল্ট সেট করে, হোস্টে বেঞ্চমার্ক আউটপুট কপি সেট আপ করে এবং ./gradlew lockClocks টাস্ক প্রদান করে।

প্লাগইন ব্যবহার করতে, আপনার শীর্ষ-স্তরের build.gradle ফাইলে `plugins` ব্লকে নিম্নলিখিত লাইনটি অন্তর্ভুক্ত করুন:

গ্রোভি

plugins {
  id 'androidx.benchmark' version '1.4.1' apply false
}

কোটলিন

plugins {
  id("androidx.benchmark") version "1.4.1" apply false
}

তারপর প্লাগইনটি আপনার বেঞ্চমার্ক মডিউলের build.gradle ফাইলে প্রয়োগ করুন

গ্রোভি

plugins {
  id 'androidx.benchmark'
}

কোটলিন

plugins {
    id("androidx.benchmark")
}

প্রতিক্রিয়া

আপনার মতামত জেটপ্যাককে আরও উন্নত করতে সাহায্য করে। আপনি যদি নতুন কোনো সমস্যা খুঁজে পান অথবা এই লাইব্রেরিটি উন্নত করার জন্য কোনো ধারণা থাকে, তবে আমাদের জানান। নতুন কোনো সমস্যা তৈরি করার আগে অনুগ্রহ করে এই লাইব্রেরির বিদ্যমান সমস্যাগুলো দেখে নিন। আপনি তারকা বোতামে ক্লিক করে কোনো বিদ্যমান সমস্যায় আপনার ভোট যোগ করতে পারেন।

একটি নতুন সমস্যা তৈরি করুন

আরও তথ্যের জন্য ইস্যু ট্র্যাকার ডকুমেন্টেশন দেখুন।

সংস্করণ ১.৫

সংস্করণ 1.5.0-alpha05

২৫ মার্চ, ২০২৬

androidx.benchmark:benchmark-*:1.5.0-alpha05 প্রকাশিত হয়েছে। সংস্করণ 1.5.0-alpha05-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

বাগ সংশোধন

  • শীর্ষ-স্তরের প্যাকেজগুলিকেও অন্তর্ভুক্ত করার জন্য ArtMetric আপডেট করা হয়েছে, যা বিশেষত AGP/R8 9.1+ অথবা -repackageclasses গ্লোবাল অপশন ব্যবহার করার সময় গুরুত্বপূর্ণ। পূর্বে, ArtMetric তার artClassLoad... পরিমাপে এই ক্লাসলোডগুলি সনাক্ত করতে ব্যর্থ হতো। ( If8a35 , b/487402058 )

নতুন ফিচার - androidx.benchmark.requireLockedClocks নামে একটি নতুন ইন্সট্রুমেন্টেশন আর্গুমেন্ট যোগ করা হয়েছে, যা রুটেড ডিভাইসের ক্ষেত্রে সিপিইউ ক্লক লক করা আছে কিনা তা যাচাই করার সুবিধা দেয়। ( Id82e8 , b/468039042 )

সংস্করণ 1.5.0-alpha04

১১ মার্চ, ২০২৬

androidx.benchmark:benchmark-*:1.5.0-alpha04 প্রকাশিত হয়েছে। সংস্করণ 1.5.0-alpha04-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

এপিআই পরিবর্তন

  • PowerMetric.Energy এবং PowerMetric.PowerJvmOverloads যোগ করা হয়েছে ( Iac0d0 , b/481371562 )।

বাগ সংশোধন

  • শীর্ষ-স্তরের প্যাকেজগুলিকেও অন্তর্ভুক্ত করার জন্য ArtMetric আপডেট করা হয়েছে, যা বিশেষত AGP/R8 9.1+ অথবা -repackageclasses গ্লোবাল অপশন ব্যবহার করার সময় গুরুত্বপূর্ণ। পূর্বে, ArtMetric তার artClassLoad... পরিমাপে এই ক্লাসলোডগুলি সনাক্ত করতে ব্যর্থ হতো। ( I207ca , b/487402058 )

সংস্করণ 1.5.0-alpha03

১১ ফেব্রুয়ারী, ২০২৬

androidx.benchmark:benchmark-*:1.5.0-alpha03 প্রকাশিত হয়েছে। সংস্করণ 1.5.0-alpha03-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

  • UiAutomator 2.4 বিটা-এর উপর নির্ভরশীল করার জন্য আপডেট করা হয়েছে।

সংস্করণ 1.5.0-alpha02

২৮ জানুয়ারী, ২০২৬

androidx.benchmark:benchmark-*:1.5.0-alpha02 প্রকাশিত হয়েছে। সংস্করণ 1.5.0-alpha02-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

বাগ সংশোধন

  • কোটলিন মাল্টি-প্ল্যাটফর্ম মডিউলগুলির জন্য বেসলাইন প্রোফাইল তৈরির আংশিক সমর্থন যোগ করা হয়েছে। সাধারণত, প্রোফাইলের উপর নির্ভরতাগুলি `dependencies` ব্লকের মধ্যে ` baselineProfile গ্রেডল কনফিগারেশন ব্যবহার করে সংজ্ঞায়িত করা যায়, কিন্তু এটি বর্তমানে KMP মডিউলগুলির জন্য কাজ করে না।

    kotlin {
      androidLibrary {
        namespace = "com.example.namespace"
        compileSdk = 36
      }
      sourceSets {
        androidMain.dependencies {
          // THIS DOES NOT WORK
          // baselineProfile(":yourProducerProject")
        }
      }
    }
    
  • এর পরিবর্তে আপনার baselineProfile এক্সটেনশন ব্যবহার করে আপনার নির্ভরতাগুলি সংজ্ঞায়িত করা উচিত। ( Ie19c4 )

    plugins {
        id("org.jetbrains.kotlin.multiplatform")
        id("com.android.kotlin.multiplatform.library")
        id("androidx.baselineprofile.consumer")
    }
    
    kotlin {
      androidLibrary {
        namespace = "com.example.namespace"
        compileSdk = 36
      }
      sourceSets {
        androidMain.dependencies {
          // ...
        }
      }
    }
    // Define dependencies
    // This works !
    baselineProfile {
      variants {
        androidMain {
          from(project(":yourProducerProject"))
        }
      }
    }
    

সংস্করণ 1.5.0-alpha01

১৭ ডিসেম্বর, ২০২৫

androidx.benchmark:benchmark-*:1.5.0-alpha01 প্রকাশিত হয়েছে। সংস্করণ 1.5.0-alpha01-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

  • Macrobenchmark 1.5 পরিমাপকৃত অ্যাপ্লিকেশনের সাথে মিথস্ক্রিয়া সহজ করার জন্য UiAutomator 2.4 ব্যবহার করে। MacrobenchmarkScope অবজেক্টটি এখন UiAutomatorTestScope-কে এক্সটেন্ড করে, যা আপনাকে onElement { ... }.click() -এর মতো আধুনিক UiAutomator API-গুলো ব্যবহার করার সুযোগ দেয়।
  • UiAutomator 2.4 সম্পর্কে আরও তথ্যের জন্য, ডকুমেন্টেশন দেখুন।

নতুন বৈশিষ্ট্য

  • AGP 9.0-এ বেসলাইন প্রোফাইল গ্রেডল প্লাগইনের জন্য এখন আর newDsl=false প্রয়োজন নেই ( Iaaac7 , b/443311090 )
  • বেঞ্চমার্ক দ্বারা ক্যাপচার করা সিস্টেম/পারফেটটো ট্রেসে কোরের আকার (যেমন লিটল/বিগ) অন্তর্ভুক্ত করার জন্য ট্রেস কনফিগারেশন প্রসারিত করুন। ( I8e397 , b/457469959 )

এপিআই পরিবর্তন

  • (UiAutomator-এ) startActivity অপেক্ষার সময় পরিবর্তন করে নতুন উইন্ডোর জন্য অপেক্ষা করার ব্যবস্থা করা হয়েছে। ( I35da6 , b/440021797 )
  • androidx.benchmark-এ BlackHole API-সমূহ স্থিতিশীল করা হয়েছে। ( I2b67e , b/451749438 )
  • PerfettoTraceRule এর সুবিধাজনক কনস্ট্রাক্টরের জন্য @JvmOverloads যোগ করুন। ( I1510a , b/443763207 )

সংস্করণ ১.৪

সংস্করণ ১.৪.১

১০ সেপ্টেম্বর, ২০২৫

androidx.benchmark:benchmark-*:1.4.1 প্রকাশিত হয়েছে। সংস্করণ 1.4.1-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

বাগ সংশোধন

  • perfettoSdkTracing=true (যেমন একটি মাইক্রোবেঞ্চমার্কে Compose ট্রেস করার সময়) নির্দিষ্ট করা হলে, এটি টার্গেট প্রসেসটিকে বন্ধ করে দিত যদি সেটি আগে থেকেই চালু থাকত এবং কোনো `StartupMode` নির্দিষ্ট করা না থাকত। ( Ib2c1f )

সংস্করণ ১.৪.০

৩০ জুলাই, ২০২৫

androidx.benchmark:benchmark-*:1.4.0 প্রকাশিত হয়েছে। সংস্করণ 1.4.0-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

১.৩.০ সংস্করণ থেকে গুরুত্বপূর্ণ পরিবর্তনসমূহ

মাইক্রোবেঞ্চমার্ক

  • Gradle প্রোজেক্টের আইসোলেশন বজায় রাখার জন্য, lockClocks এবং unlockClocks টাস্ক দুটিকে টপ লেভেলের পরিবর্তে বেঞ্চমার্ক প্রোজেক্টে স্থানান্তর করা হয়েছে।
  • BenchmarkRule কো-রুটিনের উপর ভিত্তি করে রিফ্যাক্টর করা হয়েছে এবং এটি yield() উন্নততর আচরণ সমর্থন করে। এর ফলে বেঞ্চমার্ক রান চলাকালীন, বিশেষ করে দীর্ঘ CI রানের সময়, ANR-এর ঝুঁকি উল্লেখযোগ্যভাবে হ্রাস পাবে। দ্রষ্টব্য: UI বেঞ্চমার্কগুলো measureRepeatedOnMainThread সাথে রান করা উচিত।

ম্যাক্রোবেঞ্চমার্ক

  • API 34+ সংস্করণে একটি সমাধান যোগ করা হয়েছে, কারণ প্রথমবার চালু করার পর ART-এর verify এখন অ্যাপগুলোকে আংশিকভাবে কম্পাইল করার ফলে CompilationMode.None() ব্যবহারে পারফরম্যান্স অসামঞ্জস্যপূর্ণ হতো।
  • পরীক্ষামূলক বৈশিষ্ট্য - MacrobenchmarkRule(..., experimentalConfig = ExperimentalConfig(StartupInsightsConfig(isEnabled = true))) পাস করার মাধ্যমে স্টার্টআপ ইনসাইটস একটি স্টার্টআপ ম্যাক্রোবেঞ্চমার্কের কিছু সাধারণ সমস্যা তুলে ধরতে পারে।
  • ArtMetric যোগ করা হয়েছে, যা JIT কম্পাইলেশন এবং অপটিমাইজ না করা ক্লাস লোডিং শনাক্ত করতে ব্যবহার করা যায় — এই দুটিই বেসলাইন প্রোফাইল অপটিমাইজেশন যাচাই করার জন্য উপযোগী।

বেসলাইন প্রোফাইল

  • BaselineProfileRule এখন মাল্টি-প্রসেস অ্যাপগুলোর জন্য প্রোফাইল সংগ্রহ করে।

অন্যান্য পরিবর্তন

  • TraceProcessor-কে নিজস্ব লাইব্রেরিতে ( androidx.benchmark:benchmark-traceprocessor ) আলাদা করা হয়েছে, যাতে এটি Macrobenchmark মেট্রিক্সের বাইরে অন্যান্য ক্ষেত্রেও ব্যবহার করা যায়। এছাড়াও, আপনার নিজস্ব ServerLifecycleManager সংজ্ঞায়িত করে এটিকে ডেস্কটপ JVM-এও চালানো যেতে পারে।

সংস্করণ 1.4.0-rc01

১৮ জুন, ২০২৫

androidx.benchmark:benchmark-*:1.4.0-rc01 প্রকাশিত হয়েছে। সংস্করণ 1.4.0-rc01-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

বাগ সংশোধন

  • প্রথম ইটারেশনের পর রানটাইম ইমেজের কারণে CompilationMode.None() সবচেয়ে খারাপ পারফরম্যান্স পরিমাপ করতে না পারার সমস্যার জন্য একটি ওয়ার্কঅ্যারাউন্ড যোগ করা হয়েছে। দুর্ভাগ্যবশত, এই ওয়ার্কঅ্যারাউন্ডটির জন্য প্রতিটি ম্যাক্রোবেঞ্চমার্ক স্যুটের ( I4a4f1 ) শুরুতে রানটাইম ইমেজটিকে ইচ্ছাকৃতভাবে নষ্ট করার জন্য ৫ সেকেন্ডের একটি বিলম্বের প্রয়োজন হয়।

সংস্করণ 1.4.0-beta02

৪ জুন, ২০২৫

androidx.benchmark:benchmark-*:1.4.0-beta02 প্রকাশিত হয়েছে। সংস্করণ 1.4.0-beta02-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

এপিআই পরিবর্তন

  • জাভা ডেভেলপারদের জন্য BaselineProfileRule.collectWithResults() কল করা সহজ করতে BaselineProfileConfig.Builder যোগ করা হয়েছে। ( I94905 )

সংস্করণ 1.4.0-beta01

৭ মে, ২০২৫

androidx.benchmark:benchmark-*:1.4.0-beta01 প্রকাশিত হয়েছে। সংস্করণ 1.4.0-beta01-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

এপিআই পরিবর্তন

  • PerfettoTraceRule কনস্ট্রাক্টরের একটি নতুন ভ্যারিয়েন্ট যোগ করা হয়েছে যা একটি PerfettoConfig ( Ie53ba ) গ্রহণ করে।

বাগ সংশোধন

  • সঠিক প্লাগইন ব্যবহার করতে এবং আরও স্পষ্ট ডিলিমিটার যোগ করতে TraceProcessor স্টার্টআপ ইনসাইট লিঙ্ক ফরম্যাট আপডেট করা হয়েছে ( : %3A এর চেয়ে ছোট, এবং উভয়ই সমর্থিত) ( Ie18ef )
  • প্রসেস বন্ধ করার জন্য সর্বদা ফোর্স-স্টপ ব্যবহার করুন, এমনকি রুটেড অবস্থায় সিস্টেম অ্যাপ বন্ধ করলেও। এটি এই ধরনের এক্সেপশন ঠিক করে: Expected no stdout/stderr from killall ... No such process . ( Idca2c )

বাহ্যিক অবদান

  • TraceProcessorHttpServer ( I480f5 ) এর জন্য প্রক্সি এক্সেপশন হ্যান্ডলার যোগ করা হয়েছে

সংস্করণ ১.৪.০-আলফা১১

৯ এপ্রিল, ২০২৫

androidx.benchmark:benchmark-*:1.4.0-alpha11 প্রকাশিত হয়েছে। সংস্করণ 1.4.0-alpha11-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

এপিআই পরিবর্তন

  • জাভা কলারের ব্যবহারের সুবিধার জন্য TraceProcessor এর আর্গুমেন্ট timeout: Duration-কে timeoutMs-এ পরিবর্তন করা হয়েছে। ( I9fbb5 )
  • TraceProcessor কনস্ট্রাক্টরকে অভ্যন্তরীণ হিসেবে চিহ্নিত করুন। কলারদের TraceProcessor.startServer অথবা TraceProcessor.runServer ব্যবহার করা উচিত। ( Ia8c5b )

বাগ সংশোধন

  • MacrobenchmarkScope.killProcess ব্যবহার করে অ্যাপ্লিকেশনটি বন্ধ করার সময়, নীরব ব্যর্থতা এবং টাইমআউট ত্রুটি রোধ করতে কিল কমান্ডের ফলাফল যাচাই করুন। ( I84555 )

নির্ভরতা আপডেট

  • এই লাইব্রেরিটি এখন কোটলিন ২.০ ল্যাঙ্গুয়েজ লেভেলকে টার্গেট করে এবং এর জন্য কেজিপি ২.০.০ বা তার নতুন সংস্করণ প্রয়োজন। ( Idb6b5 )

সংস্করণ ১.৪.০-আলফা১০

২৬ মার্চ, ২০২৫

androidx.benchmark:benchmark-*:1.4.0-alpha10 প্রকাশিত হয়েছে। সংস্করণ 1.4.0-alpha10-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

এপিআই পরিবর্তন

  • TraceProcessor সার্ভার লোড এবং কোয়েরিং-এর জন্য ডিফল্ট টাইমআউট পূর্বেকার ৬০/৩০ সেকেন্ড থেকে বাড়িয়ে ১২০ সেকেন্ড করা হয়েছে এবং উভয়কে একটিমাত্র টাইমআউট প্যারামিটার দিয়ে কনফিগারযোগ্য করা হয়েছে। ( Ifec87 )

বাগ সংশোধন

  • profileinstaller ছাড়া কোনো অ্যাপের বেঞ্চমার্কিং বা প্রোফাইল ক্যাপচার করার সময় যে কয়েকটি সমস্যা দেখা দিত, তা সমাধান করা হয়েছে এবং এতে BroadcastReciever অন্তর্ভুক্ত করা হয়েছে। এটি শুধুমাত্র রুটেড ডিভাইসে চলার ক্ষেত্রে প্রযোজ্য। ( Ied308 )

সংস্করণ 1.4.0-alpha09

১২ মার্চ, ২০২৫

androidx.benchmark:benchmark-*:1.4.0-alpha09 প্রকাশিত হয়েছে। সংস্করণ 1.4.0-alpha09-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

এপিআই পরিবর্তন

  • কাস্টম লাইফসাইকেলের সাথে সহজে ব্যবহারের জন্য, বন্ধযোগ্য হ্যান্ডেলসহ TraceProcessor এবং Session API যোগ করা হয়েছে। এটি Coroutine এবং Java API-এর ব্যবহার সহজতর করার দিকেও একটি পদক্ষেপ। TraceProcessor.runServer {} এর এক্সটেনশন ফাংশনগুলোকে এখন পরীক্ষামূলক হিসেবে চিহ্নিত করা হয়েছে, কারণ ভবিষ্যতে এগুলোকে স্থানান্তরিত করে অ-পরীক্ষামূলক করে দেওয়া হতে পারে। ( I358b4 )

বাগ সংশোধন

  • pgrep টয়বক্সে একটি পরিবর্তনের কারণে API 36-এর সাথে বেঞ্চমার্ক এবং বেসলাইন প্রোফাইল ক্যাপচার কাজ না করার সমস্যাটি সমাধান করা হয়েছে, কারণ এখন সম্পূর্ণ কমান্ড লাইন প্রিন্ট করার জন্য -a প্রয়োজন। ( Idc991 )
  • নতুন API লেভেলগুলিতে ট্রেস করার সময় ডেটা হারানোর ঝুঁকি কমাতে ডিফল্ট ট্রেসিং কনফিগারেশন ফিল্টার করুন। ( I54e8a )
  • পরীক্ষামূলক androidx.benchmark.killExistingPerfettoRecordings ইন্সট্রুমেন্টেশন আর্গুমেন্ট যোগ করা হয়েছে, যা false সেট করে আগে থেকে বিদ্যমান পারফেটটো ট্রেস ক্যাপচার চালিয়ে যাওয়ার অনুমতি দেওয়া যেতে পারে। ডিফল্টরূপে, হস্তক্ষেপ রোধ করার জন্য ডিভাইসে আগে থেকে বিদ্যমান পারফেটটো ট্রেস ক্যাপচারগুলো বন্ধ করে দেওয়া হয়। ( I02a3c )
  • এপিআই ৩৫ এবং তার পরবর্তী সংস্করণগুলোর জন্য JSON ফিল্ড ` context.osCodenameAbbreviated এখন থেকে REL হবে, কারণ অন্তর্নিহিত প্ল্যাটফর্মটি আর সংখ্যাসূচক নয় এমন কোড নাম সমর্থন করে না। ( Ib17fd )
  • রিসিংক করা ফ্রেম ঘটলে FrameTimingMetric এ যে ক্র্যাশ হতো, তা ঠিক করা হয়েছে। ( I7c6f4 , b/394610806 )
  • FrameTimingQuery এর জন্য এখন থেকে আর ধরে নেওয়া হবে না যে Choreographer#doFrame হলো মেইন থ্রেডের স্ট্যাক ফ্রেমের শীর্ষ। ( Iee0e0 , b/340206285 )

সংস্করণ 1.4.0-alpha08

১২ ফেব্রুয়ারী, ২০২৫

androidx.benchmark:benchmark-*:1.4.0-alpha08 প্রকাশিত হয়েছে। সংস্করণ 1.4.0-alpha08-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

এপিআই পরিবর্তন

  • TraceProcessor.runSession() এক্সটেনশন API-গুলোকে পরীক্ষামূলক পর্যায়ে স্থানান্তরিত করা হয়েছে, কারণ Android-এ এগুলি অবশেষে কংক্রিট কনস্ট্রাক্টর হয়ে যাওয়ার সম্ভাবনা রয়েছে। ( Ib0528 , b/393640753 )
  • স্টার্টআপ ইনসাইটস-এর বেশিরভাগ বাস্তবায়ন এখন পাবলিক/পরীক্ষামূলক, এবং TraceProcessor আর্টিফ্যাক্টে স্থানান্তরিত হচ্ছে। StartupInsights দেখুন। ( I0aa00 )
  • BenchmarkRule.runWithTimingDisabled {} এর পরিবর্তে BenchmarkRule.runWithMeasurementDisabled {} ব্যবহার করুন, যা এর আচরণ আরও স্পষ্টভাবে বর্ণনা করে - সমস্ত মেট্রিক পজ করা হয়। এছাড়াও, MicrobenchmarkScope সুপারক্লাসটিকে এক্সপোজ করুন, কারণ runWithMeasurementDisabled ফাংশনটি ইনলাইন হওয়ায় এটিকে ওপেন অ্যাক্সেসের জন্য পুনরায় ডিক্লেয়ার করা সম্ভব নয়। ( I9e23b , b/389149423 , b/149979716 )
  • বেঞ্চমার্ক লাইব্রেরিগুলো কোটলিন ২.০-তে স্থানান্তরিত হয়েছে। ( I9d1e0 )
  • androidx.benchmark.startupProfiles.enable ইন্সট্রুমেন্টেশন আর্গুমেন্টটি সরিয়ে ফেলা হয়েছে। এটি এখন আর দরকারি নয়, কারণ BaselineProfileRule.collect() -এ includeInStartupProfile আর্গুমেন্টের মাধ্যমে এটিকে নিয়ন্ত্রণ করা যায়। ( I39eb4 )

বাগ সংশোধন

  • প্রোফাইলিং চলাকালীন কল করা মাইক্রোবেঞ্চমার্কের অভ্যন্তরীণ ফাংশনের সংখ্যা কমানো হয়েছে, যাতে উদাহরণস্বরূপ মেথড ট্রেস আরও স্পষ্ট হয় ( Ifaed8 )।
  • ক্র্যাশের জন্য সাময়িক সমাধান: '[ ProcessPid(processName=perfetto, pid=...) ] বন্ধ করতে ব্যর্থ'। এখন থেকে, বেঞ্চমার্ক চালানোর আগে কোনো ব্যাকগ্রাউন্ড পারফেটটো প্রসেস বন্ধ করা না গেলে, বেঞ্চমার্ক ক্র্যাশ না করে একটি বার্তা লগ করবে। ( I37d3e , b/323601788 )
  • অতিরিক্ত কঠোর আউটপুট ফরম্যাট চেকের কারণে সৃষ্ট 'Expected pm dump-profiles stdout' লেবেলযুক্ত IllegalStateExceptions সংশোধন করা হয়েছে। ( I358dc )

সংস্করণ 1.4.0-alpha07

২৯ জানুয়ারী, ২০২৫

androidx.benchmark:benchmark-*:1.4.0-alpha07 প্রকাশিত হয়েছে। সংস্করণ 1.4.0-alpha07-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

নতুন বৈশিষ্ট্য

  • BaselineProfileRule এখন একটি collectWithResults(...) API চালু করেছে, যাতে গণনাকৃত প্রোফাইলগুলোর পাথের একটি তালিকা অন্তর্ভুক্ত রয়েছে। ( I056f8 )
  • androidx.benchmark.measureRepeatedOnMainThread.throwOnDeadline ইন্সট্রুমেন্টেশন আর্গুমেন্টটি যোগ করা হয়েছে, যা লোকাল টেস্টিংয়ের জন্য measureRepeatedOnMainThread এর ডেডলাইনে থ্রো করার আচরণটি নিষ্ক্রিয় করতে false-এ সেট করা যেতে পারে। অন্যথায় এটি সুপারিশ করা হয় না, কারণ এটি টেস্ট চলাকালীন ANR (অ্যাক্টিভ নাম্বার রেজোন্যান্স) হওয়ার সম্ভাবনা বাড়িয়ে দেয়। ( Idbeec , b/353226476 )

এপিআই পরিবর্তন

  • MicrobenchmarkConfig কনস্ট্রাক্টরে @JvmOverloads যোগ করা হয়েছে। ( I13fd3 )
  • BenchmarkRule coroutines-এর উপর ভিত্তি করে তৈরি করতে এবং আরও উন্নত yield() আচরণ সমর্থন করার জন্য রিফ্যাক্টর করা হয়েছে। এই রিফ্যাক্টরের মাধ্যমে বেশ কিছু পরীক্ষামূলক BenchmarkState API সরিয়ে ফেলা হয়েছে, তবে প্রয়োজন অনুযায়ী সেগুলোর প্রতিস্থাপন করা হবে। এছাড়াও, আচরণ স্পষ্ট করার জন্য runWithMeasurementDisabled যোগ করা হয়েছে (সমস্ত পরিমাপ স্থগিত করা হয়)। ভবিষ্যতে, runWithTimingDisabled ডেপ্রিকেটেড করা হবে। ( I19837 , b/389149423 , b/311242861 )
  • একটি নতুন androidx.benchmark:benchmark-traceprocessor আর্টিফ্যাক্টে PerfettoTraceProcessor কে TraceProcessor এ স্থানান্তর করুন এবং এর বেশিরভাগ API-কে নন-এক্সপেরিমেন্টাল করে দিন। যেকোনো কাস্টম TraceMetric বা ট্রেস থেকে ডেটা রিড করে এমন যেকোনো কিছুকে নতুন TraceProcessor ইম্পোর্ট দিয়ে আপডেট করতে হবে। নতুন TraceProcessor API হুবহু পুরানোটির মতোই কাজ করে, কিন্তু এটি একটি স্বতন্ত্র ইন্টারফেস লাইব্রেরি (Room-এর androidx.sqlite লেয়ারের সাথে কিছুটা সাদৃশ্যপূর্ণ) যার একটি অ্যান্ড্রয়েড-নির্দিষ্ট ইমপ্লিমেন্টেশন macrobenchmark-এর মধ্যে বিল্ট-ইন করা আছে। নতুন আর্টিফ্যাক্টটি JVM-এও ব্যবহার করা যাবে, কিন্তু বর্তমানে আপনাকে TraceProcessor বাইনারির নিজস্ব একটি কপি চালু করতে হবে এবং এর সাথে সংযোগ করার জন্য একটি পোর্ট অফার করতে হবে। ( I3a767 , I62563 , b/381134564 )

বাগ সংশোধন

  • MacrobenchmarkScope.startActivityAndWait যখন টার্গেট প্রসেসটি চালু করতে ব্যর্থ হয় (সম্ভবত টার্গেট প্রসেসটি ক্র্যাশ করার কারণে), তখন আরও অস্পষ্ট 'Unable to confirm activity launch completion' বার্তার পরিবর্তে একটি স্পষ্টতর ত্রুটির বার্তা দেখান ( I3539b )।
  • কোটলিন স্যাম্পলগুলোর বেশ কিছু সিনট্যাক্স ত্রুটি এবং বেশ কিছু জাভা / build.gradle স্যাম্পলের সিনট্যাক্স হাইলাইটিং সংশোধন করা হয়েছে। ( Ib3808 )
  • ArtMetric এবং CaptureInfo প্যারামিটারের ডকুমেন্টেশন স্পষ্ট করা হয়েছে। ( I96e60 )

সংস্করণ 1.4.0-alpha06

১১ ডিসেম্বর, ২০২৪

androidx.benchmark:benchmark-*:1.4.0-alpha06 প্রকাশিত হয়েছে। সংস্করণ 1.4.0-alpha06-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

এপিআই পরিবর্তন

  • PerfettoTraceProcessor.Session.query() থেকে @Language("sql") এর ব্যবহার সরিয়ে ফেলা হয়েছে, কারণ Studio-র হাইলাইটিং/পার্সিং-এ সমস্যা হচ্ছিল। ( Idc2fa , b/377733398 )

বাগ সংশোধন

  • এই লাইব্রেরিটি এখন JSpecify নালনেস অ্যানোটেশন ব্যবহার করে, যা টাইপ-ইউজ। সঠিক ব্যবহার নিশ্চিত করতে কোটলিন ডেভেলপারদের নিম্নলিখিত কম্পাইলার আর্গুমেন্টটি ব্যবহার করা উচিত: -Xjspecify-annotations=strict (কোটলিন কম্পাইলারের ২.১.০ সংস্করণ থেকে এটি ডিফল্ট হিসেবে ব্যবহৃত হয়)। ( I46810 , b/326456246 )
  • ArtMetric ক্লাস লোড (init নয়) রিপোর্ট করার জন্য সংশোধন করা হয়েছে, এবং রানটাইম আচরণ স্পষ্ট করার জন্য ডকুমেন্টেশন উন্নত করা হয়েছে। ( I9915c )
  • অ্যান্ড্রয়েড মাল্টিইউজারে, শুধুমাত্র রুটেড ডিভাইসেই রুট হিসেবে কমান্ড চালান। ( I88b44 )

সংস্করণ 1.4.0-alpha05

১৩ নভেম্বর, ২০২৪

androidx.benchmark:benchmark-*:1.4.0-alpha05 প্রকাশিত হয়েছে। সংস্করণ 1.4.0-alpha05-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

বাগ সংশোধন

  • API 34+ এর একটি সমস্যা সমাধান করা হয়েছে যেখানে CompilationMode.None() এর পারফরম্যান্স অসামঞ্জস্যপূর্ণ ছিল, যা প্রাথমিক বা সবচেয়ে খারাপ অবস্থার পারফরম্যান্সের প্রতিনিধিত্ব করত না। এটি প্ল্যাটফর্মের একটি পরিবর্তনের সমাধান করে, যা প্রথমবার চালু করার কিছুক্ষণ পরেই ART-এর কম্পাইলেশন স্টেট verify অ্যাপ আংশিকভাবে কম্পাইল করার সুযোগ দিত (যা শুধুমাত্র ক্লাস লোডিংকে প্রভাবিত করত)। ( Ie48d0 )
  • একটি সমস্যার সমাধান করা হয়েছে যেখানে পারফেটটো ট্রেসের মধ্যে প্রসেসের নামটি সংক্ষিপ্ত হয়ে যাওয়ার কারণে (বিশেষ করে ছোট) ট্রেস ক্যাপচার করা হলেও বিল্ট-ইন ম্যাক্রোবেঞ্চমার্ক মেট্রিক্স থেকে কোনো পরিমাপ রিপোর্ট পাওয়া যেত না। এখন ম্যাক্রোবেঞ্চমার্ক প্রত্যাশিত প্যাকেজ নামের পাশাপাশি সমস্ত বিল্ট-ইন কোয়েরিতে সংক্ষিপ্ত প্যাকেজ নামটি খুঁজে এই সমস্যার সমাধান করে। উল্লেখ্য যে, কাস্টম TraceMetric ইমপ্লিমেন্টেশন বা PerfettoSession.query এর অন্যান্য সরাসরি কলাররা একটি পারফেটটো কোয়েরিতে process.name LIKE "$packageName" পরিবর্তন করে (process.name LIKE "$packageName" OR process.name LIKE "$(packageName.takeLast(15))") করে এই একই আচরণ প্রয়োগ করতে পারে। ( I5bf01 , b/377565760 )

সংস্করণ 1.4.0-alpha04

৩০ অক্টোবর, ২০২৪

androidx.benchmark:benchmark-*:1.4.0-alpha04 প্রকাশিত হয়েছে। সংস্করণ 1.4.0-alpha04-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

নতুন বৈশিষ্ট্য

  • (পরীক্ষামূলক) সেকেন্ডারি ব্যবহারকারীর জন্য ইনস্টল করা অ্যাপগুলিতে বেসলাইন প্রোফাইল তৈরি এবং বেঞ্চমার্কিং সক্ষম করুন, উদাহরণস্বরূপ হেডলেস অ্যান্ড্রয়েড অটো ডিভাইসের যেকোনো অ্যাপ। এই সাপোর্টটি কিছু ক্ষেত্রে পরীক্ষা করা হয়েছে, কিন্তু যদি এটি আপনার জন্য কাজ না করে, তবে একটি বাগ রিপোর্টের মাধ্যমে আমাদের জানান। ( I9fcbe , b/356684617 , b/373641155 )

বাগ সংশোধন

  • বেঞ্চমার্ক বিল্ডগুলিতে এখন isProfileable সর্বদা ওভাররাইড করা হয়, এবং বেঞ্চমার্ক ও nonMinified (বেসলাইন প্রোফাইল ক্যাপচার) উভয় বিল্ডেই এখন isDebuggable সর্বদা ওভাররাইড করা হয়। ( I487fa , b/369213505 )
  • API 28-এর পূর্ববর্তী কিছু ফিজিক্যাল ডিভাইসে কম্পাইলেশন ডিটেকশনের সমস্যা সমাধান করা হয়েছে - এটি json context.compilationMode প্রভাবিত করে, এবং সেইসাথে androidx.benchmark.requireAot=true এর আচরণকেও প্রভাবিত করে (যা এখন আর ভুলভাবে কোনো এরর দেখায় না) ( Ic3e08 , b/374362482 )
  • CpuEventCounter মেট্রিক্সে, অবৈধ পরিমাপ পরিলক্ষিত হলে থ্রো করুন (যেমন instructions/cpucycles==0) ​​( I8c503 )

সংস্করণ 1.4.0-alpha03

১৬ অক্টোবর, ২০২৪

androidx.benchmark:benchmark-*:1.4.0-alpha03 প্রকাশিত হয়েছে। সংস্করণ 1.4.0-alpha03-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

এপিআই পরিবর্তন

  • ম্যাক্রোবেঞ্চমার্ক : ArtMetric যোগ করা হয়েছে, যা প্রোফাইল কভারেজ বা সাধারণ অ্যান্ড্রয়েড রানটাইম পারফরম্যান্স পরীক্ষা করতে ব্যবহার করা যেতে পারে। এটি JIT, ক্লাস ইনিট (যেখানে উপলব্ধ), এবং ক্লাস ভেরিফিকেশনের সংখ্যা ও মোট সময়কাল ক্যাপচার করে। এছাড়াও, ডিফল্টের সাথে ঐচ্ছিক ART মেইনলাইন সংস্করণ অন্তর্ভুক্ত করার জন্য CaptureInfo পরিবর্তন করা হয়েছে। ( I930f7 )
  • একটি নির্দিষ্ট বেঞ্চমার্ক রানের মধ্যে স্থিতিশীলতা দেখানোর জন্য বেঞ্চমার্ক JSON আউটপুটে coefficientOfVariation যোগ করুন। ( Ib14ea )

বাগ সংশোধন

  • AVD ডিভাইসের ফাইলে স্পেস থাকলে CollectBaselineProfileTask ত্রুটি সংশোধন করা হয়েছে। ( Ia0225 , b/371642809 )
  • StartupMode.COLD এক্সেপশন থেকে উদ্ভূত ত্রুটির জন্য একটি সাময়িক সমাধান: Package <packagename> must not be running prior to cold start! এখন, MacrobenchmarkScope.killProcess() (যার মধ্যে StartupMode.COLD আচরণ বাস্তবায়নের জন্য ব্যবহৃত প্রতিটি ইটারেশনের আগে চালানো ফাংশনটিও অন্তর্ভুক্ত) অ্যাপের সমস্ত প্রসেস বন্ধ হয়েছে কিনা তা যাচাই করার জন্য অপেক্ষা করবে। ( I60aa6 , b/351582215 )
  • কিছু রুটেড এমুলেটরে UNLOCKED_ ত্রুটি প্রদর্শিত হওয়ার সমস্যাটি সমাধান করা হয়েছে। ( Ic5117 )
  • এই লাইব্রেরিটি এখন JSpecify নালনেস অ্যানোটেশন ব্যবহার করে, যা টাইপ-ইউজ। সঠিক ব্যবহার নিশ্চিত করতে কোটলিন ডেভেলপারদের নিম্নলিখিত কম্পাইলার আর্গুমেন্টটি ব্যবহার করা উচিত: -Xjspecify-annotations=strict (কোটলিন কম্পাইলারের ২.১.০ সংস্করণ থেকে এটি ডিফল্ট হিসেবে ব্যবহৃত হয়)। ( I7104f , b/326456246 )

সংস্করণ 1.4.0-alpha02

২ অক্টোবর, ২০২৪

androidx.benchmark:benchmark-*:1.4.0-alpha02 প্রকাশিত হয়েছে। সংস্করণ 1.4.0-alpha02-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

এপিআই পরিবর্তন

  • Gradle টাস্ক lockClocks এবং unlockClocks টপ লেভেল থেকে সরিয়ে বেঞ্চমার্ক প্রোজেক্টে স্থানান্তরিত করা হয়েছে। এই পরিবর্তনটি প্রয়োজনীয় ছিল, কারণ দুর্ভাগ্যবশত প্রোজেক্ট আইসোলেশন না ভেঙে এগুলিকে টপ লেভেল অ্যাকশন হিসেবে রেজিস্টার করার কোনো উপায় নেই। ( I02b8f , b/363325823 )

বাগ সংশোধন

  • BaselineProfileRule এখন মাল্টি-প্রসেস অ্যাপের জন্য প্রোফাইল সংগ্রহ করে। এটি ব্লকের শেষে প্রতিটি চলমান প্রসেসকে প্রোফাইল ডাম্প করার জন্য সংকেত দেয়। যদি প্রোফাইল-ভিত্তিক কম্পাইলেশন ব্রডকাস্ট করার জন্য কোনো প্রসেস সফলভাবে খুঁজে না পায়, তাহলে কম্পাইলেশনটি ব্যর্থ হবে, কারণ এর মধ্যে প্রোফাইল ডেটা থাকা অপ্রত্যাশিত। এছাড়াও, ডাম্পের জন্য অপেক্ষার সময়কাল নিয়ন্ত্রণ করতে একটি ইন্সট্রুমেন্টেশন আর্গুমেন্ট যোগ করা হয়েছে: androidx.benchmark.saveProfileWaitMillis ( I0f519 , b/366231469 )
  • বেঞ্চমার্ক 1.3.2 থেকে : ফায়ারবেস টেস্ট ল্যাব (FTL) কর্তৃক বেসলাইন প্রোফাইল গ্র্যাডল প্লাগইন থেকে বেসলাইন প্রোফাইল বা ম্যাক্রোবেঞ্চমার্ক ফলাফল ফাইল পুল করতে না পারার সমস্যাটি সমাধান করা হয়েছে। ( I2f678 , b/285187547 )

FTL ব্যবহার করতে, প্লাগইন ব্লকের বেসলাইন প্রোফাইল মডিউলে প্লাগইনটি প্রয়োগ করুন, নিম্নরূপে:

  plugins {
      ...
      id("com.google.firebase.testlab")
  }

এবং তারপরে ফায়ারবেস টেস্ট ল্যাবটি নিম্নলিখিতভাবে কনফিগার করুন:

  firebaseTestLab {

      // Credentials for FTL service
      serviceAccountCredentials.set(file("credentials.json"))

      // Creates one or more managed devices to run the tests on.
      managedDevices {
          "ftlDeviceShiba34" {
              device = "shiba"
              apiLevel = 34
          }
      }

      // Ensures the baseline profile is pulled from the device.
      // Note that this will be automated as well later with aosp/3272935.
      testOptions {
          results {
              directoriesToPull.addAll("/storage/emulated/0/Android/media/${android.namespace}")
          }
      }
  }

এছাড়াও তৈরি করা FTL ডিভাইসটিকে বেসলাইন প্রোফাইল এক্সটেনশনে যুক্ত করতে হবে:

  baselineProfile {
      managedDevices += "ftlDeviceShiba34"
      useConnectedDevices = false
  }

সংস্করণ 1.4.0-alpha01

১৮ সেপ্টেম্বর, ২০২৪

androidx.benchmark:benchmark-*:1.4.0-alpha01 প্রকাশিত হয়েছে। সংস্করণ 1.4.0-alpha01-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

নতুন ফিচার - অ্যাপ স্টার্টআপ ইনসাইটস

  • ম্যাক্রোবেঞ্চমার্কে অ্যাপ স্টার্টআপ ইনসাইটস-এর প্রাথমিক সংস্করণ সক্রিয় করা যাবে। ( 09fae38 )

একটি স্টার্টআপ বেঞ্চমার্কে সক্রিয় করতে:

  @Test
  fun startup {
      macrobenchmarkRule.measureRepeated(
          
          packageName = "com.example.my.application.id"
          metrics = listOf(StartupTimingMetric()),
          iterations = 5,
          startupMode = StartupMode.COLD,
          compilationMode = CompilationMode.None(),
          experimentalConfig = ExperimentalConfig(startupInsightsConfig = StartupInsightsConfig(isEnabled = true))
          ) {
          scope.startActivityAndWait(...)
      }
  }

এরপর আপনার স্টার্টআপ বেঞ্চমার্ক চালালে এটি ট্রেস বিশ্লেষণ করে সাধারণ সমস্যাগুলো খুঁজে বের করবে এবং মেট্রিক্সের পরে স্টুডিও টেস্ট আউটপুটের বেঞ্চমার্ক ট্যাবে সেগুলো প্রিন্ট করবে, যেমন:

StartupBenchmark_startup[startup=COLD,compilationMode=None]
├── Metrics
│   ├──   timeToFullDisplayMs                min  1,147.2,   median  1,208.8,   max  1,307.4
│   └──   timeToInitialDisplayMs             min  1,147.2,   median  1,208.8,   max  1,307.4
├── App Startup Insights
│   ├── App in debuggable mode (expected: false)
│   │   └── seen in iterations: 0(true) 1(true) 2(true) 3(true) 4(true) 5(true) 6(true) 7(true) 8(true) 9(true)
│   ├── Potential CPU contention with another process (expected: < 100000000ns)
│   │   └── seen in iterations: 4(105022546ns)
│   └── Main Thread - Binder transactions blocked (expected: false)
│       └── seen in iterations: 7(true)
└── Traces
    └── Iteration 0 1 2 3 4 5 6 7 8 9

এই ফিচারটি এখনও নির্মাণাধীন এবং পরবর্তীতে এর ডকুমেন্টেশন ও সম্প্রসারণযোগ্যতার উন্নতি করা হবে, তবে এ বিষয়ে মতামত সাদরে গৃহীত হবে।

নতুন বৈশিষ্ট্য

  • সমস্ত বেসলাইন প্রোফাইল সতর্কতা দমন করতে androidx.baselineprofile.suppressWarnings গ্রেডল প্রপার্টি যোগ করা হয়েছে। ( 314153a )
  • মাইক্রোবেঞ্চ মেট্রিকগুলি এখন পারফেটটো ট্রেসে কাউন্টার হিসাবে প্রদর্শিত হয়। ( 3214854 )
  • jit নিষ্ক্রিয় করার (এর জন্য রুট অ্যাক্সেস / রানটাইম রিস্টার্ট প্রয়োজন) এবং ডিভাইসের পারফরম্যান্স/টেস্ট অবস্থা রিসেট করার জন্য পরীক্ষামূলক স্ক্রিপ্ট যোগ করা হয়েছে। এগুলি বর্তমানে গ্রেডল টাস্ক হিসাবে প্রকাশিত নয়। ( 7c3732b )
  • এমুলেটরে চালানোর সময় টেস্ট এড়িয়ে যাওয়ার জন্য বেঞ্চমার্ক আর্গুমেন্ট যোগ করা হয়েছে। যখন automaticGenerationDuring build` সক্রিয় থাকে, তখন বেঞ্চমার্কগুলি বেসলাইন প্রোফাইল তৈরিও শুরু করে। এমুলেটর ব্যবহার করা হলে এটি ব্যর্থ হবে। নতুন আর্গুমেন্ট skipBenchmarksOnEmulator ব্যবহার করে আমরা এর পরিবর্তে টেস্টটি এড়িয়ে যেতে পারি। ( 0c2ddcd )
  • API 23+ ( 2550048 ) এ চালানোর জন্য পারফরম্যান্স ইভেন্ট সক্রিয় করার লজিক পরিবর্তন করুন

এপিআই পরিবর্তন

  • MacrobenchmarkRule.measureRepeated() এর বিদ্যমান পরীক্ষামূলক PerfettoConfig আর্গুমেন্টটি নতুন ExperimentalConfig অবজেক্টে স্থানান্তর করা হয়েছে।

বাগ সংশোধন

  • lockClocks.sh পুনঃপ্রচেষ্টার সংখ্যা বৃদ্ধি করুন ( 99e9dac )
  • বিদ্যমান থাকলে nonMinified এবং benchmark বিল্ড টাইপ তৈরি করবেন না। একটি বাগের কারণে, nonMinified এবং benchmark বিল্ড টাইপ বিদ্যমান থাকলেও, সেগুলি পুনরায় তৈরি করা হতো। ( e75f0a5 )
  • TraceSectionMetric ফলাফল থেকে অসমাপ্ত স্লাইস উপেক্ষা করুন। ( a927d20 )
  • sdk_ প্রিফিক্স বিবেচনা করার জন্য এমুলেটর চেক উন্নত করা হয়েছে। ( 1587de8 )
  • FrameTimingGfxInfoMetric এ অচল প্যাকেজগুলিকে পরিষ্কার করা হিসাবে বিবেচনা করুন। ( 35cc79c )
  • নন-ইনস্ট্রাকশন ইভেন্টের জন্য androidx.benchmark.cpuEventCounter ত্রুটিপূর্ণ মান তৈরির সমস্যা সমাধান করা হয়েছে। ( 06edd59 )
  • মেট্রিকের অগ্রাধিকার ক্রম মেনে চলার জন্য resumeTiming/runWithTimingDisabled ঠিক করা হয়েছে, এবং উচ্চ অগ্রাধিকারের মেট্রিকের ফলাফলের উপর নিম্ন অগ্রাধিকারের মেট্রিকের পজ/রিজিউমের প্রভাব উল্লেখযোগ্যভাবে কমানো হয়েছে। উদাহরণস্বরূপ, যদি cpuEventCounter.enable ইন্সট্রুমেন্টেশন আর্গুমেন্টের মাধ্যমে সিপিইউ পারফরম্যান্স কাউন্টার ব্যবহার করা হয়, তাহলে পজ/রিজিউম ঘটলে timeNs আর উল্লেখযোগ্যভাবে কমে যাবে না। ( 5de0968 )

সংস্করণ ১.৩

সংস্করণ ১.৩.৪

২৬ মার্চ, ২০২৫

androidx.benchmark:benchmark-*:1.3.4 প্রকাশিত হয়েছে। সংস্করণ 1.3.4-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

বাগ সংশোধন

  • বেঞ্চমার্ক বেসলাইন গ্রেডল প্লাগইনে গ্রেডল প্রজেক্ট আইসোলেশনের অসঙ্গতিগুলো সমাধান করা হয়েছে। ( b/404523257 )

সংস্করণ ১.৩.৩

১৬ অক্টোবর, ২০২৪

androidx.benchmark:benchmark-*:1.3.3 প্রকাশিত হয়েছে। সংস্করণ 1.3.3-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

বাগ সংশোধন

  • AVD ডিভাইসের ফাইলে স্পেস থাকলে CollectBaselineProfileTask ত্রুটি সংশোধন করা হয়েছে ( Ia0225 , b/371642809 )

সংস্করণ ১.৩.২

২ অক্টোবর, ২০২৪

androidx.benchmark:benchmark-*:1.3.2 প্রকাশিত হয়েছে। সংস্করণ 1.3.2-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

বাগ সংশোধন

  • বেসলাইন প্রোফাইল গ্র্যাডল প্লাগইন থেকে ফায়ারবেস টেস্ট ল্যাব (FTL) কর্তৃক বেসলাইন প্রোফাইল অথবা ম্যাক্রোবেঞ্চমার্ক ফলাফল ফাইল পুল করতে না পারার সমস্যাটি সমাধান করা হয়েছে। ( I2f678 , b/285187547 )

FTL ব্যবহার করতে, প্লাগইন ব্লকের বেসলাইন প্রোফাইল মডিউলে প্লাগইনটি প্রয়োগ করুন, নিম্নরূপে:

  plugins {
      ...
      id("com.google.firebase.testlab")
  }

এবং তারপরে ফায়ারবেস টেস্ট ল্যাবটি নিম্নলিখিতভাবে কনফিগার করুন:

  firebaseTestLab {

      // Credentials for FTL service
      serviceAccountCredentials.set(file("credentials.json"))

      // Creates one or more managed devices to run the tests on.
      managedDevices {
          "ftlDeviceShiba34" {
              device = "shiba"
              apiLevel = 34
          }
      }

      // Ensures the baseline profile is pulled from the device.
      // Note that this will be automated as well later with aosp/3272935.
      testOptions {
          results {
              directoriesToPull.addAll("/storage/emulated/0/Android/media/${android.namespace}")
          }
      }
  }

এছাড়াও তৈরি করা FTL ডিভাইসটিকে বেসলাইন প্রোফাইল এক্সটেনশনে যুক্ত করতে হবে:

  baselineProfile {
      managedDevices += "ftlDeviceShiba34"
      useConnectedDevices = false
  }

সংস্করণ ১.৩.১

১৮ সেপ্টেম্বর, ২০২৪

androidx.benchmark:benchmark-*:1.3.1 প্রকাশিত হয়েছে। সংস্করণ 1.3.1-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

বাগ সংশোধন

  • সমস্ত বেসলাইন প্রোফাইল সতর্কতা দমন করতে androidx.baselineprofile.suppressWarnings গ্রেডল প্রপার্টি যোগ করা হয়েছে ( I7c36e , b/349646646 )
  • অ্যাপ দ্বারা তৈরি হলে, র‍্যাপার তৈরির পরিবর্তে পূর্ব-বিদ্যমান nonMinified… এবং benchmark… ব্যবহার করার জন্য বেসলাইন প্রোফাইল গ্রেডল প্লাগইনটি ঠিক করা হয়েছে। ( Ia8934 , b/361370179 )
  • এমুলেটরগুলিতে automaticGenerationDuringBuild সক্রিয় থাকলে java.lang.AssertionError: ERRORS (not suppressed): EMULATOR সমাধান করা হয়েছে। এর পরিবর্তে পরীক্ষাটি এড়িয়ে যাওয়ার জন্য একটি নতুন আর্গুমেন্ট ব্যবহার করা হয়। ( If3f51 , b/355515798 )
  • মাইক্রোবেঞ্চমার্ক মিনিফিকেশন - org.junit.runner.notification.RunListener এর সাবক্লাসগুলিকে বেঞ্চমার্ক লাইব্রেরি প্রোগার্ডে রাখুন ( Ic8ed5 , b/354264743 )
  • অসমাপ্ত স্লাইসগুলিকে উপেক্ষা করার জন্য TraceSectionMetric সংশোধন করুন। পূর্বে, যোগফল নির্ণয় বা সর্বনিম্ন সময়কাল খুঁজে বের করার সময় এগুলির সময়কাল -১ ধরা হতো। ( If74b7 )
  • FrameTimingGfxInfoMetric এর একটি সমস্যা সমাধান করা হয়েছে, যেখানে প্রসেসটি আগে থেকে চালু না থাকলে মেট্রিকটি শুরু করার সময় ক্র্যাশ করত। ( I6e412 )

সংস্করণ ১.৩.০

২১শে আগস্ট, ২০২৪

androidx.benchmark:benchmark-*:1.3.0 প্রকাশিত হয়েছে। সংস্করণ 1.3.0-এ এই কমিটগুলো অন্তর্ভুক্ত রয়েছে।

১.২.০ সংস্করণ থেকে মাইক্রোবেঞ্চমার্কের পরিবর্তনসমূহ

  • বেশিরভাগ ডিভাইসে মাইক্রোবেঞ্চমার্ক চালানোর সময় মেথড ট্রেসিং ডিফল্টরূপে চালু থাকে।
    • মেথড ট্রেসিং পরিমাপের পরে একটি পৃথক পর্যায় হিসাবে চলে - এটি একটি একক বেঞ্চমার্ক রান থেকে সঠিক পরিমাপ এবং মেথড ট্রেস উভয়ই আউটপুট করতে সক্ষম করে।
    • কিছু অ্যান্ড্রয়েড ওএস এবং এআরটি সংস্করণে মেথড ট্রেসিং পরবর্তী পরিমাপ পর্যায়গুলিকে প্রভাবিত করবে — এই সংস্করণগুলিতে, মেথড ট্রেসিং ডিফল্টরূপে বন্ধ থাকে এবং স্টুডিও আউটপুটে একটি সতর্কবার্তা প্রিন্ট করা হয়।
  • প্রধান থ্রেড বেঞ্চমার্ক এবং এএনআর
    • অনেক সেকেন্ড ধরে চলার সময় ANR এড়ানোর জন্য UI থ্রেড বেঞ্চমার্কের (যেমন যেগুলো Compose/View UI-এর সাথে ইন্টারঅ্যাক্ট করে) জন্য measureRepeatedOnMainThread যোগ করা হয়েছে।
    • ANR এড়ানোর সময়সীমা অতিক্রম করার আশঙ্কা থাকলে মেথড ট্রেসগুলি এড়িয়ে যাওয়া হয়। এই আচরণটি নিষ্ক্রিয় করতে androidx.benchmark.profiling.skipWhenDurationRisksAnr কে false-এ সেট করুন (CI রানের জন্য এটি সুপারিশ করা হয় না, কারণ দীর্ঘ CI রানে ANR সমস্যা সৃষ্টি করতে পারে)।
  • মিনিফিকেশন
    • মিনিফিকেশন সক্রিয় থাকা অবস্থায় মাইক্রোবেঞ্চমার্কিং উন্নত করার জন্য এমবেডেড প্রোগার্ড নিয়ম।
    • একটি লাইব্রেরি মডিউলে মিনিফিকেশন/আর৮ (Minification/R8) এর জন্য এজিপি ৮.৩ (AGP 8.3) প্রয়োজন, এবং এটি আপনার build.gradle android.buildTypes.release.androidTest.enableMinification এর মাধ্যমে সক্রিয় করা যায়।
    • ডেড কোড এলিমিনেশন প্রতিরোধ করতে পরীক্ষামূলক BlackHole.consume() API যোগ করা হয়েছে ( If6812 , b/286091643 )
  • মেট্রিক্স
    • পরীক্ষামূলক সিপিইউ ইভেন্ট কাউন্টার ফিচার ( perf_event_open থেকে প্রাপ্ত মেট্রিক্স, যার জন্য প্ল্যাটফর্মের বেশিরভাগ সংস্করণে রুট অ্যাক্সেস প্রয়োজন), যা InstrumentationArgument androidx.benchmark.cpuEventCounter.enable ( true সেট করা যেতে পারে) এর মাধ্যমে অ্যাক্সেস করা যায়, এবং androidx.benchmark.cpuEventCounter.events উদাহরণস্বরূপ ( Instructions,CpuCycles ) হিসেবে সেট করা যেতে পারে। এটি কিছু ইউজারডিবাগ এমুলেটরে সমর্থিত হওয়া উচিত, কিন্তু উপলব্ধ সমস্ত এমুলেটরে এর সমর্থন পরীক্ষা করা হয়নি।

১.২.০ সংস্করণ থেকে MACRObenchmark-এর পরিবর্তনসমূহ

  • ম্যাক্রোবেঞ্চমার্কের জন্য মেথড ট্রেসিং-এর আমূল সংস্কার।
    • এখন মেথড ট্রেসগুলো measureBlock এর সময়কালের মধ্যে সীমাবদ্ধ থাকে এবং প্রসেসটি একাধিকবার চালু হলে একাধিক সেশন ক্যাপচার করতে পারে।
    • পূর্বে, মেথড ট্রেসিং শুধুমাত্র StartupMode.COLD বেঞ্চমার্কের জন্য কাজ করত এবং measureBlocks টার্গেট প্রসেসকে রিস্টার্ট করত না, সেগুলোর ক্ষেত্রে কিছুই ক্যাপচার করত না।
    • ম্যাক্রোবেঞ্চমার্কে মেথড ট্রেস ফ্লাশ করার বিষয়টি ঠিক করা হয়েছে, যাতে ধীরগতির ডিভাইসেও মেথড ট্রেসগুলো সম্পূর্ণরূপে ক্যাপচার করা এবং বৈধ থাকে। ( I6349a , b/329904950 )
  • প্রসেস কিল করার সময় প্রতিটি warmUp ইটারেশনের মাঝে ART প্রোফাইল সঠিকভাবে ডাম্প করুন, যাতে CompilationMode.Partial(warmup=N) পরিমাপগুলো আরও নির্ভুল হয়। ( I17923 )
  • ড্রপ শেডার সম্প্রচার ব্যর্থতার বার্তা
    • শেডার ব্রডকাস্ট ব্যর্থতার বার্তা বাদ দেওয়ার জন্য ডিবাগিং পরামর্শ যোগ করা হয়েছে।
    • ProfileInstaller 1.3 ছাড়া অ্যাপের বেঞ্চমার্কিং করার সময় ক্র্যাশ এড়ানোর জন্য, শেডার ড্রপিং আচরণ ওভাররাইড করতে দুটি ইন্সট্রুমেন্টেশন আর্গুমেন্ট যোগ করুন:
      • androidx.benchmark.dropShaders.enable=true/false : সমস্ত শেডার ড্রপিং এড়িয়ে যেতে এটি ব্যবহার করা যেতে পারে ( StartupMode.Cold লঞ্চের সময় করা ড্রপিং সহ), বিশেষ করে সেইসব অ্যাপের বেঞ্চমার্কিং করার সময় যেগুলো এখনও profileinstaller 1.3 ব্যবহার করে না।
      • androidx.benchmark.dropShaders.throwOnFailure=true/false : শেডার ড্রপ করার সময় ব্যর্থতা সহ্য করার জন্য এটি ব্যবহার করা যেতে পারে, উদাহরণস্বরূপ profileinstaller 1.3 ( I4f573 ) ছাড়া অ্যাপের বেঞ্চমার্কিং করার সময়।
  • পরীক্ষামূলক MacrobenchmarkRule#measureRepeated ভ্যারিয়েন্ট যোগ করা হয়েছে, যা সম্পূর্ণ কাস্টমাইজড পারফেটটো ট্রেস রেকর্ডিংয়ের জন্য একটি কাস্টম PerfettoConfig গ্রহণ করে। উল্লেখ্য যে, ভুলভাবে কনফিগার করা কনফিগারেশনের কারণে বিল্ট-ইন মেট্রিক ক্লাসগুলো ব্যর্থ হতে পারে। ( Idfd3d , b/309841164 , b/304038384 )
  • হস্তক্ষেপ কমাতে ম্যাক্রোবেঞ্চমার্ক চালানোর আগে ব্যাকগ্রাউন্ড ডেক্সঅপশন (dexopt) জবগুলো বাতিল করুন। ( I989ed )
  • ম্যাক্রোবেঞ্চমার্ক এখন টার্গেট অ্যাপ্লিকেশনটির একটি ART প্রোফাইল ফ্লাশ করার জন্য ১ সেকেন্ড অপেক্ষা করে (পূর্বে এটি ৫০০ মিলিসেকেন্ড অপেক্ষা করত)। ( I85a50 , b/316082056 )
  • ট্রেসসেকশনমেট্রিক সংস্কার
    • দ্রষ্টব্য : নিচে উল্লেখিত TraceSectionMetric পরিবর্তনসমূহ CI ব্যবহারের আউটপুটকে প্রভাবিত করতে পারে এবং এর ফলে ধারাবাহিকতার অভাব বা পার্সিং প্রক্রিয়া ব্যাহত হতে পারে।
    • এখন যোগফলই ডিফল্ট হিসেবে সেট করা হয়েছে, কারণ এই মেট্রিকটির বেশিরভাগ ব্যবহারই পুনরাবৃত্তিমূলক ঘটনার ক্ষেত্রে হয়ে থাকে এবং ফার্স্ট মেথড এক্ষেত্রে ডেটা বাদ দিয়ে দিত।
    • আরও বেশি কাস্টমাইজযোগ্য করার জন্য পরিবর্তন করা হয়েছে, সাথে আরও মোড উপলব্ধ রয়েছে।
    • এখন থেকে মোডের নামগুলো মেট্রিক আউটপুট নামের মধ্যেই অন্তর্ভুক্ত করা হয়েছে (স্টুডিও এবং JSON-এ)।
    • এখন Trace.{begin|end}AsyncSection ব্যবহার করে তৈরি স্লাইস সমর্থন করে।
  • মেট্রিক্স
    • পাওয়ার - PowerMetric.deviceSupportsHighPrecisionTracking , PowerMetric.deviceBatteryHasMinimumCharge() এবং PowerMetric.deviceSupportsPowerEnergy() যোগ করা হয়েছে।
    • রিটার্ন টাইপের সাথে মিল রাখার জন্য Metric.getResult নাম পরিবর্তন করে getMeasurements রাখা হয়েছে।
    • সমস্ত স্টার্টআপ সনাক্তকরণ ব্যর্থতার ক্ষেত্রে log.w / এক্সেপশন লেবেল যুক্ত করা হয়েছে। এটি বর্তমান আচরণ পরিবর্তন করে না (ফলে কিছু ত্রুটি থ্রো হয়, এবং অন্যগুলো নীরবে স্টার্টআপ সনাক্ত করতে ব্যর্থ হয়), শুধু এটিকে আরও বোধগম্য করে তোলে। সাধারণত যেগুলোতে Log.w() হয় এবং স্টার্টআপ মেট্রিক্স রিপোর্ট করতে ব্যর্থ হয়, সেগুলো হলো যেখানে নন-ফ্রেম ইভেন্ট অনুপস্থিত থাকে; ফ্রেম টাইমিং তথ্য (UI/RT স্লাইস থেকে) ছাড়া স্টার্টআপ সনাক্ত হলে এক্সেপশন থ্রো হয়। ( Id240f , b/329145809 )
    • FrameTimingMetricframeCount পরিমাপ যোগ করা হয়েছে, যা এমন পরিস্থিতি শনাক্ত করতে সাহায্য করবে যেখানে উৎপাদিত ফ্রেমের সংখ্যা পরিবর্তনের কারণে পরিমাপও বদলে যায় (নতুন অ্যানিমেশন যোগ করা হয়েছে, ইনভ্যালিডেশন সমস্যা সমাধান করা হয়েছে)। ( I1e5aa )
    • ডকুমেন্টেশনে স্পষ্ট করা হয়েছে যে, যখন উপলব্ধ থাকে তখন ট্র্যাকিংয়ের জন্য frameOverrunMs ই পছন্দের মেট্রিক এবং এর কারণ। ( I18749 , b/329478323 )
    • এই সমস্যার সমাধান করা হয়েছে যেখানে ট্রেসের শুরুতে এবং শেষে অসমাপ্ত ফ্রেমগুলো একসাথে জুড়ে গিয়ে ভুলভাবে একটি অত্যন্ত দীর্ঘ ফ্রেম হিসেবে রিপোর্ট করত। ( I39353 , b/322232828 )
    • ফ্রেম তৈরি না হলে FrameTimingMetric ত্রুটি উন্নত করা হয়েছে, এবং সমস্যা নির্ণয়ে সহায়তার জন্য মেট্রিক পার্সিং ব্যর্থ হলে সর্বদা ট্রেসের লিঙ্ক আউটপুট করা হবে। ( I956b9 )
    • বিশেষ করে কিছু নির্দিষ্ট OEM ডিভাইসে ( Ia24bc , b/303823815 , b/306235276 ) ফ্রেম আইডি পার্স করতে ব্যর্থ হওয়ায় FrameTimingMetric এর ক্র্যাশ হওয়া ঠিক করা হয়েছে।
    • FrameMetrics এ যাচাইয়ের কঠোরতা শিথিল করা হয়েছে এবং ত্রুটির বার্তাগুলিতে আরও বিস্তারিত তথ্য যোগ করা হয়েছে। ( ইয়াডেডি )

১.২.০ সংস্করণ থেকে বেসলাইন প্রোফাইল ক্যাপচার / গ্রেডল প্লাগইনের পরিবর্তনসমূহ

  • AGP-এর সর্বোচ্চ প্রস্তাবিত সংস্করণ বাড়িয়ে 9.0.0-alpha01 করা হয়েছে।
  • নিশ্চিত করুন যে mergeArtProfile এবং mergeStartupProfile টাস্কগুলো বেসলাইন প্রোফাইল তৈরির জন্য সর্বদা অপেক্ষা করে। ( I623d6 , b/343086054 )
  • সফলভাবে একটি বেসলাইন প্রোফাইল তৈরি করলে কী কী পরিবর্তিত হয়েছে তার একটি সারাংশ আউটপুট হবে ( I824c8 , b/269484510 )
  • সতর্কবার্তা নিষ্ক্রিয় করার জন্য ডিএসএল যোগ করা হয়েছে ( Ic4deb , b/331237001 )
  • automaticGenerationDuringBuild বন্ধ থাকলে বেঞ্চমার্কগুলি যাতে জেনারেট করা বেসলাইন প্রোফাইল ব্যবহার করে, তা নিশ্চিত করার জন্য ফিক্স ( Ic144f , b/333024280 )
  • nonMinified বা বেঞ্চমার্ক বিল্ড টাইপ কাস্টমাইজ করার সময় বেসলাইন প্রোফাইল তৈরি এবং বেঞ্চমার্কিং সক্ষম করতে BaselineProfile গ্র্যাডল প্লাগইন প্রপার্টি ওভাররাইডগুলো ঠিক করা হয়েছে। ( Ib8f05 , b/324837887 )
  • AGP 8.3.0-alpha15-এর পূর্ববর্তী সংস্করণগুলিতে AAR-এ লাইব্রেরি বেসলাইন প্রোফাইল অন্তর্ভুক্ত করার সমস্যার সমাধান। ( I1d2af , b/313992099 )
  • জেনারেশন টাস্কের শেষে ফিক্সড বেসলাইন এবং স্টার্টআপ প্রোফাইল আউটপুট ইউআরএল। ( I802e5 , b/313976958 )

১.২.০ এর পর থেকে অন্যান্য উল্লেখযোগ্য পরিবর্তনসমূহ

  • ট্রেস ক্যাপচার
    • পারফেটটো চালু করার সময় EXITCODE 2 ত্রুটিকে একটি লগ করা সতর্কবার্তায় হ্রাস করা হয়েছে।
    • বেঞ্চমার্কে ডিফল্টরূপে AIDL ট্রেসিং সক্রিয় করুন (API 28 প্রয়োজন) ( Ia0af2 , b/341852305 )
    • বেঞ্চমার্কে ডিফল্টরূপে পোর্টার ট্যাগ ট্রেসিং সক্রিয় করুন। এটি, উদাহরণস্বরূপ, ওয়েকলক ট্রেসপয়েন্ট ক্যাপচার করে। ( Icfe44 , b/286551983 )
    • ধীরগতির ডিভাইসে ট্রেসিং শুরু করার সময় ক্র্যাশ এড়াতে ট্রেস ক্যাপচার শুরুর টাইমআউট বাড়ানো হয়েছে ( I98841 , b/329145808 )
    • JSON, textproto, এবং proto binary (আনডিকোডেড) ভ্যারিয়েন্ট সহ PerfettoTraceProcessor.Session.queryMetrics পাবলিক API যোগ করা হয়েছে। এগুলি আপনাকে TraceProcessor অন্তর্নির্মিত মেট্রিকগুলি কোয়েরি করার সুযোগ দেয় ( I54d7f , b/304038382 )।
    • ট্রেসের শুরুতে ডেটা হারিয়ে যাওয়ার ঝুঁকি কমাতে পারফেটটো ট্রেস রেকর্ডে ব্লকিং স্টার্ট সক্রিয় করুন। শুধুমাত্র API 33+ এ সমর্থিত। ( Ie6e41 , b/310760059 )
  • JSON আউটপুট
    • JSON আউটপুটে বেঞ্চমার্ক প্রসঙ্গে অতিরিক্ত তথ্য যোগ করা হয়েছে:
      • context.artMainlineVersion - আর্ট মেইনলাইন মডিউলের পূর্ণসংখ্যা সংস্করণ (যদি ডিভাইসে উপস্থিত থাকে, অন্যথায় -1 )
      • context.build.id - android.os.Build.ID এর সমান
      • context.build.version.codename - android.os.Build.VERSION.CODENAME এর সমান
      • context.build.version.abbreviatedCodename - প্রি-রিলিজ কোডনেমের প্রথম অক্ষরের সাথে সঙ্গতিপূর্ণ (রিলিজ বিল্ড সহ) ( Ie5020 )
    • প্রোফাইলিং ট্রেস সম্পর্কিত টুলিং (যেমন পারফেটটো, মেথড ট্রেস) সহজ করার জন্য JSON আউটপুটে profilerOutput তালিকা যোগ করা হয়েছে ( I05ddd , b/332604449 )
    • বেঞ্চমার্ক মডিউলগুলিতে অ্যান্ড্রয়েড টেস্ট অর্কেস্ট্রেটর ব্যবহার করা হলে একটি সতর্কবার্তা যোগ করা হয়েছে, কারণ এর ফলে প্রতি-মডিউল আউটপুট JSON ফাইলগুলি বারবার ওভাররাইট হয়ে যাবে। ( Ia1af6 , b/286899049 )
    • ফাইল লেখা বা পোস্ট-প্রসেসিং করার সময় অনির্দিষ্ট ক্র্যাশ এড়াতে ফাইলের নাম ২০০ অক্ষরের বেশি হলে ত্রুটি দেখান। ( I4a5ab )

সংস্করণ 1.3.0-rc01

৭ আগস্ট, ২০২৪

androidx.benchmark:benchmark-*:1.3.0-rc01 is released. Version 1.3.0-rc01 contains these commits .

বাগ সংশোধন

  • Fix androidx.benchmark.cpuEventCounter producing corrupt values for non-Instruction events ( I7386a , b/286306579 )
  • Fix resumeTiming / runWithTimingDisabled to respect metric priority order, and significantly reduce impact of lower priority metric pause/resume on higher priority metric results. For example, if using cpu perf counters via cpuEventCounter.enable instrumentation argument, timeNs is no longer significantly reduced when pause/resume occur. ( I39c2e , b/286306579 , b/307445225 )
  • Reduced chance of stack sampling causing measureRepeatedOnMainThread from hitting main thread hard timeout by moving stack sampling conversion off main thread. ( I487a8 , b/342237318 )
  • Removed manual outlining of access to new platform APIs since this happens automatically via API modeling when using R8 with AGP 7.3 or later (eg R8 version 3.3) and for all builds when using AGP 8.1 or later (eg D8 version 8.1). Clients who are not using AGP are advised to update to D8 version 8.1 or later. See this article for more details. ( I9496c , b/345472586 )
  • Added agp version check to send package name as instr arg. Previous to AGP 8.4.0 the target app package name cannot be send to the instrumentation app via instrumentation arguments. ( 0c72a3f )

Version 1.3.0-beta02

১০ জুলাই, ২০২৪

androidx.benchmark:benchmark-*:1.3.0-beta02 is released. Version 1.3.0-beta02 contains these commits .

বাগ সংশোধন

  • Gracefully handle EXITCODE 2 when starting Perfetto to log a warning, but proceed.

Version 1.3.0-beta01

১২ জুন, ২০২৪

androidx.benchmark:benchmark-*:1.3.0-beta01 is released. Version 1.3.0-beta01 contains these commits .

এপিআই পরিবর্তন

  • Renamed MethodTracing.affectsMeasurementOnThisDevice to AFFECTS_MEASUREMENT_ON_THIS_DEVICE for consistency. ( I1bdfa )
  • Added experimental BlackHole.consume() api to prevent dead code elimination in microbenchmarks. ( If6812 , b/286091643 )
  • Microbenchmark will now correctly throw to prevent method tracing from interfering with measurements. This occurs on certain devices when method tracing is forced on (via instrumentation args or MicrobenchmarkConfig ), and if a measurement is attempted after a method trace. Affected devices are running API 26-30 or certain ART mainline module versions affected by this interference, and can be detected at runtime via ProfilerConfig.MethodTracing.affectsMeasurementOnThisDevice . ( Iafb92 , b/303660864 )

বাগ সংশোধন

  • Bumped max agp version recommended to 9.0.0-alpha01. ( I5bbb0 )
  • Added compilation mode to benchmark context ( If5612 , b/325512900 )
  • Enable AIDL tracing by default (requires API 28) ( Ia0af2 , b/341852305 )
  • Added additional information in benchmark context in JSON output:
    • context.artMainlineVersion - integer version of Art mainline module (if present on device, -1 otherwise)
    • context.build.id - Equals android.os.Build.ID
    • context.build.version.codename - Equals android.os.Build.VERSION.CODENAME
    • context.build.version.abbreviatedCodename - corresponds to first letter of pre-release codename (even on release builds) ( Ie5020 )
  • Fixes StackSampling to respect androidx.benchmark.profiling.sampleDurationSeconds ( Ib1d53 )
  • Change macro->common dependency to be api() , so it's easier to use eg PerfettoTrace and PerfettoConfig . ( Icdae3 , b/341851833 )
  • Ensure mergeArtProfile and mergeStartupProfile tasks always wait for baseline profile generation. ( I623d6 , b/343086054 )
  • Consider variant enable state when deciding whether variant should be enabled. ( I5d19e , b/343249144 )
  • Increased default start timeout for perfetto trace processor. ( I87e8c , b/329145808 )

সংস্করণ 1.3.0-alpha05

১৪ মে, ২০২৪

androidx.benchmark:benchmark-*:1.3.0-alpha05 is released. Version 1.3.0-alpha05 contains these commits .

বাগ সংশোধন

  • Throw clearer exception when macrobench metric returns zero values for all iterations ( Iab58f , b/314931695 )
  • Additional workaround rules added to microbench proguard rules, including support for listener rules and other observed warnings / errors. ( I14d8f , b/329126308 , b/339085669 )
  • Method tracing runs as a separate phase during a Macrobenchmark, and it no longer affects measurements. ( If9a50 , b/285912360 , b/336588271 )
  • Added extra debugging suggestions to drop shader broadcast failure message. ( I5efa6 , b/325502725 )

সংস্করণ 1.3.0-alpha04

১ মে, ২০২৪

androidx.benchmark:benchmark-*:1.3.0-alpha04 is released. Version 1.3.0-alpha04 contains these commits .

এপিআই পরিবর্তন

  • Added experimental MacrobenchmarkRule#measureRepeated variant which takes a custom PerfettoConfig for fully customized Perfetto trace recording. Note that incorrectly configured configs may cause built in Metric classes to fail. ( Idfd3d , b/309841164 , b/304038384 )
  • Rename PowerMetric.deviceSupportsPowerEnergy to PowerMetric.deviceSupportsHighPrecisionTracking for clarity ( I5b82f )
  • Added PowerMetric.deviceBatteryHasMinimumCharge() and PowerMetric.deviceSupportsPowerEnergy() to enable changing or skipping benchmarks based on device power measurement capability. ( I6a591 , b/322121218 )

বাগ সংশোধন

  • Added comparison with previous baseline profile ( I824c8 , b/269484510 )
  • Added DSL to disable warnings ( Ic4deb , b/331237001 )
  • Changed exception to info log when benchmark variants are disabled ( I8a517 , b/332772491 )
  • Make it simpler to capture method traces for a Macrobenchmark is scoped to the duration of the actual measureBlock() . Previously, it started at target process launch and only supported cold starts ( Iee85a , b/300651094 )
  • Avoid crashing when perfetto trace processor is slow to start ( I98841 , b/329145808 )

সংস্করণ 1.3.0-alpha03

১৭ এপ্রিল, ২০২৪

androidx.benchmark:benchmark-*:1.3.0-alpha03 is released. Version 1.3.0-alpha03 contains these commits .

নতুন বৈশিষ্ট্য

  • Adds public API PerfettoTraceProcessor.Session.queryMetrics APIs with JSON, textproto, and proto binary (undecoded) variants. These allow you to query metrics built into TraceProcessor ( I54d7f , b/304038382 )
  • Added profilerOutput to JSON output for easier tooling around profiling traces (eg perfetto, method traces). ( I05ddd , b/332604449 )
  • Added power tag to benchmark Perfetto Config. This captures, for example, wakelock tracepoints. ( Icfe44 , b/286551983 )
  • Added inst argument androidx.benchmark.profiling.skipWhenDurationRisksAnr , can be set to false to avoid skipping method traces when expected duration may cause an ANR - strongly recommended to avoid in CI runs.
  • Added experimental inst argument androidx.benchmark.profiling.perfCompare.enable , set this to true to run comparison timing between measurement and profiling phases. Useful in eg evaluating overhead of method tracing. ( I61fb4 , b/329146942 )

এপিআই পরিবর্তন

  • Changed TraceSectionMetric.Mode to sealed class to enable future expansion without breaking exhaustive when statements ( I71f7b )
  • Added TraceSectionMetric.Mode.Average and .Count , and reordered args so the more common argument (mode) was earlier in the arg list, reducing need for specifying parameter names. ( Ibf0b0 , b/315830077 , b/322167531 )
  • Renamed Metric.getResult to getMeasurements to match return type ( I42595 )

বাগ সংশোধন

  • Fix to ensure benchmarks use generated baseline profiles when automaticGenerationDuringBuild is off ( Ic144f , b/333024280 )
  • Fix BaselineProfile gradle plugin property overrides to enable baseline profile generation and benchmarking when customizing a nonMinified or benchmark build type. ( Ib8f05 , b/324837887 )
  • Fixed method traces flush in macrobenchmark, so that method traces should be fully captured and valid, even on slower devices. ( I6349a , b/329904950 )
  • Enable blocking start on Perfetto trace record to reduce risk of missing data at beginning of trace. Only supported on API 33+. ( Ie6e41 , b/310760059 )
  • Added a warning when Android Test Orchestrator is used in benchmark modules, as this will cause per-module output JSON files to be repeatedly overwritten. ( Ia1af6 , b/286899049 )
  • Force ',' (comma) thousands separators for consistency in Studio output, ignoring device locale ( I3e921 , b/313496656 )
  • TraceSectionMetric now supports slices created using Trace.{begin|end}AsyncSection . ( I91b32 , b/300434906 )
  • Added log.w / exception labels to all startup detection failures. This does not change current behavior (so some errors throw, and others silently fail to detect the startup), just makes it more understandable. Generally the ones that Log.w() and fail to report startup metrics are those where non-frame events are missing, exceptions are thrown when startup is detected except for frame timing information (from UI/RT slices). ( Id240f , b/329145809 )
  • Cancel background dexopt jobs before running a Macrobenchmark to reduce interference. ( I989ed )
  • Added frameCount measurement to FrameTimingMetric to aid in discovery of scenarios where measurements change because the number of frames produced changed (new animations added, invalidation issues fixed). ( I1e5aa )
  • Clarified that frameOverrunMs is the preferred metric for tracking when available in docs, and why. ( I18749 , b/329478323 )

সংস্করণ 1.3.0-alpha02

March 20, 2024

androidx.benchmark:benchmark-*:1.3.0-alpha02 is released. Version 1.3.0-alpha02 contains these commits .

নতুন বৈশিষ্ট্য

  • Experimental R8 support in microbench via embedded proguard rules. Note that this support is experimental, and requires AGP 8.3 for minification of library module tests. Use the following to enable R8 minification/optimization in your benchmark module's build.gradle , which should lead to a significant performance increase, depending on workload. ( I738a3 , b/184378053 )

    android {
        buildTypes.release.androidTest.enableMinification = true
    }
    

বাগ সংশোধন

  • Fixes method tracing warning to be on separate line from microbench output. ( I0455c , b/328308833 )

সংস্করণ 1.3.0-alpha01

২১শে ফেব্রুয়ারি, ২০২৪

androidx.benchmark:benchmark-*:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits.

এপিআই পরিবর্তন

  • Renamed MicrobenchmarkConfig boolean parameters to avoid unnecessary word 'should' ( Ia8f00 , b/303387299 )
  • Added BenchmarkRule.measureRepeatedOnMainThread so main thread benchmarks (eg ones touching Views or Compose UIs) can avoid triggering ANRs, especially during large suites in CI. ( I5c86d )
  • Added FrameTimingGfxInfoMetric , an experimental alternate implementation of FrameTimingMetric with measurements coming directly from the platform, rather than extracted from the Perfetto trace. ( I457cb , b/322232828 )
  • Add the ability to dump an ART profile during individual warmUp iterations. ( I17923 )
  • Several changes to TraceSectionMetric API:
    • Add Mode.Min , Mode.Max
    • Add label argument to override section name as metric label
    • Added mode name to output to clarify metric meaning
    • Changed default to sum, as most usage of this metric is for repeated events Be aware of this changes in CI usage, as it may create discontinuities or break parsing. ( Ic1e82 , b/301892382 , b/301955938 )

বাগ সংশোধন

  • Improved error message in baseline profile gradle plugin when specified managed device does not exist ( Idea2b , b/313803289 )
  • Fix for including library baseline profiles in AAR prior to AGP 8.3.0-alpha15 ( I1d2af , b/313992099 )
  • Fixed baseline and startup profile output url at the end of generation task ( I802e5 , b/313976958 )
  • Adjusted data source timeouts to attempt to fix java.lang.IllegalStateException: Failed to stop [ProcessPid(processName=perfetto, pid=...)] ( I8dc7d , b/323601788 )
  • Add two instrumentation arguments for overriding shader dropping behavior to workaround crashes when benchmarking apps without ProfileInstaller 1.3:
    • androidx.benchmark.dropShaders.enable=true/false : can be used to skip all shader dropping (including that done in StartupMode.Cold launches), esp when benchmarking apps that don't yet use profileinstaller 1.3
    • androidx.benchmark.dropShaders.throwOnFailure=true/false : can be used to tolerate failures when trying to drop shaders, for example when benchmarking apps without profileinstaller 1.3 ( I4f573 )
  • Skip method tracing on UI thread when expected to take longer than a few seconds, and cleanup method traces when throwing. ( I6e768 )
  • Throw when filenames are longer than 200 chars to avoid unclear crashes when writing or post-processing files. ( I4a5ab )
  • Fixes issue where unterminated frames at the beginning and end of the trace could be paired together, which would incorrectly report as a single extremely long frame. ( I39353 , b/322232828 )
  • Use --skip verification on API 30+ when reinstalling a package on API 30-33 to clear ART profiles on user builds. This helps bypass Play Protect warnings that cause failures on some class of devices. ( Ic9e36 )
  • Use am force-stop to kill apps when not a system app like System UI or Launcher. ( I5e028 )
  • Macrobenchmark now waits for 1 second for the target application to flush an ART profile (previously it waited for 500 ms ). ( I85a50 , b/316082056 )
  • Improve FrameTimingMetric error when frames aren't produced, and always output link to trace when failing metric parsing to assist in diagnosing problem. ( I956b9 )
  • Fixed crash in FrameTimingMetric failing to parse frame id, especially on certain OEM devices. ( Ia24bc , b/303823815 , b/306235276 )
  • Relaxed strictness of checks in FrameMetrics , and added more detail to error messages. ( Iadede )

সংস্করণ ১.২

Version 1.2.4

১৭ এপ্রিল, ২০২৪

androidx.benchmark:benchmark-*:1.2.4 is released. Version 1.2.4 contains these commits .

বাগ সংশোধন

  • Fixes baseline profile srcset not being set up in benchmark variants. Also fixes automaticGenerationDuringBuild in libraries causing a circular dependency. ( I28ab7 , b/333024280 )
  • Use am force-stop to kill apps when not a system app like System UI or Launcher. This fixes StartupMode.COLD benchmarks crashing from "Package $package must not be running prior to cold start!" due to process kill not fully succeeding. ( I5e028 )

Version 1.2.3

২৪ জানুয়ারী, ২০২৪

androidx.benchmark:benchmark-*:1.2.3 is released. Version 1.2.3 contains these commits.

বাগ সংশোধন

  • Removed exception from Baseline Profile Gradle Plugin when AGP version is 8.3.0 or higher.
  • Fix for including library baseline profiles in AAR prior to AGP 8.3.0-alpha15.

Version 1.2.2

December 1, 2023

androidx.benchmark:benchmark-*:1.2.2 is released. Version 1.2.2 contains these commits.

Baseline Profiles

সংস্করণ ১.২.১

১৫ নভেম্বর, ২০২৩

androidx.benchmark:benchmark-*:1.2.1 is released. Version 1.2.1 contains these commits.

নতুন বৈশিষ্ট্য

সংস্করণ ১.২.০

October 18, 2023

androidx.benchmark:benchmark-*:1.2.0 is released. Version 1.2.0 contains these commits.

Important changes since 1.1.0

Baseline Profiles

  • New Baseline Profile Gradle Plugin automates capturing and including baseline profiles in your test and build workflow.
  • BaselineProfileRule.collect now stable, a streamlined and simplified version of the previous experimental BaselineProfileRule.collectBaselineProfile API
    • Just specify packageName , and drive your app
  • For libraries generating baseline profiles, you can now filter the rules generated either in code ( BaselineProfileRule.collect argument), or even more simply in the gradle plugin
  • Fixes

Macrobenchmark

  • সংকলন
    • Macrobenchmark now correctly fully resets compilation state for each compile - this requires reinstalling the APK prior to Android 14, so benchmarking on Android 14+ is strongly recommended if you want to persist state (like user login) in what's being measured.
    • You can also work around this by controlling app compilation separately, and skipping compilation with CompilationMode.Ignore() or instrumentation argument
  • Instrumentation Arguments

    • Support for androidx.benchmark.dryRunMode.enable instrumentation argument, (already available in microbenchmark) for quicker validation runs (eg when creating the benchmark, or in presubmit)
    • Support for androidx.benchmark.profiling.mode=StackSampling and MethodTracing .
    • Added androidx.benchmark.enabledRules to allow runtime filtering baseline profile vs macrobenchmark rule tests
    • Added androidx.benchmark.perfettoSdkTracing.enable argument to enable tracing with tracing-perfetto, eg Compose recomposition tracing. Note that when used with StartupMode.COLD , timing will be significantly affected as the tracing library is loaded and enabled during app startup.
  • প্রয়োজনীয়তা

    • Macrobenchmark now requires ProfileInstaller 1.3.0 or greater in the target app, to enable profile capture / reset, and shader cache clearing.
  • New Experimental Metric APIs

  • Fixes

    • Fixed crashes when installing or extracting profiles from an app installed from multiple APKs (eg from app bundle).
    • Fixed FrameTimingMetric ignoring frames with inconsistent frame IDs (generally, frames during ripples on API 31+) ( I747d2 , b/279088460 )
    • Fixed parsing errors on traces > 64MB ( Ief831 , b/269949822 )
    • Clarified errors when device (especially emulator) OS image not correctly configured for tracing, or compilation
    • Skip battery level check for devices without battery (micro and macro)
    • Improved file output, with more clear errors for invalid output directories, and safer defaults
    • Improved stability of StartupMode.COLD by consistently dropping the shader cache (also exposed via MacrobenchmarkScope.dropShaderCache )
    • Fixed leanback fallback for startActivityAndWait .

Microbenchmark

  • বৈশিষ্ট্য
    • Profiling was moved to a separate phase, after other metrics, so one test run can display both accurate timing and profiling results.
  • Experimental APIs
    • Added experimental MicrobenchmarkConfig API for defining custom metrics and configuring tracing and profiling. Can be used to capture method traces, or capture tracepoints (but be aware of tracing overhead).
    • Added experimental APIs for controlling BenchmarkState separately from BenchmarkRule , without JUnit
    • Added experimental PerfettoTrace record to enable capturing Perfetto traces, with custom configuration, separate from benchmark APIs.
  • Fixes
    • Workaround missing leading whitespaces in Android Studio benchmark output.
    • Fix issue where warnings could fail to print in Android Studio benchmark output.
    • Fixed SampledProfiling crash on Android 13 (API 33) and higher.
    • Massively improved performance of dryRunMode by skipping IsolationActivity and Perfetto tracing (Up to 10x faster dry run mode on older OS versions).

Version 1.2.0-rc02

৬ অক্টোবর, ২০২৩

androidx.benchmark:benchmark-*:1.2.0-rc02 is released. Version 1.2.0-rc02 contains these commits.

বাগ সংশোধন

  • Fix Benchmark file output to no longer break BaselineProfile Plugin file copying. Files were generated and copied off device, but had been renamed such that the gradle plugin wouldn't see them. ( I8dbcc , b/303034735 , b/296453339 )
  • Clarified tracing-perfetto loading error messages when injecting from macrobenchmark module into target application.

সংস্করণ 1.2.0-rc01

২০ সেপ্টেম্বর, ২০২৩

androidx.benchmark:benchmark-*:1.2.0-rc01 is released. Version 1.2.0-rc01 contains these commits.

বাগ সংশোধন

  • An exception (with remedy instructions) is now thrown when Perfetto SDK tracing fails to initialize in a Benchmark. ( I6c878 , b/286228781 )
  • Fix OOM crash when converting ART method trace -> perfetto format. ( I106bd , b/296905344 )
  • (Macrobenchmark) Clarified method tracing label when linked in Studio test output, and fixed method tracing filenames to be unique on device/host, so they won't be overwritten when more than one benchmark is run. ( I08e65 , b/285912360 )
  • Ensures that the device is awake when capturing a baseline profile. ( I503fc )

Version 1.2.0-beta05

August 30, 2023

androidx.benchmark:benchmark-*:1.2.0-beta05 is released. Version 1.2.0-beta05 contains these commits.

নতুন বৈশিষ্ট্য

  • The Baseline Profile Gradle Plugin now supports Android Gradle Plugin 8.3. ( aosp/2715214 )

Version 1.2.0-beta04

২৩শে আগস্ট, ২০২৩

androidx.benchmark:benchmark-*:1.2.0-beta04 is released. Version 1.2.0-beta04 contains these commits.

নতুন বৈশিষ্ট্য

  • The Baseline Profiles Gradle plugin now supports Android Gradle Plugin 8.3. ( aosp/2715214 )

বাগ সংশোধন

  • Fix failures in writing / moving and pulling files (especially those from parameterized tests) by sanitizing output file names further, avoiding '=' and ':' in output file names. ( I759d8 )

Version 1.2.0-beta03

৯ আগস্ট, ২০২৩

androidx.benchmark:benchmark-*:1.2.0-beta03 is released. Version 1.2.0-beta03 contains these commits.

এপিআই পরিবর্তন

  • Added argument to filter TraceSectionMetric to only the target package, on by default ( Ia219b , b/292208786 )

বাগ সংশোধন

  • Renamed fullTracing.enable instrumentation argument to perfettoSdkTracing.enable for consistency with artifact name, and other references. fullTracing.enable will continue to work as a fallback. ( I7cc00 )
  • Benchmark library internal tracepoints (including microbenchmark loop/phase tracing) will now show up in Studio system trace viewer, and nest under the correct process in Perfetto. ( I6b2e7 , b/293510459 )
  • Removed macrobenchmark NOT-PROFILEABLE error on API 31+, and skip profileable check on eng/userdebug rooted devices. ( I2abac , b/291722507 )
  • When using Dex Layout Optimizations, startup profile rules are also now considered as baseline profile rules. ( aosp/2684246 , b/293889189 )

Version 1.2.0-beta02

২৬ জুলাই, ২০২৩

androidx.benchmark:benchmark-*:1.2.0-beta02 is released. Version 1.2.0-beta02 contains these commits.

এপিআই পরিবর্তন

  • Added experimental APIs for microbench custom metrics and configuration (eg profiler, and tracing). ( I86101 , b/291820856 )

বাগ সংশোধন

  • Report error in macrobench when OS is misconfigured for tracing, as was recently fixed in API 26/28 ARM64 emulators. ( I0a328 , b/282191686 )
  • Added detail to compilation reset failure to suggest updating emulator, as some emulators have recently fixed this issue. ( I8c815 , b/282191686 )
  • Make androidx.test.uiautomator:uiautomator:2.2.0 an api instead of an implementation dependency. ( I1981e )

সংস্করণ 1.2.0-beta01

১৮ জুলাই, ২০২৩

androidx.benchmark:benchmark-*:1.2.0-beta01 is released. Version 1.2.0-beta01 contains these commits.

বাগ সংশোধন

  • Fix warnings being sometimes suppressed in Benchmark output in Studio, and workaround leading whitespaces from Benchmark output not showing up in Studio ( Ia61d0 , b/227205461 , b/286306579 , b/285912360 )
  • Fixed comment for FrameTimingMetric . The submetric is named frameDurationCpuMs . ( Ib097f , b/288830934 ).

Version 1.2.0-alpha16

২১ জুন, ২০২৩

androidx.benchmark:benchmark-*:1.2.0-alpha16 is released. Version 1.2.0-alpha16 contains these commits.

এপিআই পরিবর্তন

  • BaselineProfileRule.collectBaselineProfile() API has been renamed to BaselineProfileRule.collect() . ( I4b665 )

বাগ সংশোধন

  • Macrobenchmark support for androidx.benchmark.profiling.mode = MethodTracing . ( I7ad37 , b/285912360 )
  • Microbenchmark profiling moved to a separate phase, so it occurs in sequence after measurement, instead of replacing it. MethodTracing trace sections are also now included in the captured Perfetto trace, if present. ( I9f657 , b/285014599 )
  • Add count measurement to TraceSectionMetric with Mode.Sum . ( Ic121a , b/264398606 )

Version 1.2.0-alpha15

June 7, 2023

androidx.benchmark:benchmark-*:1.2.0-alpha15 is released. Version 1.2.0-alpha15 contains these commits.

নতুন বৈশিষ্ট্য

  • Added experimental MemoryUsageMetric for tracking memory usage of a target application. ( I56453 , b/133147125 , b/281749311 )
  • Add support for fully custom Perfetto configs with PerfettoTrace.record ( If9d75 , b/280460183 )
  • Added property to skip baseline profile generation. Usage: ./gradlew assemble -Pandroidx.baselineprofile.skipgeneration . ( I37fda , b/283447020 )

এপিআই পরিবর্তন

  • The collectBaselineProfile API always generates stable baseline profiles. The collectStableBaselineProfile API has been removed and collectBaselineProfile should be used instead. ( I17262 , b/281078707 )
  • Changed BaselineProfileRule 's filterPredicate arg to non-null, with a equivalent default value so that the default filter behavior is more clear in docs. ( I3816e )

বাগ সংশোধন

  • Disable IsolationActivity and Perfetto tracing in dryRunMode to significantly improve performance, as these were majority of runtime. ( Ie4f7d )
  • Support for call stack sampling in Macrobenchmarks using instrumentation test arguments androidx.benchmark.profiling.mode=StackSampling and androidx.benchmark.profiling.sampleFrequency . ( I1d13b , b/282188489 )
  • Fixes crash when dropping shaders on Android U (API 34), as well as on emulators. ( I031ca , b/274314544 )

Version 1.2.0-alpha14

May 3, 2023

androidx.benchmark:benchmark-*:1.2.0-alpha14 is released. Version 1.2.0-alpha14 contains these commits.

বাগ সংশোধন

  • Fix FrameTimingMetric ignoring frames with inconsistent frame IDs. This would cause some animations on recent platform versions (API 31+) to ignore many frames while RenderThread was animating (eg during a ripple). ( I747d2 , b/279088460 )
  • Fixed trace processor parsing for traces larger than 64Mb. ( Ief831 , b/269949822 )
  • Fixed baseline profile generation on Android U failing because of the different output of pm dump-profiles command. ( Id1392 , b/277645214 )
  • Fix GPU clock locking script to compare strings correctly ( I53e54 , b/213935715 )

Version 1.2.0-alpha13

৫ এপ্রিল, ২০২৩

androidx.benchmark:benchmark-*:1.2.0-alpha13 is released. Version 1.2.0-alpha13 contains these commits.

এপিআই পরিবর্তন

  • Added profile type parameter when generating baseline profiles to support upcoming startup profile feature ( Ie20d7 , b/275093123 )
  • Added new experimental TraceMetric API for defining fully custom metrics based on content of a Perfetto trace. ( I4ce31 , b/219851406 )
  • Add an experimental metric to determine the number of page faults during a benchmark. ( I48db0 )

Version 1.2.0-alpha12

২২ মার্চ, ২০২৩

androidx.benchmark:benchmark-*:1.2.0-alpha12 is released. Version 1.2.0-alpha12 contains these commits.

নতুন বৈশিষ্ট্য

  • The new baseline profile gradle plugin is released in alpha version, making it easier to generate a baseline profile and simplifying the developer workflow.

এপিআই পরিবর্তন

  • Removed Perfetto tracing support on API 21 and 22, which includes both Microbenchmarks and the experimental PerfettoTrace APIs. Prior to this version, UiAutomation connections were unreliable on some devices. ( I78e8c )
  • Added public experimental API for PerfettoTraceProcessor to enable parsing trace content. This is a step toward fully custom metrics based on Perfetto trace data. ( I2659e , b/219851406 )

Version 1.2.0-alpha11

৮ মার্চ, ২০২৩

androidx.benchmark:benchmark-*:1.2.0-alpha11 is released. Version 1.2.0-alpha11 contains these commits.

বাগ সংশোধন

  • Fixed crashes in MacrobenchmarkRule and BaselineProfileRule when reinstalling or extracting profiles from an app bundle with multiple APKs. ( I0d8c8 , b/270587281 )

Version 1.2.0-alpha10

২২ ফেব্রুয়ারী, ২০২৩

androidx.benchmark:benchmark-*:1.2.0-alpha10 is released. Version 1.2.0-alpha10 contains these commits.

নতুন বৈশিষ্ট্য

  • On Android 14+, Macrobenchmark no longer reinstalls target applications to reset compilation state, thanks to a new platform feature. Previously it was necessary to have a rooted device, or to deal with all application state (eg user login) being removed before each benchmark runs. ( I9b08c , b/249143766 )

বাগ সংশোধন

  • Fix DryRunMode to no longer crash with empty profile, due to compilation skipping. Instead, it runs a single iteration and extracts the profile to ensure something is captured. ( I2f05d , b/266403227 )
  • Fix PowerMetric crash when checking for powerstats presence on old API levels. ( 5faaf9 , b/268253898 )

Version 1.2.0-alpha09

১১ জানুয়ারী, ২০২৩

androidx.benchmark:benchmark-*:1.2.0-alpha09 is released. Version 1.2.0-alpha09 contains these commits.

বাগ সংশোধন

  • Enabled passing None to androidx.benchmark.enabledRules instrumentation arg to disable all benchmarks / baseline profile generation. ( I3d7fd , b/258671856 )
  • Fix PerfettoTrace capture in app modules (ie non-self-instrumenting test APKs) ( I12cfc )
  • Fixed baseline profile adb pull argument order in Studio output ( I958d1 , b/261781624 )
  • Arm emulator api 33 is now correctly recognized as such when trying to run a macrobenchmark and will correctly print the warning. ( 69133b , b/262209591 )
  • Skip battery level check on devices without battery in Macrobenchmark ( fe4114 , b/232448937 )

Version 1.2.0-alpha08

৭ ডিসেম্বর, ২০২২

androidx.benchmark:benchmark-*:1.2.0-alpha08 is released. Version 1.2.0-alpha08 contains these commits.

এপিআই পরিবর্তন

  • Added experimental new APIs PerfettoTrace.record {} and PerfettoTraceRule to capture Perfetto traces (also known as System Traces) as part of a test, to inspect test behavior and performance. ( I3ba16 )
  • BaselineProfileRule now accepts a filter predicate instead of a list of package prefixes. This gives the test full control on filtering. ( I93240 )
  • Add an experimental API BaselineProfileRule.collectStableBaselineProfile which waits until a baseline profile is stable for N iterations. ( I923f3 )
  • Add the ability to specify an output file name prefix when generating baseline profiles using BaselineProfileRule . ( I7b59f , b/260318655 )

বাগ সংশোধন

  • Improve safety of file output writing, which should prevent output files from silently not being written / appended, especially on API 21/22. ( If8c44 , b/227510293 )
  • Fix simpleperf trace output to create and place the file correctly. This should also more generally fix issues where a file is unsuccessfully pulled by gradle. ( I12a1c , b/259424099 )
  • Improve profileinstaller error message printed when profileinstaller is too old. This now tells you to update profileinstaller version (1.2.1) for measuring baseline profiles on API 31 through 33, instead of saying it's not supported. ( Ia517f , b/253519888 )
  • Fix several shell command failures onerror message Print needed API <=23, including failed perfetto capture binary setup and trace capture failures ( Ib6b87 , b/258863685 )
  • Automatically sort generated profile rules to minimize the number of changes as they change over time (when checking-in profile rules into source control). ( Ie2509 )
  • Fixed crash on unrooted builds below Android 13 (API 33) with message Expected no stderr from echo 3 > /proc/sys/vm/drop_caches ( I6c245 , b/259508183 )

Known Issues - MacrobenchmarkScope.dropShaderCache() may crash due to a missing broadcast registry in profileinstaller manifest, which has not yet been released. ( I5c728 , b/258619948 ) To workaround the issue in profileinstaller:1.3.0-alpha02 , add the following to your application's (not your benchmark's) AndroidManifest.xml:

  <!-- workaround bug in profileinstaller 1.3.0-alpha02, remove when updating to alpha03+ -->
  <receiver
    android:name="androidx.profileinstaller.ProfileInstallReceiver"
    android:permission="android.permission.DUMP"
    android:exported="true">
    <intent-filter>
        <action android:name="androidx.profileinstaller.action.BENCHMARK_OPERATION" />
    </intent-filter>
  </receiver>

Version 1.2.0-alpha07

৯ নভেম্বর, ২০২২

androidx.benchmark:benchmark-*:1.2.0-alpha07 is released. Version 1.2.0-alpha07 contains these commits.

এপিআই পরিবর্তন

  • Adds PowerMetric API for measuring energy and power in Macrobenchmarks. ( Ife601 , b/220183779 )
  • Fixed MacrobenchmarkScope.dropShaderCache() to actually drop the shader cache. This removes roughly 20ms of noise from StartupMode.COLD benchmarks, as shaders are now consistently cleared each iteration. Previously, Partial compilation using warmup iterations would report incorrectly fast numbers, as shader caching was more likely to happen during warmup. This fix requires either a rooted device, or using profileinstaller:1.3.0-alpha02 in the target app. For ProfileInstaller library's API changes, please refer to ProfileInstaller 1.30-alpha02 page. ( Ia5171 , b/231455742 )
  • Added TraceSectionMode("label", Mode.Sum) , allowing measurement of total time spent on multiple trace sections with the same label. For instance, TraceSectionMetric("inflate", Mode.Sum) will report a metric inflateMs for the total time in a macrobenchmark spent on inflation. Also removed API 29 requirement, as TraceSectionMetric works together with androidx.tracing.Trace back to lower API levels, with the use of forceEnableAppTracing within the target app. ( Id7b68 , b/231455742 )

বাগ সংশোধন

  • Improved safety of all internal shell commands by validating all output/errors. ( I5984d , b/255402908 , b/253094958 )
  • Specify device in baseline profile adb pull command, so the pull command can be simply copied if multiple devices are connected (up to one emulator) ( I6ac6c , b/223359380 )
  • Add error if macrobenchmark test apk isn't set up as self-instrumenting. This error prevents macrobenchmarking from within the target app's process. In process, macrobench wouldn't be able to compile/kill/cold start the app, or control its own permissions ( I4279b )
  • Fixed an issue in measureRepeated() where StartupMode.COLD wouldn't kill the target process after setupBlock . Now setupBlock interacting with the app will not leave the app process running, and an invalid cold start measurement. ( I8ebb7 )

Version 1.2.0-alpha06

২৪ অক্টোবর, ২০২২

androidx.benchmark:benchmark-*:1.2.0-alpha06 is released. Version 1.2.0-alpha06 contains these commits.

এপিআই পরিবর্তন

  • BaselineProfileRule no longer requires root on Android 13 (API 33), and is no longer experimental. ( Ie0a7d , b/250083467 , b/253094958 )
    • This change also fixes how profiles from an app are flushed to disk on unrooted devices, but requires updating the target app's profileinstaller dependency.
    • To use BaselineProfileRule or CompilationMode.Partial(warmupIterations) on an unrooted device, you must also update your target app to use androidx.profileinstaller.profileinstaller:1.3.0-alpha01 . This enables flushing the profile to disk correctly, so that it can be compiled/extracted.

বাগ সংশোধন

Version 1.2.0-alpha05

৫ অক্টোবর, ২০২২

androidx.benchmark:benchmark-*:1.2.0-alpha05 is released. Version 1.2.0-alpha05 contains these commits.

বাগ সংশোধন

  • Fix frame breakdown in Studio system trace viewer for benchmark captured traces ( I3f3ae , b/239677443 )
  • Correct FrameTimingMetric to list FrameOverrun as requiring API 31 instead of 29 ( I716dd , b/220702554 )
  • Set iteration in BaselineProfileRule , and throw clearly if target package not installed (was already done for MacrobenchmarkRule). ( Ic09a3 , b/227991471 )

Version 1.2.0-alpha04

২১ সেপ্টেম্বর, ২০২২

androidx.benchmark:benchmark-*:1.2.0-alpha04 is released. Version 1.2.0-alpha04 contains these commits.

নতুন বৈশিষ্ট্য

  • Add support for dryRunMode.enable instrumentation argument to macrobenchmark (already available in micro) for faster local development, and validating app automation (eg in presubmit). This overrides iterations to 1, skips compilation, suppresses all configuration errors , and disables measurement .json file output. ( Ib51b4 , b/175149857 )

    On Gradle command line:

    ./gradlew macrobenchmark:cC -P android.testInstrumentationRunnerArguments.androidx.benchmark.dryRunMode.enable=true
    

    In build.gradle:

    android {
        defaultConfig {
            testInstrumentationRunnerArgument 'androidx.benchmark.dryRunMode.enable', 'true'
        }
    }
    

বাগ সংশোধন

  • Fixed StartupTimingMetric to no longer require measured Activities to be launched through MacrobenchmarkScope.startActivityAndWait() . This means the metric can pick up launches from eg notifications, Context.startActivity() , in-app Activity based navigation, or shell commands. ( Ia2de6 , b/245414235 )
  • Fix bug where startActivityAndWait would timeout trying to wait for launch completion on emulators by reducing strictness of frame detection. ( Ibe2c6 , b/244594339 , b/228946895 )

Version 1.2.0-alpha03

৭ সেপ্টেম্বর, ২০২২

androidx.benchmark:benchmark-*:1.2.0-alpha03 is released. Version 1.2.0-alpha03 contains these commits.

নতুন বৈশিষ্ট্য

  • Added experimental APIs for using BenchmarkState independently, separate from BenchmarkRule / JUnit4 . ( Id478f , b/228489614 )

বাগ সংশোধন

সংস্করণ 1.2.0-alpha02

২৪ আগস্ট, ২০২২

androidx.benchmark:benchmark-*:1.2.0-alpha02 is released. Version 1.2.0-alpha02 contains these commits.

এপিআই পরিবর্তন

  • Default to am force stop for MacrobenchmarkScope.killProcess() , even when rooted, except during Baseline Profile generation. This can be overridden with an optional boolean argument. ( 02cce9 , b/241214097 )

বাগ সংশোধন

সংস্করণ 1.2.0-alpha01

২৭ জুলাই, ২০২২

androidx.benchmark:benchmark-*:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits.

নতুন বৈশিষ্ট্য

  • New tracing-perfetto-common component allowing tooling to enable Perfetto SDK tracing in an app that exposes it ( I2cc7f )
  • Added androidx.benchmark.enabledRules instrumentation argument to enable filtering macrobenchmark runs to just benchmarks, or just baseline profile generation. Pass in 'Macrobenchmark', or 'BaselineProfile' to just run one type of test, eg when just generating BaselineProfiles on an emulator. Comma-separated list also Supported. ( I756b7 , b/230371561 )

    Eg in Your macrobenchmark's build.gradle:

    android {
        defaultConfig {
            testInstrumentationRunnerArgument 'androidx.benchmark.enabledRules', 'BaselineProfile'
        }
    }
    

    Or from the Gradle command line:

    ./gradlew macrobenchmark:cC -P android.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
    

এপিআই পরিবর্তন

  • Added new PowerMetric for measuring energy and power tasks in benchmarks. ( I9f39b , b/220183779 )
  • Added a new compilation mode CompilationMode.Ignore to skip profile reset and compilation. ( Ibbcf8 , b/230453509 )
  • Added a new parameter to BaselineProfileRule#collectBaselineProfile to filter output file by package names ( If7338 , b/220146561 )
  • Enables developer to discharge device to measure power drain. ( I6a6cb )
  • Added the ability to clear shader cache in MacrobenchmarkScope . ( I32122 )
  • Enables developer to configure display of metric type and detail desired subsystem categories. ( I810c9 )
  • Previously an UnsupportedOperationException was thrown in the benchmark if run on an unsupported device. Now UOE only occurs if the metric is used on the unsupported device (ie: PowerMetric.configure ). ( I5cf20 , b/227229375 )
  • Added TotalPowerMetric and TotalEnergyMetric for measuring total power and energy in each system category in macrobenchmarks. ( I3b26b , b/224557371 )

বাগ সংশোধন

  • Fixed an issue where compiled methods were not correctly being reset between each macrobenchmark on unrooted builds. This unfortunately requires reinstalling the apk each iteration, which will clear application data for each macrobenchmark. ( I31c74 , b/230665435 )
  • Fix trace recording crash on API 21/22 ( If7fd6 , b/227509388 , b/227510293 , b/227512788 )
  • Overhaul activity launch completion detection to fix 'Unable to read any metrics' exception in startup macrobenchmarks. ( Ia517c )

Version 1.1.1

Version 1.1.1

৯ নভেম্বর, ২০২২

androidx.benchmark:benchmark-*:1.1.1 is released. Version 1.1.1 contains these commits.

বাগ সংশোধন

  • Fixes android.system.ErrnoException: open failed: EACCES which would occur on some Android11 (API 30)+ devices. This is a cherry-pick of a fix from 1.2.0-alpha01 . ( aosp/2072249 )

সংস্করণ ১.১.০

সংস্করণ ১.১.০

১৫ জুন, ২০২২

androidx.benchmark:benchmark-*:1.1.0 is released. Version 1.1.0 contains these commits.

  • This version is identical to androidx.benchmark:benchmark-*:1.1.0-rc03 .

Important changes since 1.0.0

Version 1.1.0-rc03

১ জুন, ২০২২

androidx.benchmark:benchmark-*:1.1.0-rc03 is released. Version 1.1.0-rc03 contains these commits.

বাগ সংশোধন

Version 1.1.0-rc02

১১ মে, ২০২২

androidx.benchmark:benchmark-*:1.1.0-rc02 is released. Version 1.1.0-rc02 contains these commits.

  • Note that this release includes a behavior change, as apps are now fully reinstalled in between each benchmark to ensure accurate measurements.

Bug Fixes/Behavior Changes

  • Fixed an issue where app compilation was not correctly reset between macrobenchmarks, and not reset at all on unrooted builds. This fixes many cases where running multiple tests would result in CompilationMode having little to no effect on measurements. To workaround this problem, the target app is now fully reinstalling each test method, which will clear application data between each macrobenchmark. ( I31c74 , b/230665435 )

  • As this prevents apps from setting up state before tests, it is now possible to skip compilation / reinstallation to enable working around this. You can for example fully compile the target with a shell command cmd package compile -f -m speed <package> , and then bypass macrobenchmark's compilation step.

    Eg in Your macrobenchmark's build.gradle:

    android {
        defaultConfig {
            testInstrumentationRunnerArgument 'androidx.benchmark.compilation.enabled, 'false'
        }
    }
    

    Or from the Gradle command line:

    ./gradlew macrobenchmark:cC -P android.testInstrumentationRunnerArguments.androidx.benchmark.compilation.enabled=false
    
  • Made it possible to share a module between macrobenchmarks and baseline profile generating tests by adding androidx.benchmark.enabledRules instrumentation argument. Pass in 'Macrobenchmark', or 'BaselineProfile' to just run one type of test, eg when generating BaselineProfiles on an emulator. ( I756b7 , b/230371561 )

    Eg in Your macrobenchmark's build.gradle:

    android {
        defaultConfig {
            testInstrumentationRunnerArgument 'androidx.benchmark.enabledRules', 'BaselineProfile'
        }
    }
    

    Or from the Gradle command line:

    ./gradlew macrobenchmark:cC -P android.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
    

Version 1.1.0-rc01

২০ এপ্রিল, ২০২২

androidx.benchmark:benchmark-*:1.1.0-rc01 is released. Version 1.1.0-rc01 contains these commits.

বাগ সংশোধন

  • Baseline profile output links in Android Studio now use a unique file name. This way the output always reflects the latest results of using a BaselineProfileRule . ( aosp/2057008 , b/228203086 )

Version 1.1.0-beta06

৬ এপ্রিল, ২০২২

androidx.benchmark:benchmark-*:1.1.0-beta06 is released. Version 1.1.0-beta06 contains these commits.

বাগ সংশোধন

  • Fix trace recording crash on API 21/22 ( If7fd6 , b/227509388 )
  • Overhaul activity launch completion detection to fix 'Unable to read any metrics' exception in startup macrobenchmarks. ( Ia517c )
  • Fix startup metrics for Macrobenchmarks when CompilationMode.None() is used. Before this change, CompilationMode.Partial() would appear to be slower than Compilation.None() . ( 611ac9 ).

Version 1.1.0-beta05

২৩ মার্চ, ২০২২

androidx.benchmark:benchmark-*:1.1.0-beta05 is released. Version 1.1.0-beta05 contains these commits.

বাগ সংশোধন

Version 1.1.0-beta04

February 23, 2022

androidx.benchmark:benchmark-*:1.1.0-beta04 is released. Version 1.1.0-beta04 contains these commits.

বাগ সংশোধন

  • Fix missing metrics on Android 10, and NoSuchElementException caused by process names not being captured correctly in traces. ( Ib4c17 , b/218668335 )

  • Use PowerManager for thermal throttling detection on Q (API 29) and higher. This significantly reduces frequency of false positives in thermal throttling detection (benchmark retry after 90 second cooldown), and speeds up benchmarks significantly on user builds. It also provides throttle detection even when clocks are locked (if they're locked too high for the device's physical environment). ( I9c027 , b/217497678 , b/131755853 )

  • Filter simpleperf sampled profiling to measureRepeated thread only to simplify inspection ( Ic3e12 , b/217501939 )

  • Support metrics from named UI subprocesses in multi-process apps ( Ice6c0 , b/215988434 )

  • Filter Baseline Profile rules to target Android 9 (SDK 28). aosp/1980331 b/216508418

  • Skip Profile Installation when using Compilation.None() . Additionally, report warnings when the app is using an older version of androidx.profileinstaller and Android Gradle Plugin. aosp/1977029

Version 1.1.0-beta03

৯ ফেব্রুয়ারী, ২০২২

androidx.benchmark:benchmark-*:1.1.0-beta03 is released. Version 1.1.0-beta03 contains these commits.

এপিআই পরিবর্তন

  • Added AudioUnderrunMetric into macrobenchmark library under experimental flag to allow detection of audio underruns ( Ib5972 )
  • BaselineProfileRule no longer accepts a setup block as this functioned the same as the profileBlock . ( Ic7dfe , b/215536447 )

    For eg

    @Test
    fun collectBaselineProfile() {
        baselineRule.collectBaselineProfile(
            packageName = PACKAGE_NAME,
            setupBlock = {
                startActivityAndWait()
            },
            profileBlock = {
                // ...
            }
        )
    }
    
    @Test
    fun collectBaselineProfile() {
        baselineRule.collectBaselineProfile(
            packageName = PACKAGE_NAME,
            profileBlock = {
                startActivityAndWait()
                // ...
            }
        )
    }
    

বাগ সংশোধন

  • Fixed issue where microbench profiler traces would fail to be updated in subsequent runs when linked in Studio output ( I5ae4d , b/214917025 )
  • Prevent compilation shell commands on API 23 ( Ice380 )
  • Renamed FrameCpuTime -> FrameDurationCpu , FrameUiTime -> FrameDurationUi to clarify these are durations, not timestamps, and to match prefixes. ( I0eba3 , b/216337830 )

সংস্করণ 1.1.0-beta02

২৬ জানুয়ারী, ২০২২

androidx.benchmark:benchmark-*:1.1.0-beta02 is released. Version 1.1.0-beta02 contains these commits.

বাগ সংশোধন

  • Microbenchmark Stack Sampling / Method Tracing Profile results are now linked in Studio output, similar to other profiling outputs, and do not suppress the allocation metric. ( Idcb65 , b/214440748 , b/214253245 )
  • BaselineProfileRule now prints the adb pull command in logcat and Studio output for pulling generated BaselineProfile text file. ( f08811 )

সংস্করণ 1.1.0-beta01

১২ জানুয়ারী, ২০২২

androidx.benchmark:benchmark-*:1.1.0-beta01 is released. Version 1.1.0-beta01 contains these commits.

বাগ সংশোধন

  • Fixes profiler argument enable being ignored. ( I37373 , b/210619998 )
  • Removed deprecated CompliationModes ( I98186 , b/213467659 )
  • Switched baseline profile arg of CompilationMode.Partial to enum for clarity. ( Id67ea )

Version 1.1.0-alpha13

১৫ ডিসেম্বর, ২০২১

androidx.benchmark:benchmark-*:1.1.0-alpha13 is released. Version 1.1.0-alpha13 contains these commits.

এপিআই পরিবর্তন

  • Add low-overhead System Tracing to microbench output on Android Q (API 29+). Note that this does not currently capture custom tracing (via android.os.Trace or androidx.tracing Jetpack APIs) to avoid affecting results. This tracing should be useful in diagnosing instability, especially from sources outside the benchmark. ( I298be , b/205636583 , b/145598917 )
  • Clarify CompilationModes into three classes - Full, None, Partial. Previously they were inconsistently named after compilation arguments (which we now treat as implementation details) and features. This makes the tradeoffs, potential combinations, and behavior across platform versions more clear. ( I3d7bf , b/207132597 )
  • Setup and measure are now always in pairs, in order. You can now query the package name and iteration (though the iteration may be null in certain warmup scenarios). ( Id3b68 , b/208357448 , b/208369635 )

বাগ সংশোধন

  • Fixed CompilationMode.Speed incorrectly treated as None ( I01137 )

Version 1.1.0-alpha12

১৭ নভেম্বর, ২০২১

androidx.benchmark:benchmark-*:1.1.0-alpha12 is released. Version 1.1.0-alpha12 contains these commits.

নতুন বৈশিষ্ট্য

  • Add experimental TraceSectionMetric for custom trace-based timing measurements. ( I99db1 , b/204572664 )

বাগ সংশোধন

  • Wake device each iteration, to ensure UI can be tested - requires lockscreen is disabled. ( Ibfa28 , b/180963442 )
  • Fixes multiple crashes in StackSampling profiling mode on emulators and non-rooted devices ( Icdbda , b/202719335 )
  • Removed 0.5 second sleep at the end of each iteration - if you see missing metrics with this change, please file a bug. ( Iff6aa )
  • Reduce chances of dropped data, and lower memory overhead from tracing ( Id2544 , b/199324831 , b/204448861 )
  • Reduce trace size by ~40% by switching to compact sched storage format. ( Id5fb6 , b/199324831 )
  • Updated implementations of startup metrics to always end at end of renderthread. This will be more contistent across platform versions, and more closely map to in-app measurements. ( Ic6b55 )

Version 1.1.0-alpha11

৩ নভেম্বর, ২০২১

androidx.benchmark:benchmark-*:1.1.0-alpha11 is released. Version 1.1.0-alpha11 contains these commits.

এপিআই পরিবর্তন

  • Macrobenchmark now has a minSdkVersion of 23 . ( If2655 )
  • Adds a new experimental BaselineProfileRule which is capable of generating baseline profiles for app's critical user journey. Detailed documentation to follow. ( Ibbefa , b/203692160 )
  • Removes measureRepeated interface variant, which was added for java callers, as it caused ambiguity in completing/resolving the method. Java callers will again need to return Unit.Instance from measureRepeated. If this is an inconvenience, please file a bug, we can revisit this in a future version. ( Ifb23e , b/204331495 )

Version 1.1.0-alpha10

২৭ অক্টোবর, ২০২১

androidx.benchmark:benchmark-*:1.1.0-alpha10 is released. Version 1.1.0-alpha10 contains these commits.

এপিআই পরিবর্তন

  • Backport StartupTimingMetric to work back to API 23. This new implementation also better handles reportFullyDrawn() to wait until corresponding content has been rendered. ( If3ac9 , b/183129298 )
  • Added JvmOverloads to multiple MacrobenchmarkScope methods for Java callers. ( I644fe , b/184546459 )
  • Provide alternative MacrobenchmarkRule.measureRepeated function that uses a Consumer<MacrobenchmarkScope> for idiomatic usage in Java language. ( If74ab , b/184546459 )

বাগ সংশোধন

  • Fix for traces not starting early enough, and missing metric data. This is expected to fix "Unable to read any metrics during benchmark" exceptions that were caused by the library itself. ( I6dfcb , b/193827052 , b/200302931 )
  • FrameNegativeSlack has been renamed to FrameOverrun to clarify its meaning - how much the frame went over its time budget. ( I6c2aa , b/203008701 )

Version 1.1.0-alpha09

১৩ অক্টোবর, ২০২১

androidx.benchmark:benchmark-*:1.1.0-alpha09 is released. Version 1.1.0-alpha09 contains these commits.

বাগ সংশোধন

Version 1.1.0-alpha08

২৯ সেপ্টেম্বর, ২০২১

androidx.benchmark:benchmark-*:1.1.0-alpha08 is released. Version 1.1.0-alpha08 contains these commits.

এপিআই পরিবর্তন

  • Enable scrolling macrobenchmarks to run back to API 23 ( If39c2 , b/183129298 )
  • Add new type of sampled metric to UI and JSON output, focused on percentiles of multiple samples per iteration. ( I56247 , b/199940612 )
  • Switch to floating point metrics throughout the benchmark libraries (truncated in the Studio UI). ( I69249 , b/197008210 )

সংস্করণ 1.1.0-alpha07

১ সেপ্টেম্বর, ২০২১

androidx.benchmark:benchmark-*:1.1.0-alpha07 is released. Version 1.1.0-alpha07 contains these commits.

এপিআই পরিবর্তন

  • Raised min API to 21 to reflect the intended lowest API level to be supported in the future. Current min API supported continues to be conveyed via RequiredApi(), and is currently 29 ( I440d6 , b/183129298 )

বাগ সংশোধন

  • Fixes ProfileInstaller to make it easier for apps using baseline profiles to run MacroBenchmarks using CompilationMode.BaselineProfile . ( I42657 , b/196074999 ) NOTE: requires also updating to androidx.profileinstaller:profileinstaller:1.1.0-alpha04 or greater.
  • StartupMode.COLD + CompilationMode.None benchmarks are now more stable. ( I770cd , b/196074999 )

সংস্করণ 1.1.0-alpha06

১৮ আগস্ট, ২০২১

androidx.benchmark:benchmark-*:1.1.0-alpha06 is released. Version 1.1.0-alpha06 contains these commits.

এপিআই পরিবর্তন

  • Added androidx.benchmark.iterations instrumentation argument to allow manual overriding of iteration count when testing/profiling locally. ( 6188be , b/194137879 )

বাগ সংশোধন

  • Switched to Simpleperf as default sampling profiler on API 29+. ( Ic4b34 , b/158303822 )

পরিচিত সমস্যা

  • CompilationMode.BaselineProfile is a work in progress. Avoid using it to determine how good a profile is for now.

সংস্করণ 1.1.0-alpha05

August 4, 2021

androidx.benchmark:benchmark-*:1.1.0-alpha05 is released. Version 1.1.0-alpha05 contains these commits.

1.1.0-alpha04 was cancelled before release due to a sporatic crash. b/193827052

এপিআই পরিবর্তন

  • Switched startActivityAndWait to invoke launch via am start , which reduces the time of each measurement iteration by approximately 5 seconds, at the cost of no longer supporting intent parcelables. ( I5a6f5 , b/192009149

বাগ সংশোধন

  • Reduce aggressiveness of thermal throttle detection, and recompute baseline if throttles are detected frequently. ( I7327b )
  • Fixes FrameTimingMetric to work on Android S beta ( Ib60cc , b/193260119 )
  • Use an EmptyActivity to bring the target app out of a force-stopped state to better support CompilationMode.BaselineProfile . ( Id7cac , b/192084204 )
  • Changed trace file extension to .perfetto-trace to match platform standard. ( I4c236 , b/174663039 )
  • StartupTimingMetric now outputs the "fullyDrawnMs" metric to measure time until your application has completed rendering. To define this metric for your app, call Activity.reportFullyDrawn when your initial content is ready, such as when your initial list items are loaded from DB or network. (reportFullyDrawn method available without build version checks on ComponentActivity). Note that your test must run long enough to capture the metric (startActivityAndWait doesn't wait for reportFullyDrawn). ( If1141 , b/179176560 )
  • Reduce cost of appending Ui metadata to traces by 50+ ms ( Ic8390 , b/193923003 )
  • Drastically increased polling frequency when stopping tracing, which can reduce eg startup benchmark runtime by 30+% ( Idfbc1 , b/193723768 )

সংস্করণ 1.1.0-alpha03

১৬ জুন, ২০২১

androidx.benchmark:benchmark-*:1.1.0-alpha03 is released. Version 1.1.0-alpha03 contains these commits.

নতুন বৈশিষ্ট্য

বাগ সংশোধন

  • The sample Gradle code for suppressing benchmark errors has been updated to use a non-deprecated API with a syntax that also supports .gradle.kts users.

    Eg,

    testInstrumentationRunnerArguments["androidx.benchmark.suppressErrors"] = "EMULATOR,LOW-BATTERY"
    

সংস্করণ 1.1.0-alpha02

May 18, 2021

Benchmark version 1.1.0-alpha02 brings a big component to benchmarking - Macrobenchmark. In addition to benchmark allowing you to measure CPU loops, macrobenchmark allows you to measure whole-app interactions like startup and scrolling, and capture traces. For more information see the library documentation .

androidx.benchmark:benchmark-*:1.1.0-alpha02 is released. Version 1.1.0-alpha02 contains these commits.

নতুন বৈশিষ্ট্য

Macrobenchmark artifacts added ( androidx.benchmark:benchmark-macro-junit4 and androidx.benchmark:benchmark-macro )

  • Capture startup, scrolling/animation performance metrics from your app, locally or in CI
  • Capture and inspect traces from within Android Studio

বাগ সংশোধন

  • Workaround shell permissions issue with output directory on Android 12 (Note - may require updating Android Gradle Plugin to 7.0.0 canary and Android Studio to Arctic Fox (2020.3.1), to continue capturing output files on affected devices). ( Icb039 )
  • Support configuration caching in BenchmarkPlugin ( 6be1c1 , b/159804788 )
  • Simplified file output - on by default, in a directory that doesn't require requestLegacyExternalStorage=true ( 8b5a4d , b/172376362 )
  • Fixes library printing logcat warnings about not finding JIT thread on platform versions where it is not present. ( I9cc63 , b/161847393 )
  • Fix for reading device max frequency. ( I55c7a )

সংস্করণ 1.1.0-alpha01

১০ জুন, ২০২০

androidx.benchmark:benchmark-common:1.1.0-alpha01 , androidx.benchmark:benchmark-gradle-plugin:1.1.0-alpha01 , and androidx.benchmark:benchmark-junit4:1.1.0-alpha01 are released. Version 1.1.0-alpha01 contains these commits.

New Features of 1.1

  • Allocation Metric - Benchmarks now run an additional phase after warmup and timing, capturing allocation counts. Allocations can cause performance problems on older versions of the platform (140ns in O became 8ns in M - measured on Nexus5X, with locked clocks). This metric is displayed in Android Studio console output, as well as in the
  • Profiling support - You can now capture profiling data for a benchmark run, to inspect why your code may be running slowly. Benchmark supports capturing either method tracing, or method sampling from ART. These files can be inspected with the Profiler inside Android Studio using File > Open .
  • The Benchmark Gradle plugin now provides defaults for simpler setup:
    • testBuildType is set to release by default, to avoid using dependencies with code coverage built-in. The release buildType is also configured as the default buildType, which allows Android Studio to automatically select the correct build variant when opening a project for the first time. ( b/138808399 )
    • signingConfig.debug is used as the default signing config ( b/153583269 )

** Bug Fixes **

  • Significantly reduced the warmup transition overhead, where the first measurement for each benchmark was artificially higher than others. This issue was more pronounced in very small benchmarks (1 microsecond or less). ( b/142058671 )
  • Fixed InstrumentationResultParser error printed for each benchmark when running from command line. ( I64988 , b/154248456 )

পরিচিত সমস্যা

  • Command line, gradle invocations of Benchmark do not print out results directly. You can work around this by either running through Studio, or parsing the JSON output file for results.
  • Benchmark reporting fails to pull the report from devices that have an app installed with an applicationId ending with either “android” or “download” (case insensitive). Users hitting this issue should upgrade the Android Gradle Plugin to 4.2-alpha01 or later.

সংস্করণ ১.০.০

Benchmark Version 1.0.0

২০ নভেম্বর, ২০১৯

androidx.benchmark:benchmark-common:1.0.0 , androidx.benchmark:benchmark-gradle-plugin:1.0.0 , and androidx.benchmark:benchmark-junit4:1.0.0 are released with no changes from 1.0.0-rc01. Version 1.0.0 contains these commits .

১.০.০ এর প্রধান বৈশিষ্ট্যসমূহ

The Benchmark library allows you to write performance benchmarks of app code and get results quickly.

It prevents build and runtime configuration issues and stabilizes device performance to ensure that measurements are accurate and consistent. Run the benchmarks directly in Android Studio , or in Continuous Integration to observe code performance over time, and to prevent regressions.

Major features include:

  • Clock stabilization
  • Automatic thread prioritization
  • Support for UI performance testing, such as in the RecyclerView Sample
  • JIT-aware warmup and looping
  • JSON benchmark output for post-processing

সংস্করণ 1.0.0-rc01

২৩ অক্টোবর, ২০১৯

androidx.benchmark:benchmark-common:1.0.0-rc01 , androidx.benchmark:benchmark-gradle-plugin:1.0.0-rc01 , and androidx.benchmark:benchmark-junit4:1.0.0-rc01 are released. Version 1.0.0-rc01 contains these commits .

নতুন বৈশিষ্ট্য

  • Added systrace tracing to benchmarks

Bug fixes

  • Fixed metric instability issue where JIT wouldn't finish before warm up due to deprioritization ( b/140773023 )
  • Unified JSON output directory across Android Gradle Plugin 3.5 and 3.6

সংস্করণ 1.0.0-beta01

৯ অক্টোবর, ২০১৯

androidx.benchmark:benchmark-common:1.0.0-beta01 , androidx.benchmark:benchmark-gradle-plugin:1.0.0-beta01 , and androidx.benchmark:benchmark-junit4:1.0.0-beta01 are released. Version 1.0.0-beta01 contains these commits .

নতুন বৈশিষ্ট্য

  • Run garbage collection before each warmup to reduce memory pressure from one benchmark to leak to the next ( b/140895105 )

Bug fixes

  • Added androidx.annotation:android-experimental-lint dependency, so that Java code will correctly produce lint errors when experimental API is not used, similar to what is provided by the Kotlin experimental annotation for Kotlin callers.
  • Now correctly detects usage of additionalTestOutputDir instrumentation argument for output in Android Gradle Plugin 3.6, to know when AGP will handle data copy.
  • Fix undetected clock frequency in JSON to correctly print -1 ( b/141945670 ).

সংস্করণ 1.0.0-alpha06

September 18, 2019

androidx.benchmark:benchmark-common:1.0.0-alpha06 , androidx.benchmark:benchmark-gradle-plugin:1.0.0-alpha06 , and androidx.benchmark:benchmark-junit4:1.0.0-alpha06 are released. Version 1.0.0-alpha06 contains these commits .

নতুন বৈশিষ্ট্য

  • Added a check for incorrectly using the old package for the test runner, which now provides a more-helpful error message

API changes

  • The experimental annotation ExperimentalAnnotationReport is now correctly public. Usage of the experimental BenchmarkState#report API now requires this annotation

সংস্করণ 1.0.0-alpha05

৫ সেপ্টেম্বর, ২০১৯

androidx.benchmark:benchmark-common:1.0.0-alpha05 , androidx.benchmark:benchmark-gradle-plugin:1.0.0-alpha05 , and androidx.benchmark:benchmark-junit4:1.0.0-alpha05 are released. The commits included in this version can be found here .

API changes

  • BenchmarkState.reportData API is now marked experimental

Bug fixes

  • Fix for the clock-locking script, which would fail on devices that were either missing the cut or expr shell utilities.
  • Fixed an issue with ./gradlew lockClocks task that would hang on devices that were rooted with an older version of the su utility, which did not support the -c flag.

সংস্করণ 1.0.0-alpha04

৭ আগস্ট, ২০১৯

androidx.benchmark:benchmark-common:1.0.0-alpha04 , androidx.benchmark:benchmark-gradle-plugin:1.0.0-alpha04 , and androidx.benchmark:benchmark-junit4:1.0.0-alpha04 are released. The commits included in this version can be found here .

New documentation has also been added for how to use the Benchmark library without Gradle, both for usage with different build systems (such as Bazel or Buck), and when running in CI. For more information, see Build benchmarks without Gradle and Run benchmarks in Continuous Integration .

নতুন বৈশিষ্ট্য

  • Gradle plugin
    • Now automatically disables test coverage, and sets the AndroidBenchmarkRunner by default ( b/138374050 )
    • Added support for new AGP-based data copy, when running benchmarks and when using AGP 3.6+
  • JSON format additions
    • Output total benchmark test run time ( b/133147694 )
    • @Parameterized benchmarks that use a name string (for example @Parameters(name = "size={0},depth={1}") ) now output parameter names and values per benchmark in the JSON output ( b/132578772 )
  • Dry Run mode ( b/138785848 )
    • Added a "dry run" mode for running each benchmark loop only once, to check for errors/crashes without capturing measurements. This can be useful eg for, for example, quickly running benchmarks in presubmit to check that they're not broken.

API changes

  • Module structure has changed, splitting the library ( b/138451391 )
    • benchmark:benchmark-junit4 contains classes with JUnit dependency: AndroidBenchmarkRunner , and BenchmarkRule , both of which have moved into the androidx.benchmark.junit4 package
    • benchmark:benchmark-common contains the rest of the logic, including the BenchmarkState API
    • This split will allow the library to support benchmarking without JUnit4 APIs in the future
  • Configuration warnings are now treated as errors, and will crash the test ( b/137653596 )
    • This is done to further encourage accurate measurements, especially in CI
    • These errors can be reduced back to warnings with an instrumentation argument. For example: -e androidx.benchmark.suppressErrors "DEBUGGABLE,LOW_BATTERY"

Bug fixes

  • Errors when writing to external storage on Q devices provide more-descriptive messages, with suggestions of how to resolve the issue
  • Screens are automatically turned on during benchmark runs, instead of failing when the screen is off

External contributions

  • Thanks to Sergey Zakharov for contributing JSON output improvements and the fix for screen off issues!

সংস্করণ 1.0.0-alpha03

২ জুলাই, ২০১৯

androidx.benchmark:benchmark:1.0.0-alpha03 and androidx.benchmark:benchmark-gradle-plugin:1.0.0-alpha03 are released. The commits included in this version can be found here .

নতুন বৈশিষ্ট্য

  • Expose sleep duration due to thermal throttling per benchmark in the full JSON report

Bug fixes

  • The Gradle plugin should no longer be required to be applied after Android plugins and the Android block
  • Adds support for benchmark reports on Android 10 devices using scoped storage

সংস্করণ 1.0.0-alpha02

June 6, 2019

androidx.benchmark:1.0.0-alpha02 and androidx.benchmark:benchmark-gradle-plugin:1.0.0-alpha02 are released. The commits included in this version can be found here .

Note that we are treating the JSON schema as an API. We plan to follow the same stability constraints as other APIs: stable (with very rare exceptions) once in beta, and fixed in final release, with only additions in minor releases and changes/removals in major releases.

API changes

  • Overhauled JSON schema. Further changes to the JSON schema are likely to be limited to additions:

    • Reorganized the result object structure to support additional metric groups in the future ( b/132713021 )
    • Added test run context information, such as device and build info and whether clocks are locked, to the top-level object ( b/132711920 )
    • Time metric names now have 'ns' in their name ( b/132714527 )
    • Additional stats added per reported metric (maximum, median, minimum), and removed simplified 'nanos' summary stat ( b/132713851 )
  • Removed XML output ( b/132714414 )

  • Thermal throttle detection removed from BenchmarkState.reportData API ( b/132887006 )

Bug fixes

  • Fixed ./gradlew lockClocks not sticking on some recent OS devices ( b/133424037 )
  • Throttling detection disabled for emulator ( b/132880807 )

সংস্করণ 1.0.0-alpha01

৭ মে, ২০১৯

androidx.benchmark:benchmark:1.0.0-alpha01 is released. The commits included in this version are available here .