source: issm/trunk/src/m/classes/debug.js@ 21341

Last change on this file since 21341 was 21341, checked in by Mathieu Morlighem, 8 years ago

merged trunk-jpl and trunk for revision 21337

File size: 895 bytes
Line 
1//DEBUG class definition
2//
3// Usage:
4// debug=new debug();
5
6function debug (){
7 //methods
8 this.setdefaultparameters = function(){// {{{
9 }// }}}
10 this.classname= function(){// {{{
11 return "debug";
12 }// }}}
13 this.disp= function(){// {{{
14 console.log(sprintf(' debug parameters:'));
15 console.log(sprintf(' debug parameters:'));
16
17 fielddisplay(this,'valgrind','use Valgrind to debug (0 or 1)');
18 fielddisplay(this,'gprof','use gnu-profiler to find out where the time is spent');
19 fielddisplay(this,'profiling','enables profiling (memory, flops, time)');
20
21 }// }}}
22 this.marshall=function(md,prefix,fid) { //{{{
23 WriteData(fid,prefix,'object',this,'fieldname','profiling','format','Boolean');
24 }//}}}
25 this.fix=function() { //{{{
26 }//}}}
27
28 //properties
29 // {{{
30 this.valgrind = false;
31 this.gprof = false;
32 this.profiling = false;
33 this.setdefaultparameters();
34 //}}}
35}
Note: See TracBrowser for help on using the repository browser.