SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

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
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
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
 
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
 
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
 
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
 
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
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
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
 

Kürzlich hochgeladen (20)

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
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
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...
 
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...
 
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
 
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
 
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...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 

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