This topic provides answers to frequently asked questions (FAQs) about report statistics on the Apsara DevOps platform. It covers how to correctly configure settings to count code contributions, view code repository commits, understand why report data is available only on the next day, and check the total lines of code in a branch using Pipeline Flow. This information helps you use the report feature to track and evaluate your team's efficiency.
How are code contributions counted in reports?
Overview: To ensure code contributions are accurately reflected in reports, make sure your local Git configuration matches your server-side account information and that the commit time is set correctly.
Account and time settings:
Email match: The email address set in your local
git configmust be the same as the primary email address associated with your server-side account.System time calibration: The commit time is based on your local system time. Make sure your system time is accurate.
For more information, see How are code contributions counted in reports?
How do I view code repository commits?
Prerequisite: Apsara DevOps Efficiency Insight counts commits for a code repository only if the Insight Report service is enabled for that repository in your organization.
View personal commits: You can view your personal commits in the Personal Metrics Report in Apsara DevOps Efficiency Insight.
View commits for each code repository:
You can filter the dynamic pages of Code Group and Code Repository to view commit details for a specific repository.
Alternatively, you can go to Apsara DevOps Efficiency Insight. Under Common Reports, select Code Metrics Report to view the commit status of each repository.
For more information, see How do I view code repository commits?
Why is report data available only on the next day?
Codeup prioritizes the security and privacy protection of customer data. Before you grant authorization to enable the Data Insight service, the platform does not collect or analyze any code activity data. After you grant authorization, the platform starts the necessary data processing. This process usually takes one day to sync the latest code activity records. Therefore, the report data is updated on the next day (T+1). For more information, see Why is report data available only on the next day?
How do I check the total lines of code in the current branch?
Overview: You can use the open-source tool CLOC with Apsara DevOps Pipeline Flow to easily count and monitor the lines of code on a specific branch. This helps managers better understand project progress.
Create a pipeline: In the target code repository, click the Pipeline tab. Click Create Pipeline, and then select the Empty Template to create a pipeline.
Add a build task: Select Empty Task and add a new build step, such as Node.js Build. In this step, enter the following commands to install CLOC and count the lines of code:
npm install -g cloc cloc ./Save and run the pipeline: Select the target branch for which you want to count the lines of code. This action triggers the pipeline. After the pipeline runs, find the Node.js Build section in the log to view the detailed report on the lines of code.
This method lets you automatically obtain the number of code lines in a branch. You can also regularly check project size trends to help with decision-making. For more information, see How to check the total lines of code in the current branch.
We hope this information helps you better understand and use the report statistics feature on the Apsara DevOps platform. If you have other questions or need more help, contact us.