Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
XPath Parser
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Sylvain Schmitz
XPath Parser
Commits
02cd183a
Commit
02cd183a
authored
Jun 27, 2018
by
David BAELDE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More countfuns fun
parent
a1424337
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
tools/extensions/countfuns.pl
tools/extensions/countfuns.pl
+9
-4
No files found.
tools/extensions/countfuns.pl
View file @
02cd183a
...
...
@@ -289,6 +289,12 @@ for $fname (sort { $table{$b} <=> $table{$a} } keys %table) {
print
"
* There are
$n
functions with >=
$threshold
occurrences,
\n
";
printf
("
together they account for %.2f%% of occurrences.
\n
",
100
*
(
$sofar
/
$total
));
open
THR
,"
>
","
countfuns_
${suffix}
_
${threshold}
nb.tex
";
printf
THR
"
$n
";
close
THR
;
open
THR
,"
>
","
countfuns_
${suffix}
_
${threshold}
pc.tex
";
printf
THR
"
%.2f
\\
%%
",
100
*
$sofar
/
$total
;
close
THR
;
$threshold
=
0
;
}
$n
++
;
...
...
@@ -298,15 +304,14 @@ for $fname (sort { $table{$b} <=> $table{$a} } keys %table) {
print
"
*
$n
functions (out of
$nbfuns
) needed to cover 70% of occurrences.
\n
";
}
$percent
=
100
*
$sofar
/
$total
;
print
DAT
"
$n
$table
{
$fname
}
$percent
\n
";
printf
DAT
"
$n
$table
{
$fname
} %.2f
\n
",
100
*
$sofar
/
$total
;
if
(
grep
{
$fname
eq
$_
}
@stdfuns
)
{
$sofar_std
+=
$table
{
$fname
};
$percent
=
100
*
$sofar_std
/
$total
;
print
STD
"
$n
$table
{
$fname
}
$percent
\n
";
printf
STD
"
$n
$table
{
$fname
} %.2f
\n
",
100
*
$sofar_std
/
$total
;
}
else
{
print
NONSTD
"
$n
$table
{
$fname
}
\n
";
}
}
$locale_nbfuns
=
reverse
join
'
,
',
unpack
'
(A3)*
',
reverse
$nbfuns
;
print
TOTAL
("
$locale_nbfuns
");
printf
COV
"
%.2f
",
100
*
$sofar_std
/
$total
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment