SlideShare ist ein Scribd-Unternehmen logo
1 von 12
Using gcov and lcov Magus Chen maguschen@hotmail.com http://magustest.com/blog/
Agenda gcov lcov How to apply gcov on ads Using lcov generate report Example 2
Introduction to gcov A test coverage program Works only on code compiled with GCC Collect code coverage data and generate plain text coverage report 3
Introduction to lcov LCOV is a graphical front-end for GCC's coverage testing tool gcov. It collects gcov data for multiple source files and creates HTML pages containing the source code annotated with coverage information. It also adds overview pages for easy navigation within the file structure. LCOV supports statement, function and branch coverage measurement. 4
How to apply gcov on ads Build adserver with option “--coverage” This option is used to compile and link code instrumented for coverage analysis. The option is a synonym for -fprofile-arcs-ftest-coverage (when compiling) and -lgcov (when linking). 5
How to apply gcov on ads Copy ads binary to your own environment  Export two envGCOV_PREFIX and GCOV_PREFIX_STRIP  Run ads Send request To generate code coverage data, exit the program normally (using kill, not kill -9) Some .gcda file is generated 6
How to generate html report Copy all source files and .gcno files from build server to your own environment Copy all .gcda file to your own environment lcov -t 'Adserver regression' -o ads_test.info -c -d . -t title -o output file name -c capture coverage data -d use data files in DIR 7
How to generate html report genhtml -o result ads_test.info  -o output folder of the all html contents ads_test.info INFO FILE name 8
How to view the HTML report Apache httpd /etc/init.d/httpd start Copy or link the result folder under /var/www/html/ Lighttpd /usr/local/sbin/lighttpd -f lighttpd_jchen.conf Copy or link the result folder under server.document-root 9
Example 10
Q & A 11
Thank you

Weitere ähnliche Inhalte

Was ist angesagt?

Angular - Chapter 4 - Data and Event Handling
 Angular - Chapter 4 - Data and Event Handling Angular - Chapter 4 - Data and Event Handling
Angular - Chapter 4 - Data and Event HandlingWebStackAcademy
 
Python/Flask Presentation
Python/Flask PresentationPython/Flask Presentation
Python/Flask PresentationParag Mujumdar
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation ToolIzzet Mustafaiev
 
React Router: React Meetup XXL
React Router: React Meetup XXLReact Router: React Meetup XXL
React Router: React Meetup XXLRob Gietema
 
An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.jsPagepro
 
FULL stack -> MEAN stack
FULL stack -> MEAN stackFULL stack -> MEAN stack
FULL stack -> MEAN stackAshok Raj
 
Node JS Crash Course
Node JS Crash CourseNode JS Crash Course
Node JS Crash CourseHaim Michael
 
Angular 2.0 forms
Angular 2.0 formsAngular 2.0 forms
Angular 2.0 formsEyal Vardi
 
Angular data binding
Angular data binding Angular data binding
Angular data binding Sultan Ahmed
 
Ceph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing GuideCeph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing GuideKaran Singh
 
Angular Introduction By Surekha Gadkari
Angular Introduction By Surekha GadkariAngular Introduction By Surekha Gadkari
Angular Introduction By Surekha GadkariSurekha Gadkari
 
An Introduction to Gradle for Java Developers
An Introduction to Gradle for Java DevelopersAn Introduction to Gradle for Java Developers
An Introduction to Gradle for Java DevelopersKostas Saidis
 

Was ist angesagt? (20)

Gradle Introduction
Gradle IntroductionGradle Introduction
Gradle Introduction
 
Angular - Chapter 4 - Data and Event Handling
 Angular - Chapter 4 - Data and Event Handling Angular - Chapter 4 - Data and Event Handling
Angular - Chapter 4 - Data and Event Handling
 
Nuxt.js - Introduction
Nuxt.js - IntroductionNuxt.js - Introduction
Nuxt.js - Introduction
 
Python/Flask Presentation
Python/Flask PresentationPython/Flask Presentation
Python/Flask Presentation
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation Tool
 
React Router: React Meetup XXL
React Router: React Meetup XXLReact Router: React Meetup XXL
React Router: React Meetup XXL
 
An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js
 
Node js for beginners
Node js for beginnersNode js for beginners
Node js for beginners
 
Jsf presentation
Jsf presentationJsf presentation
Jsf presentation
 
Introduction to Angularjs
Introduction to AngularjsIntroduction to Angularjs
Introduction to Angularjs
 
FULL stack -> MEAN stack
FULL stack -> MEAN stackFULL stack -> MEAN stack
FULL stack -> MEAN stack
 
Node JS Crash Course
Node JS Crash CourseNode JS Crash Course
Node JS Crash Course
 
Flask – Python
Flask – PythonFlask – Python
Flask – Python
 
VueJS: The Simple Revolution
VueJS: The Simple RevolutionVueJS: The Simple Revolution
VueJS: The Simple Revolution
 
Angular 2.0 forms
Angular 2.0 formsAngular 2.0 forms
Angular 2.0 forms
 
Angular Data Binding
Angular Data BindingAngular Data Binding
Angular Data Binding
 
Angular data binding
Angular data binding Angular data binding
Angular data binding
 
Ceph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing GuideCeph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing Guide
 
Angular Introduction By Surekha Gadkari
Angular Introduction By Surekha GadkariAngular Introduction By Surekha Gadkari
Angular Introduction By Surekha Gadkari
 
An Introduction to Gradle for Java Developers
An Introduction to Gradle for Java DevelopersAn Introduction to Gradle for Java Developers
An Introduction to Gradle for Java Developers
 

Andere mochten auch

Prepare for PHP Test Fest 2009
Prepare for PHP Test Fest 2009Prepare for PHP Test Fest 2009
Prepare for PHP Test Fest 2009PHPBelgium
 
Code coverage & tools
Code coverage & toolsCode coverage & tools
Code coverage & toolsRajesh Kumar
 
Static Code Analysis and Cppcheck
Static Code Analysis and CppcheckStatic Code Analysis and Cppcheck
Static Code Analysis and CppcheckZachary Blair
 
An Introduction to PC-Lint
An Introduction to PC-LintAn Introduction to PC-Lint
An Introduction to PC-LintRalf Holly
 
Code Coverage Revised : EclEmma on JaCoCo
Code Coverage Revised : EclEmma on JaCoCoCode Coverage Revised : EclEmma on JaCoCo
Code Coverage Revised : EclEmma on JaCoCoEvgeny Mandrikov
 
Code coverage analysis in testing
Code coverage analysis in testingCode coverage analysis in testing
Code coverage analysis in testingNi
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at NetflixBrendan Gregg
 

Andere mochten auch (10)

Prepare for PHP Test Fest 2009
Prepare for PHP Test Fest 2009Prepare for PHP Test Fest 2009
Prepare for PHP Test Fest 2009
 
Code coverage & tools
Code coverage & toolsCode coverage & tools
Code coverage & tools
 
Static Code Analysis and Cppcheck
Static Code Analysis and CppcheckStatic Code Analysis and Cppcheck
Static Code Analysis and Cppcheck
 
Code Coverage
Code CoverageCode Coverage
Code Coverage
 
An Introduction to PC-Lint
An Introduction to PC-LintAn Introduction to PC-Lint
An Introduction to PC-Lint
 
Code Coverage Revised : EclEmma on JaCoCo
Code Coverage Revised : EclEmma on JaCoCoCode Coverage Revised : EclEmma on JaCoCo
Code Coverage Revised : EclEmma on JaCoCo
 
Code coverage analysis in testing
Code coverage analysis in testingCode coverage analysis in testing
Code coverage analysis in testing
 
Code coverage
Code coverageCode coverage
Code coverage
 
Code coverage
Code coverageCode coverage
Code coverage
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at Netflix
 

Ähnlich wie Using gcov and lcov

MyMobileWeb Certification Part IV
MyMobileWeb Certification Part IVMyMobileWeb Certification Part IV
MyMobileWeb Certification Part IVcrdlc
 
Bertrandt | Automotive Best Practice: How to Design, Review, Approve, and Eff...
Bertrandt | Automotive Best Practice: How to Design, Review, Approve, and Eff...Bertrandt | Automotive Best Practice: How to Design, Review, Approve, and Eff...
Bertrandt | Automotive Best Practice: How to Design, Review, Approve, and Eff...Intland Software GmbH
 
TRESOR: The modular cloud - Building a domain specific cloud platform with OS...
TRESOR: The modular cloud - Building a domain specific cloud platform with OS...TRESOR: The modular cloud - Building a domain specific cloud platform with OS...
TRESOR: The modular cloud - Building a domain specific cloud platform with OS...mfrancis
 
IBM Hybrid Cloud Integration UCC Talk, 21st November 2018
IBM Hybrid Cloud Integration UCC Talk, 21st November 2018IBM Hybrid Cloud Integration UCC Talk, 21st November 2018
IBM Hybrid Cloud Integration UCC Talk, 21st November 2018Michael O'Sullivan
 
Working with the Cognos BI Server Using the Greenplum Database -- Interoperab...
Working with the Cognos BI Server Using the Greenplum Database -- Interoperab...Working with the Cognos BI Server Using the Greenplum Database -- Interoperab...
Working with the Cognos BI Server Using the Greenplum Database -- Interoperab...EMC
 
A New Paradigm In Linux Debug From Viosoft
A New Paradigm In Linux Debug From ViosoftA New Paradigm In Linux Debug From Viosoft
A New Paradigm In Linux Debug From Viosoftguestc28df4
 
Simplifying and accelerating converged media with Open Visual Cloud
Simplifying and accelerating converged media with Open Visual CloudSimplifying and accelerating converged media with Open Visual Cloud
Simplifying and accelerating converged media with Open Visual CloudLiz Warner
 
이제는 말할 수 있다: KBS, beNX의 AWS 활용법 – 선영진 KBS 부장, 강진우 beNX 팀장, 강호성 beNX 엔지니어:: AW...
이제는 말할 수 있다: KBS, beNX의 AWS 활용법 – 선영진 KBS 부장, 강진우 beNX 팀장, 강호성 beNX 엔지니어:: AW...이제는 말할 수 있다: KBS, beNX의 AWS 활용법 – 선영진 KBS 부장, 강진우 beNX 팀장, 강호성 beNX 엔지니어:: AW...
이제는 말할 수 있다: KBS, beNX의 AWS 활용법 – 선영진 KBS 부장, 강진우 beNX 팀장, 강호성 beNX 엔지니어:: AW...Amazon Web Services Korea
 
Embedding Chromium into AGL demo platform with WAM
Embedding Chromium into AGL demo platform with WAMEmbedding Chromium into AGL demo platform with WAM
Embedding Chromium into AGL demo platform with WAMIgalia
 
Using Deep Learning for Computer Vision Applications
Using Deep Learning for Computer Vision ApplicationsUsing Deep Learning for Computer Vision Applications
Using Deep Learning for Computer Vision ApplicationsFarshid Pirahansiah
 
A New Paradigm In Linux Debug From Viosoft Corporation
A New Paradigm In Linux Debug From Viosoft CorporationA New Paradigm In Linux Debug From Viosoft Corporation
A New Paradigm In Linux Debug From Viosoft Corporationart_lee
 
What do you need to know about g rpc on .net
What do you need to know about g rpc on .net What do you need to know about g rpc on .net
What do you need to know about g rpc on .net Moon Technolabs Pvt. Ltd.
 
2008.12.23 CompoWeb
2008.12.23 CompoWeb2008.12.23 CompoWeb
2008.12.23 CompoWebxoanon
 
COMPRO- WEB ALBUM & MOTION ANALYZER
COMPRO- WEB ALBUM  & MOTION ANALYZERCOMPRO- WEB ALBUM  & MOTION ANALYZER
COMPRO- WEB ALBUM & MOTION ANALYZERAshish Tanwer
 
CI, CD, CT, Deploy, IaaS, DevOps, Stage
CI, CD, CT, Deploy, IaaS, DevOps, StageCI, CD, CT, Deploy, IaaS, DevOps, Stage
CI, CD, CT, Deploy, IaaS, DevOps, StageArtur Basak
 
CI/CD with AWS Developer Tools and Fargate
CI/CD with AWS Developer Tools and FargateCI/CD with AWS Developer Tools and Fargate
CI/CD with AWS Developer Tools and FargateAmazon Web Services
 
Preparing_for_PCA_Workbook.pptx
Preparing_for_PCA_Workbook.pptxPreparing_for_PCA_Workbook.pptx
Preparing_for_PCA_Workbook.pptxmichaeljayaraj1
 
Overview & Downloading the Baseline using Global Configuration Managemen tand...
Overview & Downloading the Baseline using Global Configuration Managemen tand...Overview & Downloading the Baseline using Global Configuration Managemen tand...
Overview & Downloading the Baseline using Global Configuration Managemen tand...Bharat Malge
 
AZ-204 Exam Dumps (V41.0) - Pass Microsoft AZ-204 Exam (2024)
AZ-204 Exam Dumps (V41.0) - Pass Microsoft AZ-204 Exam (2024)AZ-204 Exam Dumps (V41.0) - Pass Microsoft AZ-204 Exam (2024)
AZ-204 Exam Dumps (V41.0) - Pass Microsoft AZ-204 Exam (2024)ellahenry684
 

Ähnlich wie Using gcov and lcov (20)

MyMobileWeb Certification Part IV
MyMobileWeb Certification Part IVMyMobileWeb Certification Part IV
MyMobileWeb Certification Part IV
 
Bertrandt | Automotive Best Practice: How to Design, Review, Approve, and Eff...
Bertrandt | Automotive Best Practice: How to Design, Review, Approve, and Eff...Bertrandt | Automotive Best Practice: How to Design, Review, Approve, and Eff...
Bertrandt | Automotive Best Practice: How to Design, Review, Approve, and Eff...
 
TRESOR: The modular cloud - Building a domain specific cloud platform with OS...
TRESOR: The modular cloud - Building a domain specific cloud platform with OS...TRESOR: The modular cloud - Building a domain specific cloud platform with OS...
TRESOR: The modular cloud - Building a domain specific cloud platform with OS...
 
IBM Hybrid Cloud Integration UCC Talk, 21st November 2018
IBM Hybrid Cloud Integration UCC Talk, 21st November 2018IBM Hybrid Cloud Integration UCC Talk, 21st November 2018
IBM Hybrid Cloud Integration UCC Talk, 21st November 2018
 
Working with the Cognos BI Server Using the Greenplum Database -- Interoperab...
Working with the Cognos BI Server Using the Greenplum Database -- Interoperab...Working with the Cognos BI Server Using the Greenplum Database -- Interoperab...
Working with the Cognos BI Server Using the Greenplum Database -- Interoperab...
 
A New Paradigm In Linux Debug From Viosoft
A New Paradigm In Linux Debug From ViosoftA New Paradigm In Linux Debug From Viosoft
A New Paradigm In Linux Debug From Viosoft
 
Simplifying and accelerating converged media with Open Visual Cloud
Simplifying and accelerating converged media with Open Visual CloudSimplifying and accelerating converged media with Open Visual Cloud
Simplifying and accelerating converged media with Open Visual Cloud
 
이제는 말할 수 있다: KBS, beNX의 AWS 활용법 – 선영진 KBS 부장, 강진우 beNX 팀장, 강호성 beNX 엔지니어:: AW...
이제는 말할 수 있다: KBS, beNX의 AWS 활용법 – 선영진 KBS 부장, 강진우 beNX 팀장, 강호성 beNX 엔지니어:: AW...이제는 말할 수 있다: KBS, beNX의 AWS 활용법 – 선영진 KBS 부장, 강진우 beNX 팀장, 강호성 beNX 엔지니어:: AW...
이제는 말할 수 있다: KBS, beNX의 AWS 활용법 – 선영진 KBS 부장, 강진우 beNX 팀장, 강호성 beNX 엔지니어:: AW...
 
Embedding Chromium into AGL demo platform with WAM
Embedding Chromium into AGL demo platform with WAMEmbedding Chromium into AGL demo platform with WAM
Embedding Chromium into AGL demo platform with WAM
 
Using Deep Learning for Computer Vision Applications
Using Deep Learning for Computer Vision ApplicationsUsing Deep Learning for Computer Vision Applications
Using Deep Learning for Computer Vision Applications
 
A New Paradigm In Linux Debug From Viosoft Corporation
A New Paradigm In Linux Debug From Viosoft CorporationA New Paradigm In Linux Debug From Viosoft Corporation
A New Paradigm In Linux Debug From Viosoft Corporation
 
What do you need to know about g rpc on .net
What do you need to know about g rpc on .net What do you need to know about g rpc on .net
What do you need to know about g rpc on .net
 
2008.12.23 CompoWeb
2008.12.23 CompoWeb2008.12.23 CompoWeb
2008.12.23 CompoWeb
 
COMPRO- WEB ALBUM & MOTION ANALYZER
COMPRO- WEB ALBUM  & MOTION ANALYZERCOMPRO- WEB ALBUM  & MOTION ANALYZER
COMPRO- WEB ALBUM & MOTION ANALYZER
 
CODE IGNITER
CODE IGNITERCODE IGNITER
CODE IGNITER
 
CI, CD, CT, Deploy, IaaS, DevOps, Stage
CI, CD, CT, Deploy, IaaS, DevOps, StageCI, CD, CT, Deploy, IaaS, DevOps, Stage
CI, CD, CT, Deploy, IaaS, DevOps, Stage
 
CI/CD with AWS Developer Tools and Fargate
CI/CD with AWS Developer Tools and FargateCI/CD with AWS Developer Tools and Fargate
CI/CD with AWS Developer Tools and Fargate
 
Preparing_for_PCA_Workbook.pptx
Preparing_for_PCA_Workbook.pptxPreparing_for_PCA_Workbook.pptx
Preparing_for_PCA_Workbook.pptx
 
Overview & Downloading the Baseline using Global Configuration Managemen tand...
Overview & Downloading the Baseline using Global Configuration Managemen tand...Overview & Downloading the Baseline using Global Configuration Managemen tand...
Overview & Downloading the Baseline using Global Configuration Managemen tand...
 
AZ-204 Exam Dumps (V41.0) - Pass Microsoft AZ-204 Exam (2024)
AZ-204 Exam Dumps (V41.0) - Pass Microsoft AZ-204 Exam (2024)AZ-204 Exam Dumps (V41.0) - Pass Microsoft AZ-204 Exam (2024)
AZ-204 Exam Dumps (V41.0) - Pass Microsoft AZ-204 Exam (2024)
 

Kürzlich hochgeladen

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Kürzlich hochgeladen (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Using gcov and lcov

  • 1. Using gcov and lcov Magus Chen maguschen@hotmail.com http://magustest.com/blog/
  • 2. Agenda gcov lcov How to apply gcov on ads Using lcov generate report Example 2
  • 3. Introduction to gcov A test coverage program Works only on code compiled with GCC Collect code coverage data and generate plain text coverage report 3
  • 4. Introduction to lcov LCOV is a graphical front-end for GCC's coverage testing tool gcov. It collects gcov data for multiple source files and creates HTML pages containing the source code annotated with coverage information. It also adds overview pages for easy navigation within the file structure. LCOV supports statement, function and branch coverage measurement. 4
  • 5. How to apply gcov on ads Build adserver with option “--coverage” This option is used to compile and link code instrumented for coverage analysis. The option is a synonym for -fprofile-arcs-ftest-coverage (when compiling) and -lgcov (when linking). 5
  • 6. How to apply gcov on ads Copy ads binary to your own environment Export two envGCOV_PREFIX and GCOV_PREFIX_STRIP  Run ads Send request To generate code coverage data, exit the program normally (using kill, not kill -9) Some .gcda file is generated 6
  • 7. How to generate html report Copy all source files and .gcno files from build server to your own environment Copy all .gcda file to your own environment lcov -t 'Adserver regression' -o ads_test.info -c -d . -t title -o output file name -c capture coverage data -d use data files in DIR 7
  • 8. How to generate html report genhtml -o result ads_test.info -o output folder of the all html contents ads_test.info INFO FILE name 8
  • 9. How to view the HTML report Apache httpd /etc/init.d/httpd start Copy or link the result folder under /var/www/html/ Lighttpd /usr/local/sbin/lighttpd -f lighttpd_jchen.conf Copy or link the result folder under server.document-root 9
  • 11. Q & A 11