--- title: Lines of Code metrics shortTitle: Copilot LoC metrics intro: Understand how Lines of Code metrics measure {% data variables.product.prodname_copilot_short %}’s output and what factors affect their coverage and accuracy. permissions: '{% data reusables.copilot.usage-metrics-permissions %}' versions: feature: copilot redirect_from: - /early-access/copilot-metrics/LoC - /early-access/copilot-metrics/LoC/about-the-copilot-metrics-LoC topics: - Copilot contentType: reference allowTitleToDifferFromFilename: true --- {% data reusables.copilot.usage-metrics-preview %} Lines of Code (LoC) metrics provide a directional measure of {% data variables.product.prodname_copilot_short %}’s output by quantifying the lines it suggested, added, or deleted across completions, chat, and agent features. ## Where LoC metrics appear You may encounter LoC metrics in: * **Code generation dashboard (enterprise level)** — visualizes LoC-based user and agent activity. See [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-enterprise/view-code-generation). * **Exports and APIs (enterprise, organization, and user level)** — expose LoC fields such as `loc_suggested_to_add_sum`, `loc_added_sum`, and `loc_deleted_sum`. See [AUTOTITLE](/rest/copilot/copilot-usage-metrics). * **"Data available in {% data variables.product.prodname_copilot_short %} usage metrics" reference** — lists all dashboard and API fields derived from LoC. See [AUTOTITLE](/copilot/reference/copilot-usage-metrics/copilot-usage-metrics). This article covers how LoC is measured and what affects its accuracy and coverage. For detailed definitions, refer to the reference article above. ## Considerations for LoC metrics LoC metrics may vary across IDEs and versions. Keep the following considerations in mind: * **Coverage:** Not all IDEs and users will emit LoC telemetry until they upgrade to the required versions. Reports include the `last_known_ide_version` and `last_known_plugin_version` fields so you can monitor coverage across your enterprise. * **Stability:** As {% data variables.product.prodname_copilot_short %} evolves, telemetry definitions may change. Expect small shifts in data as accuracy improves over time. ## Version requirements LoC metrics require specific minimum versions of IDEs and {% data variables.product.prodname_copilot_short %} plugins to function. Users on older versions will not contribute LoC data, which may lead to underreporting until they upgrade. | IDE | Feature | Minimum IDE version | Minimum {% data variables.copilot.copilot_chat_short %} extension version | |:--|:--|:--|:--| | Eclipse |