SlideShare una empresa de Scribd logo
1 de 10
A very simple program with 3 functions that are all profiled with
Kojak.

Program
funcA();
funcB();
funcC();

funcA

funcB
10 ms

5 ms

funcC
15 ms

Function

Isolated Time

Whole Time

Call Count

funcA

5 ms

5 ms

1

funcB

10 ms

10ms

1

funcC

15 ms

15 ms

1
Now funcA calls funcB once and funcB calls funcC once.
See how the whole times increase for funcA and funcB?
Whole time is the functions time plus any other functions that
are invoked.

Program
funcA();

funcA
5 ms

funcB

1

funcC

1

10 ms

Function

Isolated Time

Whole Time

Call Count

funcA

5 ms

30 ms

1

funcB

10 ms

25 ms

1

funcC

15 ms

15 ms

1

15 ms
Now funcB calls funcC 5 times.
The whole time increases for funcA and funcB.
Note that the sum of the whole times and isolated times.
The sum of the isolated times is the true measured time of how long the program
took to run. (in some situations this isn’t accurate. Discussed in later example)
The sum of the whole times is a nonsense number that doesn’t really tell you
anything useful.

Program
funcA();

funcA
5 ms

funcB

1

funcC

5

10 ms

Function

Isolated Time

Whole Time

Call Count

funcA

5 ms

90 ms

1

funcB

10 ms

85 ms

1

funcC

75 ms

75 ms

5

Sum

90 ms

250 ms ???

7

15 ms
Now we’ve added another function funcD that also calls funcB once. Notice how the call
count, isolated and whole times changed.
Whole time really just tells you how much time it took for a function and all of the other
functions the original function spawned took to execute.
The whole time for funcA is high but it’s isolated time is low. That tells you it is spawning
other functions that are taking a lot of time. It could be because funcA is calling other
functions too many times or it could be that the other functions are slow etc.

Program

funcA

funcA();
funcD();

5 ms

funcC

funcB

1

5

10 ms

funcD
3 ms

1

Function

Isolated Time

Whole Time

Call Count

funcA

5 ms

90 ms

1

funcD

3 ms

88 ms

1

funcB

20 ms

170 ms

2

funcC

150 ms

150 ms

10

15 ms
In this example, funcExt is a function that is not profiled by Kojak. This could be because
you’ve purposely ignored the function or it’s a vendor library (jQuery etc.) that you have
not profiled with Kojak.
Notice how funcC’s isolated time is 325 ms. This is because Kojak doesn’t know how
much time funcExt took to execute so it isn’t subtracted from funcC.

Program
funcA();

funcA
5 ms

funcB

1

funcC

5

10 ms

Function

Isolated Time

Whole Time

Call Count

funcA

5 ms

340 ms

1

funcB

10 ms

335 ms

1

funcC

325 ms

325 ms

5

15 ms

funcExt

1

50 ms
This is just like the previous example but funcC calls an internally accessible anonymous
function. Kojak cannot access or profile anonymous functions that are not exposed via
accessible packages / classes / prototypes.
Example of anonymous function:
mypackage.funcC = function(){
// body of funcC
var anonymousFunction = function(){
// etc – takes 50 ms
};
anonymousFunction();
};

Program
funcA();

funcA
5 ms

funcB

1

funcC

5

10 ms

Function

Isolated Time

Whole Time

Call Count

funcA

5 ms

340 ms

1

funcB

10 ms

335 ms

1

funcC

325 ms

325 ms

5

15 ms

Anonymous function

1

50 ms
Asynchronous function calls and network requests are typically not included in
isolated or whole times.
In this example, spawning funcC takes 0 ms but the asynchronous code in funcC
takes 15 ms. The asynchronous code does not block funcB.

Program
funcA();

funcA
5 ms

funcB

1

funcC (asynchronous)

5

10 ms

Function

Isolated Time

Whole Time

Call Count

funcA

5 ms

15 ms

1

funcB

10 ms

10 ms

1

funcC

0 ms

0 ms

5

15 ms
Synchronous network calls are handled just like anything else in Kojak. They are
included in isolated and whole time

Program
funcA();

funcA
5 ms

funcB

1

synchronousNetworkCall

5

10 ms

Function

Isolated Time

Whole Time

Call Count

funcA

5 ms

90 ms

1

funcB

10 ms

85 ms

1

funcC

75 ms

75 ms

5

15 ms
Un-profiled functions are not included in the total sum isolated time.
See how the sum isolated time is 130 ms but the program actually took 180 ms
to run? It’s because funcExt1 isn’t included in the totals for isolated time. But
funcExt2 is included because a profiled function (funcD) invoked it.
Un-profiled functions are only included in isolated time measurements if one of
the calling functions has been profiled by Kojak.

funcA

Program

funcB

1

5 ms

funcA();
funcExt1();

funcExt1

funcC

5

10 ms

funcD

50 ms

1

15 ms

funcExt2

1

15 ms

Function

Isolated Time

Whole Time

Call Count

funcA

5 ms

90 ms

1

funcB

10 ms

85 ms

1

funcC

75 ms

75 ms

5

funcD

40 ms

40 ms

1

Sum

130 ms

-

7

25 ms
Isolated times do not include when the user isn’t doing anything. Isolated time is
when profiled code is actually executing.
In this example, the programs shows a dialog and then listens for a button click
event. When the user clicks a button the onButtonClick function is invoked.
The user clicks the button 3 times in this example. Down time while the user is
waiting to click the button is not included in any of the metrics.

Program

showDialog

showDialog();

5 ms
Event listener

3

onButtonClick
10 ms

Function

Isolated Time

Whole Time

Call Count

showDialog

5 ms

35 ms

1

onButtonClick

30 ms

30 ms

3

Sum

35 ms

-

4

Más contenido relacionado

La actualidad más candente

Using Grails to power your electric car
Using Grails to power your electric carUsing Grails to power your electric car
Using Grails to power your electric carMarco Pas
 
NYAN Conference: Debugging asynchronous scenarios in .net
NYAN Conference: Debugging asynchronous scenarios in .netNYAN Conference: Debugging asynchronous scenarios in .net
NYAN Conference: Debugging asynchronous scenarios in .netAlexandra Hayere
 
Click-Through Example for Flink’s KafkaConsumer Checkpointing
Click-Through Example for Flink’s KafkaConsumer CheckpointingClick-Through Example for Flink’s KafkaConsumer Checkpointing
Click-Through Example for Flink’s KafkaConsumer CheckpointingRobert Metzger
 
Robert Metzger - Connecting Apache Flink to the World - Reviewing the streami...
Robert Metzger - Connecting Apache Flink to the World - Reviewing the streami...Robert Metzger - Connecting Apache Flink to the World - Reviewing the streami...
Robert Metzger - Connecting Apache Flink to the World - Reviewing the streami...Flink Forward
 
Command Line Interface - Control Chamber
Command Line Interface - Control ChamberCommand Line Interface - Control Chamber
Command Line Interface - Control ChamberWorachart Pirunruk
 
Presentation mcrl2
Presentation mcrl2Presentation mcrl2
Presentation mcrl2matifch
 
Looping statements in Java
Looping statements in JavaLooping statements in Java
Looping statements in JavaJin Castor
 
Ob1k presentation at Java.IL
Ob1k presentation at Java.ILOb1k presentation at Java.IL
Ob1k presentation at Java.ILEran Harel
 
Introduction of Object Oriented JavaScript
Introduction of Object Oriented JavaScriptIntroduction of Object Oriented JavaScript
Introduction of Object Oriented JavaScriptNexThoughts Technologies
 
Chap6 procedures & macros
Chap6 procedures & macrosChap6 procedures & macros
Chap6 procedures & macrosHarshitParkar6677
 

La actualidad más candente (20)

HTTP/2 Server Push
HTTP/2 Server PushHTTP/2 Server Push
HTTP/2 Server Push
 
AMC Minor Technical Issues
AMC Minor Technical IssuesAMC Minor Technical Issues
AMC Minor Technical Issues
 
Using Grails to power your electric car
Using Grails to power your electric carUsing Grails to power your electric car
Using Grails to power your electric car
 
NYAN Conference: Debugging asynchronous scenarios in .net
NYAN Conference: Debugging asynchronous scenarios in .netNYAN Conference: Debugging asynchronous scenarios in .net
NYAN Conference: Debugging asynchronous scenarios in .net
 
Reactive Java (GeeCON 2014)
Reactive Java (GeeCON 2014)Reactive Java (GeeCON 2014)
Reactive Java (GeeCON 2014)
 
Loop c++
Loop c++Loop c++
Loop c++
 
Click-Through Example for Flink’s KafkaConsumer Checkpointing
Click-Through Example for Flink’s KafkaConsumer CheckpointingClick-Through Example for Flink’s KafkaConsumer Checkpointing
Click-Through Example for Flink’s KafkaConsumer Checkpointing
 
Robert Metzger - Connecting Apache Flink to the World - Reviewing the streami...
Robert Metzger - Connecting Apache Flink to the World - Reviewing the streami...Robert Metzger - Connecting Apache Flink to the World - Reviewing the streami...
Robert Metzger - Connecting Apache Flink to the World - Reviewing the streami...
 
Introduction to Reactive Java
Introduction to Reactive JavaIntroduction to Reactive Java
Introduction to Reactive Java
 
Command Line Interface - Control Chamber
Command Line Interface - Control ChamberCommand Line Interface - Control Chamber
Command Line Interface - Control Chamber
 
Functions
FunctionsFunctions
Functions
 
Java loops
Java loopsJava loops
Java loops
 
Presentation mcrl2
Presentation mcrl2Presentation mcrl2
Presentation mcrl2
 
Looping statements in Java
Looping statements in JavaLooping statements in Java
Looping statements in Java
 
Golang dot-testing-lite
Golang dot-testing-liteGolang dot-testing-lite
Golang dot-testing-lite
 
Ob1k presentation at Java.IL
Ob1k presentation at Java.ILOb1k presentation at Java.IL
Ob1k presentation at Java.IL
 
Introduction of Object Oriented JavaScript
Introduction of Object Oriented JavaScriptIntroduction of Object Oriented JavaScript
Introduction of Object Oriented JavaScript
 
Programming loop
Programming loopProgramming loop
Programming loop
 
Chap6 procedures & macros
Chap6 procedures & macrosChap6 procedures & macros
Chap6 procedures & macros
 
Looping statements
Looping statementsLooping statements
Looping statements
 

Similar a Kojak Metrics Explained

FUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPTFUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPT03062679929
 
wepik-mastering-function-in-c-a-comprehensive-guide-20231220121719HZHU.pptx
wepik-mastering-function-in-c-a-comprehensive-guide-20231220121719HZHU.pptxwepik-mastering-function-in-c-a-comprehensive-guide-20231220121719HZHU.pptx
wepik-mastering-function-in-c-a-comprehensive-guide-20231220121719HZHU.pptxavishekpradhan24
 
Inline function
Inline functionInline function
Inline functionTech_MX
 
Javascript internals
Javascript internalsJavascript internals
Javascript internalsAyush Sharma
 
662213141-Tuxdoc-com-Programming-in-c-Reema-Thareja.pdf
662213141-Tuxdoc-com-Programming-in-c-Reema-Thareja.pdf662213141-Tuxdoc-com-Programming-in-c-Reema-Thareja.pdf
662213141-Tuxdoc-com-Programming-in-c-Reema-Thareja.pdfManiMala75
 
USER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdf
USER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdfUSER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdf
USER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdfSowmyaJyothi3
 
Function Overloading,Inline Function and Recursion in C++ By Faisal Shahzad
Function Overloading,Inline Function and Recursion in C++ By Faisal ShahzadFunction Overloading,Inline Function and Recursion in C++ By Faisal Shahzad
Function Overloading,Inline Function and Recursion in C++ By Faisal ShahzadFaisal Shehzad
 
Functions and tasks in verilog
Functions and tasks in verilogFunctions and tasks in verilog
Functions and tasks in verilogNallapati Anindra
 
Matlab for diploma students(1)
Matlab for diploma students(1)Matlab for diploma students(1)
Matlab for diploma students(1)Retheesh Raj
 
Help Needed!UNIX Shell and History Feature This project consists.pdf
Help Needed!UNIX Shell and History Feature This project consists.pdfHelp Needed!UNIX Shell and History Feature This project consists.pdf
Help Needed!UNIX Shell and History Feature This project consists.pdfmohdjakirfb
 
Document 14 (6).pdf
Document 14 (6).pdfDocument 14 (6).pdf
Document 14 (6).pdfRajMantry
 
Lec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Performance
Lec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- PerformanceLec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Performance
Lec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- PerformanceHsien-Hsin Sean Lee, Ph.D.
 
Lecture 1_Functions in C.pptx
Lecture 1_Functions in C.pptxLecture 1_Functions in C.pptx
Lecture 1_Functions in C.pptxKhurramKhan173
 
Recursion & Erlang, FunctionalConf 14, Bangalore
Recursion & Erlang, FunctionalConf 14, BangaloreRecursion & Erlang, FunctionalConf 14, Bangalore
Recursion & Erlang, FunctionalConf 14, BangaloreBhasker Kode
 
Survey of task scheduler
Survey of task schedulerSurvey of task scheduler
Survey of task schedulerelisha25
 
Faster Python Programs Through Optimization by Dr.-Ing Mike Muller
Faster Python Programs Through Optimization by Dr.-Ing Mike MullerFaster Python Programs Through Optimization by Dr.-Ing Mike Muller
Faster Python Programs Through Optimization by Dr.-Ing Mike MullerPyData
 

Similar a Kojak Metrics Explained (20)

Basic c++
Basic c++Basic c++
Basic c++
 
FUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPTFUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPT
 
wepik-mastering-function-in-c-a-comprehensive-guide-20231220121719HZHU.pptx
wepik-mastering-function-in-c-a-comprehensive-guide-20231220121719HZHU.pptxwepik-mastering-function-in-c-a-comprehensive-guide-20231220121719HZHU.pptx
wepik-mastering-function-in-c-a-comprehensive-guide-20231220121719HZHU.pptx
 
Inline function
Inline functionInline function
Inline function
 
Javascript internals
Javascript internalsJavascript internals
Javascript internals
 
662213141-Tuxdoc-com-Programming-in-c-Reema-Thareja.pdf
662213141-Tuxdoc-com-Programming-in-c-Reema-Thareja.pdf662213141-Tuxdoc-com-Programming-in-c-Reema-Thareja.pdf
662213141-Tuxdoc-com-Programming-in-c-Reema-Thareja.pdf
 
USER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdf
USER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdfUSER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdf
USER DEFINED FUNCTIONS IN C MRS.SOWMYA JYOTHI.pdf
 
Function Overloading,Inline Function and Recursion in C++ By Faisal Shahzad
Function Overloading,Inline Function and Recursion in C++ By Faisal ShahzadFunction Overloading,Inline Function and Recursion in C++ By Faisal Shahzad
Function Overloading,Inline Function and Recursion in C++ By Faisal Shahzad
 
Functions and tasks in verilog
Functions and tasks in verilogFunctions and tasks in verilog
Functions and tasks in verilog
 
Matlab ppt
Matlab pptMatlab ppt
Matlab ppt
 
Matlab for diploma students(1)
Matlab for diploma students(1)Matlab for diploma students(1)
Matlab for diploma students(1)
 
Help Needed!UNIX Shell and History Feature This project consists.pdf
Help Needed!UNIX Shell and History Feature This project consists.pdfHelp Needed!UNIX Shell and History Feature This project consists.pdf
Help Needed!UNIX Shell and History Feature This project consists.pdf
 
Document 14 (6).pdf
Document 14 (6).pdfDocument 14 (6).pdf
Document 14 (6).pdf
 
Lec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Performance
Lec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- PerformanceLec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Performance
Lec3 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Performance
 
Ch5 answers
Ch5 answersCh5 answers
Ch5 answers
 
Lecture 1_Functions in C.pptx
Lecture 1_Functions in C.pptxLecture 1_Functions in C.pptx
Lecture 1_Functions in C.pptx
 
Recursion & Erlang, FunctionalConf 14, Bangalore
Recursion & Erlang, FunctionalConf 14, BangaloreRecursion & Erlang, FunctionalConf 14, Bangalore
Recursion & Erlang, FunctionalConf 14, Bangalore
 
Survey of task scheduler
Survey of task schedulerSurvey of task scheduler
Survey of task scheduler
 
Faster Python Programs Through Optimization by Dr.-Ing Mike Muller
Faster Python Programs Through Optimization by Dr.-Ing Mike MullerFaster Python Programs Through Optimization by Dr.-Ing Mike Muller
Faster Python Programs Through Optimization by Dr.-Ing Mike Muller
 
Building a cron scheduler
Building a cron schedulerBuilding a cron scheduler
Building a cron scheduler
 

Último

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
[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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Último (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
[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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Kojak Metrics Explained

  • 1. A very simple program with 3 functions that are all profiled with Kojak. Program funcA(); funcB(); funcC(); funcA funcB 10 ms 5 ms funcC 15 ms Function Isolated Time Whole Time Call Count funcA 5 ms 5 ms 1 funcB 10 ms 10ms 1 funcC 15 ms 15 ms 1
  • 2. Now funcA calls funcB once and funcB calls funcC once. See how the whole times increase for funcA and funcB? Whole time is the functions time plus any other functions that are invoked. Program funcA(); funcA 5 ms funcB 1 funcC 1 10 ms Function Isolated Time Whole Time Call Count funcA 5 ms 30 ms 1 funcB 10 ms 25 ms 1 funcC 15 ms 15 ms 1 15 ms
  • 3. Now funcB calls funcC 5 times. The whole time increases for funcA and funcB. Note that the sum of the whole times and isolated times. The sum of the isolated times is the true measured time of how long the program took to run. (in some situations this isn’t accurate. Discussed in later example) The sum of the whole times is a nonsense number that doesn’t really tell you anything useful. Program funcA(); funcA 5 ms funcB 1 funcC 5 10 ms Function Isolated Time Whole Time Call Count funcA 5 ms 90 ms 1 funcB 10 ms 85 ms 1 funcC 75 ms 75 ms 5 Sum 90 ms 250 ms ??? 7 15 ms
  • 4. Now we’ve added another function funcD that also calls funcB once. Notice how the call count, isolated and whole times changed. Whole time really just tells you how much time it took for a function and all of the other functions the original function spawned took to execute. The whole time for funcA is high but it’s isolated time is low. That tells you it is spawning other functions that are taking a lot of time. It could be because funcA is calling other functions too many times or it could be that the other functions are slow etc. Program funcA funcA(); funcD(); 5 ms funcC funcB 1 5 10 ms funcD 3 ms 1 Function Isolated Time Whole Time Call Count funcA 5 ms 90 ms 1 funcD 3 ms 88 ms 1 funcB 20 ms 170 ms 2 funcC 150 ms 150 ms 10 15 ms
  • 5. In this example, funcExt is a function that is not profiled by Kojak. This could be because you’ve purposely ignored the function or it’s a vendor library (jQuery etc.) that you have not profiled with Kojak. Notice how funcC’s isolated time is 325 ms. This is because Kojak doesn’t know how much time funcExt took to execute so it isn’t subtracted from funcC. Program funcA(); funcA 5 ms funcB 1 funcC 5 10 ms Function Isolated Time Whole Time Call Count funcA 5 ms 340 ms 1 funcB 10 ms 335 ms 1 funcC 325 ms 325 ms 5 15 ms funcExt 1 50 ms
  • 6. This is just like the previous example but funcC calls an internally accessible anonymous function. Kojak cannot access or profile anonymous functions that are not exposed via accessible packages / classes / prototypes. Example of anonymous function: mypackage.funcC = function(){ // body of funcC var anonymousFunction = function(){ // etc – takes 50 ms }; anonymousFunction(); }; Program funcA(); funcA 5 ms funcB 1 funcC 5 10 ms Function Isolated Time Whole Time Call Count funcA 5 ms 340 ms 1 funcB 10 ms 335 ms 1 funcC 325 ms 325 ms 5 15 ms Anonymous function 1 50 ms
  • 7. Asynchronous function calls and network requests are typically not included in isolated or whole times. In this example, spawning funcC takes 0 ms but the asynchronous code in funcC takes 15 ms. The asynchronous code does not block funcB. Program funcA(); funcA 5 ms funcB 1 funcC (asynchronous) 5 10 ms Function Isolated Time Whole Time Call Count funcA 5 ms 15 ms 1 funcB 10 ms 10 ms 1 funcC 0 ms 0 ms 5 15 ms
  • 8. Synchronous network calls are handled just like anything else in Kojak. They are included in isolated and whole time Program funcA(); funcA 5 ms funcB 1 synchronousNetworkCall 5 10 ms Function Isolated Time Whole Time Call Count funcA 5 ms 90 ms 1 funcB 10 ms 85 ms 1 funcC 75 ms 75 ms 5 15 ms
  • 9. Un-profiled functions are not included in the total sum isolated time. See how the sum isolated time is 130 ms but the program actually took 180 ms to run? It’s because funcExt1 isn’t included in the totals for isolated time. But funcExt2 is included because a profiled function (funcD) invoked it. Un-profiled functions are only included in isolated time measurements if one of the calling functions has been profiled by Kojak. funcA Program funcB 1 5 ms funcA(); funcExt1(); funcExt1 funcC 5 10 ms funcD 50 ms 1 15 ms funcExt2 1 15 ms Function Isolated Time Whole Time Call Count funcA 5 ms 90 ms 1 funcB 10 ms 85 ms 1 funcC 75 ms 75 ms 5 funcD 40 ms 40 ms 1 Sum 130 ms - 7 25 ms
  • 10. Isolated times do not include when the user isn’t doing anything. Isolated time is when profiled code is actually executing. In this example, the programs shows a dialog and then listens for a button click event. When the user clicks a button the onButtonClick function is invoked. The user clicks the button 3 times in this example. Down time while the user is waiting to click the button is not included in any of the metrics. Program showDialog showDialog(); 5 ms Event listener 3 onButtonClick 10 ms Function Isolated Time Whole Time Call Count showDialog 5 ms 35 ms 1 onButtonClick 30 ms 30 ms 3 Sum 35 ms - 4