Difference between revisions of "CodeProfiling"

From Flowcode Help
Jump to navigationJump to search
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<sidebar>Sidebar: Flowcode Help Overview:ToolsViews</sidebar>
 
 
 
 
__TOC__
 
__TOC__
  
  
 
===Code Profiling Introduction===
 
===Code Profiling Introduction===
Code profiling is a tool for identifying bugs within code and also alerting programmers of redundant code. When users simulate their program, Flowcode will highlight the icons that are 'hit', the frequency at which they are hit, and also notiy which icons have never been hit.
+
Code profiling is a tool for identifying bugs within code and also alerting programmers of redundant code during simulation. Flowcode will highlight any icons which are 'hit', the frequency at which they are hit, and also notify which icons have never been hit.
  
  
 
===Activating Code Profiling===
 
===Activating Code Profiling===
Code profiling is activated from the top toolbar with the following icon File:CodeProfilingIcon.png Once activated, run the simulation as normal and you will see the glow appear around icons that have been hit. A cross will appear over any icons that have not been executed.  
+
Code profiling is activated from the top toolbar with the following icon [[File:CodeProfilingIcon.png]] Once activated, run the simulation as normal and you will see the glow appear around icons that have been hit. A cross will appear over any icons that have not been executed.  
 
 
 
 
[[File:CodeProfilingEx1a.png|right]]
 
Here we can see that the 'yes' branch of the switch statement has not been executed, and so the output B0 icon, has also not been executed. This could be due to a bug in the code, or as in this example, the switch simply hasn't been pressed yet.
 
 
 
====test====
 
[[File:CodeProfilingEx1b.png|right]]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
  
 +
===Using Code Profiling===
 +
Here we can see that the 'yes' branch of the switch statement has not been executed, and so the 'output 1 to B0' icon, has also not been executed. This could be due to a bug in the code, or as in this example, the switch simply hasn't been pressed yet.
 +
[[File:CodeProfilingEx1a.png]]
  
  
  
 +
Here we can see that the switch has been pressed now. We know this as the cross has disappeared, and the icon has turned blue. The blue is a visual representation of how frequently this icon has been executed. Red icons are hit every time, and the more blue they turn, the less frequently they are executed.
  
Here we can see that the switch has been pressed now. We know this as the cross has disappeared, and the icon has turned blue. The blue is a visual representation of how frequently this icon has been executed. Red icons are hit every time, and the more blue they turn, the less frequenct they are executed.
+
[[File:CodeProfilingEx1b.png]]

Latest revision as of 08:38, 2 July 2019


Code Profiling Introduction

Code profiling is a tool for identifying bugs within code and also alerting programmers of redundant code during simulation. Flowcode will highlight any icons which are 'hit', the frequency at which they are hit, and also notify which icons have never been hit.


Activating Code Profiling

Code profiling is activated from the top toolbar with the following icon CodeProfilingIcon.png Once activated, run the simulation as normal and you will see the glow appear around icons that have been hit. A cross will appear over any icons that have not been executed.


Using Code Profiling

Here we can see that the 'yes' branch of the switch statement has not been executed, and so the 'output 1 to B0' icon, has also not been executed. This could be due to a bug in the code, or as in this example, the switch simply hasn't been pressed yet. CodeProfilingEx1a.png


Here we can see that the switch has been pressed now. We know this as the cross has disappeared, and the icon has turned blue. The blue is a visual representation of how frequently this icon has been executed. Red icons are hit every time, and the more blue they turn, the less frequently they are executed.

CodeProfilingEx1b.png