[Scilab-users] code coverage

classic Classic list List threaded Threaded
3 messages Options
kjubo kjubo
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] code coverage

Dear all,

I am not able to find out, how to make a profiling on functions, if they are
nested.
consider this example:

//SCILAB CODE START
clc,clear
function fx = sub1(x1,x2)
    fx = x1+x2
    fx = fx/x2
endfunction
function fx = sub2(x1,x2)
    fx = sub1(x1,x2)
endfunction

nrun = 1e4
covStart("all")
for ii=1:nrun
    sub2(10,7)
end
covWrite("html", "TMPDIR/coverage")
covStop()
winopen('TMPDIR/coverage/'+'sub2'+'.html')
winopen('TMPDIR/coverage/'+'sub1'+'.html') //DOES NOT EXIST
//SCILAB CODE END

Is there any trick?

thanks in advance

BR
J.K.



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
fmiyara fmiyara
Reply | Threaded
Open this post in threaded view
|

Re: code coverage


What do you mean by a profiling on functions?

Federico Miyara

On 18/09/2019 16:49, kjubo wrote:
Dear all,

I am not able to find out, how to make a profiling on functions, if they are
nested.
consider this example:

//SCILAB CODE START
clc,clear
function fx = sub1(x1,x2)
    fx = x1+x2
    fx = fx/x2
endfunction
function fx = sub2(x1,x2)
    fx = sub1(x1,x2)
endfunction

nrun = 1e4
covStart("all")
for ii=1:nrun
    sub2(10,7)
end
covWrite("html", "TMPDIR/coverage")
covStop()
winopen('TMPDIR/coverage/'+'sub2'+'.html')
winopen('TMPDIR/coverage/'+'sub1'+'.html') //DOES NOT EXIST
//SCILAB CODE END

Is there any trick?

thanks in advance

BR
J.K.



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users



Libre de virus. www.avast.com

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
kjubo kjubo
Reply | Threaded
Open this post in threaded view
|

Re: code coverage

After trials found the problem, bug reported

št 19. 9. 2019 o 10:05 Federico Miyara <[hidden email]> napísal(a):

What do you mean by a profiling on functions?

Federico Miyara

On 18/09/2019 16:49, kjubo wrote:
Dear all,

I am not able to find out, how to make a profiling on functions, if they are
nested.
consider this example:

//SCILAB CODE START
clc,clear
function fx = sub1(x1,x2)
    fx = x1+x2
    fx = fx/x2
endfunction
function fx = sub2(x1,x2)
    fx = sub1(x1,x2)
endfunction

nrun = 1e4
covStart("all")
for ii=1:nrun
    sub2(10,7)
end
covWrite("html", "TMPDIR/coverage")
covStop()
winopen('TMPDIR/coverage/'+'sub2'+'.html')
winopen('TMPDIR/coverage/'+'sub1'+'.html') //DOES NOT EXIST
//SCILAB CODE END

Is there any trick?

thanks in advance

BR
J.K.



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users



Libre de virus. www.avast.com
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users