Revision: 1439
Author: [email protected]
Date: Wed Dec 26 10:20:07 2012
Log: Fixed to sort tables with microsecond values in non-utf8
encodings, RT#77843
http://code.google.com/p/perl-devel-nytprof/source/detail?r=1439
Modified:
/trunk/Changes
/trunk/bin/nytprofhtml
=======================================
--- /trunk/Changes Wed Dec 26 08:37:24 2012
+++ /trunk/Changes Wed Dec 26 10:20:07 2012
@@ -15,6 +15,8 @@
changes and hash randomization.
Fixed so tests ignore sitecustomize.pl, RT#79784
thanks to [email protected].
+ Fixed to sort tables with microsecond values in non-utf8
+ encodings, RT#77843
Corrected spelling thanks to Alessandro Ghedini @debian RT80370
=======================================
--- /trunk/bin/nytprofhtml Sun Sep 16 04:31:07 2012
+++ /trunk/bin/nytprofhtml Wed Dec 26 10:20:07 2012
@@ -1567,16 +1567,17 @@
},
format: function(orig) { // format data for normalization
// console.log(orig);
- val = orig.replace(/ns/,'');
+ var val = orig.replace(/ns/,'');
if (val != orig) { return val / (1000*1000*1000); }
- val = orig.replace(/µs/,''); /* XXX use µ ? */
+ val = orig.replace(/[µ\xB5]s/,''); /* allow for browser
encoding XXX use µ ? */
if (val != orig) { return val / (1000*1000); }
- var val = orig.replace(/ms/,'');
+ val = orig.replace(/ms/,'');
if (val != orig) { return val / (1000); }
- var val = orig.replace(/s/,'');
+ val = orig.replace(/([0-9])s/,"\$1");
if (val != orig) { return val; }
if (orig == '0') { return orig; }
- console.log('no match for fmt_time of '.concat(orig));
+ var non_number = orig.replace(/^[-+]?[0-9.]+/, '', 'g');
+ console.log('no match for fmt_time of '+orig+'
(units:'+non_number+' charCodeAt0:'+non_number.charCodeAt(0)+')');
return orig;
},
type: 'numeric' // set type, either numeric or text
--
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.
Group hosted at: http://groups.google.com/group/develnytprof-dev
Project hosted at: http://perl-devel-nytprof.googlecode.com
CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf
To post, email: [email protected]
To unsubscribe, email: [email protected]