با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
Earth Engine بر روی ابزارها و خدمات گوگل برای انجام محاسبات در مقیاس عظیم ساخته شده است. برای سهولت اجرای تجزیه و تحلیلهای بزرگ جغرافیایی، پلتفرم Earth Engine و API بسیاری از پیچیدگیهای زیرساختهای پردازش موازی زیرین را پنهان میکنند.
EECU ها
نمای کلی
یک واحد محاسباتی موتور زمین (EECU) مکانیزمی برای نمایش مقداری از قدرت پردازش آنی است. Earth Engine کل ردپای محاسباتی وظایف را به عنوان تابعی از استفاده از EECU آنها در طول زمان (EECU-ثانیه، EECU-ساعت و غیره) ردیابی می کند. از آنجایی که گوگل انواع مختلفی از هستههای پردازشگر، معماریها و غیره دارد، EECU یک انتزاع مفید برای صحبت در مورد قدرت محاسباتی است.
انگیزه
کاربران EE اغلب می خواهند در مورد میزان توان پردازشی مورد نیاز برای گردش کار خود تخمین بزنند و EECU معیاری ثابت برای انجام مقایسه ارائه می دهد.
مقایسه با معیارهای CPU
تعداد، نوع و معماری ماشینهایی که روی یک نتیجه خاص کار میکنند میتواند در طول زمان تغییر کند. از آنجایی که هسته های فیزیکی مختلف می توانند ویژگی های عملکرد متفاوتی داشته باشند، Earth Engine تمام پردازش ها را با استفاده از EECU خلاصه می کند. یک ساعت EECU (یا هر واحد دیگری از زمان EECU) با زمان ساعت دیواری مطابقت ندارد، بنابراین کاری که 10 ساعت EECU مصرف می کند ممکن است تنها چند دقیقه زمان اجرا مشاهده شده داشته باشد.
ثبات و قابل پیش بینی
ارسال درخواستهای یکسان (یا مشابه) به Earth Engine گاهی اوقات میتواند به مقادیر بسیار متفاوتی از محاسبات منجر شود. محرک های رایج تفاوت ها عبارتند از:
ذخیره سازی ، مانند استفاده مجدد از نتایج محاسبات قبلی (از جمله نتایج جزئی یا میانی)
دادههای زیربنایی مختلف ، مانند تعداد متفاوت تصاویر ماهوارهای، هندسههایی با پیچیدگیهای مختلف و غیره.
تغییرات الگوریتم در پلتفرم EE، از جمله بهینه سازی عملکرد، رفع اشکال و غیره.
تغییرات در کتابخانه های سرویس گیرنده ، به خصوص اگر به کد یا بسته های EE کاربران دیگر وابسته باشید
Earth Engine معیارهای عملکرد را برای درخواستها/وظایف ناموفق ارائه نمیکند، زیرا این اعداد نادرست یا گمراهکننده هستند. به عنوان مثال، اگر یک شغل به دلیل عدم پاسخگویی یک کار کارگر شکست بخورد، مصرف پردازشی آن کارگر نمی تواند در کل محاسبه شود.
نمایه ساز
نمایه ساز اطلاعاتی درباره زمان EECU و میزان مصرف حافظه (به ازای هر الگوریتم و دارایی) حاصل از محاسبات انجام شده در زمانی که فعال است، ارائه می دهد. هر سطر در خروجی پروفایل مربوط به یک الگوریتم، محاسبات، بار دارایی یا عملیات سربار است که در ستون "توضیحات" توضیح داده شده است. ستون های پروفایلر عبارتند از:
توضیحات
شرح متنی محاسبات، الگوریتم، بار دارایی یا عملیات سربار که نمایه می شود.
بشمار
یک نشانگر متناسب با تعداد دفعاتی که عملیات توصیف شده در "توضیحات" فراخوانی شده است.
محاسبه کنید
نشانگر EECU-زمان گرفته شده توسط عملیات (ها).
یادداشت فعلی
این ستون فقط در صورتی ظاهر می شود که به دلیل اسکریپت خطایی وجود داشته باشد
حافظه زیادی استفاده کرد مقدار حافظه مورد استفاده در هر گره محاسباتی را در لحظه وقوع خطا نشان می دهد.
قله مم
حداکثر حافظه مورد استفاده در هر گره محاسباتی برای عملیات.
فعال کردن نمایه ساز
ویرایشگر کد
همانطور که در راهنمای ویرایشگر کد توضیح داده شده است، از دکمه "اجرا با پروفایلر" استفاده کنید.
پایتون
کد زیر را در اسکریپت پایتون خود وارد کنید تا پروفایلر فعال شود:
در اینجا یک پیشنهاد برای تبدیل رشته پروفایل به جدولی برای تجزیه و تحلیل آسانتر در نوت بوک های Colab و Jupyter ارائه شده است (توجه داشته باشید که این فقط یک رویکرد است و ممکن است برای همه موارد مناسب نباشد):
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eEarth Engine Compute Units (EECUs) represent the amount of processing power used in Earth Engine, allowing users to estimate and compare computational needs for geospatial analysis.\u003c/p\u003e\n"],["\u003cp\u003eEECU-time is an abstract measure of work and doesn't directly equate to CPU or wall clock time due to Earth Engine's dynamic resource allocation.\u003c/p\u003e\n"],["\u003cp\u003eWhile Earth Engine strives for computational stability, factors like caching, data variations, algorithm updates, and client library changes can influence processing requirements.\u003c/p\u003e\n"],["\u003cp\u003eUsers can leverage the Earth Engine profiler to gain insights into EECU and memory usage for specific algorithms, asset loads, and operations within their scripts.\u003c/p\u003e\n"]]],[],null,["# Computation Overview\n\nEarth Engine is built on top of Google's tools and services for performing\ncomputations at a massive scale. To make it easy to run large geospatial\nanalyses, the Earth Engine platform and API hide much of the complexity of the\nunderlying parallel-processing infrastructure.\n\nEECUs\n-----\n\n### Overview\n\n| **Key Term:** *EECU* - Earth Engine Compute Unit, an abstraction of computing power.\n\nAn Earth Engine Compute Unit (EECU) is a mechanism for representing an amount of\ninstantaneous processing power. Earth Engine tracks the total computational\nfootprint of tasks as a function of their EECU usage through time (EECU-seconds,\nEECU-hours, etc.). Because Google has many different types of processor cores,\narchitectures, etc., EECUs are a useful abstraction for talking about\ncomputational power.\n\n### Motivation\n\nEE users often want to make estimates about the amount of processing power\nrequired for their workflows, and EECUs provide a consistent metric for making\ncomparisons.\n\n### Comparison with CPU metrics\n\n| **Note:** While EECU-seconds measure the amount of work that Earth Engine is performing, EECU-seconds don't correspond directly to CPU-seconds or wall clock seconds due to the fully managed nature of the service.\n\nThe number, type and architecture of machines working on a particular result can\nchange over time. Because different physical cores can have different\nperformance characteristics, Earth Engine abstracts all processing using EECUs.\nAn EECU-hour (or any other unit of EECU-time) doesn't correspond to a wall clock\ntime, so a job which consumes 10 EECU-hours may have an observed runtime of just\na few minutes.\n\n### Stability and predictability\n\nSending the same (or similar) requests to Earth Engine can sometimes result in\nvery different amounts of computation. Common drivers of differences include:\n\n- **caching**, such as reusing the results of previous computations (including partial or intermediate results)\n- **different underlying data**, such as varying numbers of satellite images, geometries of different complexity, etc.\n- **algorithm changes** on the EE platform, including performance optimizations, bugfixes, etc.\n- **changes to client libraries**, particularly if you depend on other users' EE code or packages\n\n### Benchmarks\n\nExplore [sample Earth Engine computation benchmarks](./computation_benchmarks).\n\n### Metrics for failed requests\n\nEarth Engine doesn't provide performance metrics for failed requests/tasks,\nsince these numbers would be inaccurate or misleading. As an example, if a job\nfails because a worker task became unresponsive, that worker's processing\nconsumption wouldn't be able to factor into the total.\n\nProfiler\n--------\n\nThe profiler provides information about EECU-time and memory usage (per\nalgorithm and asset) resulting from the computation performed while it's\nenabled. Each row in the profiler output corresponds to an algorithm,\ncomputation, asset load or overhead operation as described in the 'Description'\ncolumn. The columns in the profiler are:\n\nDescription\n: A textual description of the computation, algorithm, asset load or\n overhead operation being profiled.\n\nCount\n: An indicator proportional to the number of times the operation described\n in 'Description' was invoked.\n\nCompute\n: An indicator of EECU-time taken by the operation(s).\n\nCurrent Mem\n\n: This column appears only if there was an error because the script\n\n used too much memory. It shows the amount of memory in use on any single\n compute node at the moment the error occurred.\n\nPeak Mem\n\n: Maximum memory used on any single compute node for the operation.\n\n### Enabling the profiler\n\n### Code Editor\n\nUse the \"Run with Profiler\" button, as described in the [Code Editor\nguide](/earth-engine/guides/playground#profiler).\n\n### Python\n\nInclude the following code in your Python script to enable the profiler: \n\n with ee.profilePrinting():\n print(ee.Number(3.14).add(0.00159).getInfo())\n\nThe profile will be printed when the context ends, whether or not any error\noccurred within the context.\n\nTo capture the profile as a string, write the profile to a string buffer: \n\n import io\n\n out = io.StringIO()\n with ee.profilePrinting(destination=out) as p:\n print(ee.Number(3.14).add(0.00159).getInfo())\n\n print('Output:')\n print(out.getvalue())\n\nHere is a suggestion for turning the profile string into a table for easier\nanalysis in Colab and Jupyter Notebooks (note that this is just one approach\nand may not be suitable for all cases): \n\n import re\n import pandas as pd\n\n lines = out.getvalue().split('\\n')\n\n column_names = re.split(r'\\s{1,}', lines[0])\n column_names = [name.strip() for name in column_names if name.strip()]\n\n data = [\n [element for element in re.split(r'\\s{2,}', line) if element.strip()]\n for line in lines[1:-1]\n ]\n\n df = pd.DataFrame(data, columns=column_names)\n display(df)"]]