Guillem Jover
dfaeb89eda
TT#69200 Add more unit tests for NGCP::BulkProcessor::Array
...
Change-Id: I5164ccdeb14ece516a95264fef11c728331fdbdd
6 years ago
Guillem Jover
5d38bd26f7
TT#69200 Reimplement itemcount() based on grep()
...
This is somewhat faster:
Rate for_case grep_case for grep
for_case 53476/s -- -32% -42% -50%
grep_case 78125/s 46% -- -15% -27%
for 91743/s 72% 17% -- -14%
grep 106383/s 99% 36% 16% --
Change-Id: I7b44f8f3b2146971f7b38e0224295ab7d301c615
6 years ago
Guillem Jover
9485368290
TT#69200 Reimplement removeduplicates() based of List::Util's uniq
...
This adds a behavior change, reflected in the unit test changes, by
always returning the lowercased versions of the array elements when
case insensitiveness is enabled. This should be fine, given that we
do not care from the callers PoV, and the result might have changed
depending on the order of the inputs.
Change-Id: I44896183b566e921cc1287f106fb4bb9332acb97
6 years ago
Guillem Jover
c88a6b27db
TT#69200 Add initial unit tests for NGCP::BulkProcessor::Array
...
Change-Id: I1bd29194a4df1ad5a85b49342c7a8381ff5336e0
6 years ago
Guillem Jover
7857a1c575
TT#69200 Susbstantially simplify and generalize kbytes2gigs()
...
This makes it possible to easily extend the function to support new
units.
Change-Id: I9e0935fb20013e962e48ec6e27a04d01cd9730be
6 years ago
Guillem Jover
e6ebcc15c5
TT#69200 Use Time::Piece and Time::Local to add up months
...
These are core modules, which require no additional dependencies.
Change-Id: I8dbda5142dcc9d095a2c703ef6cee5364d2ba55a
6 years ago
Guillem Jover
018eafb770
TT#69200 Use Time::Piece instead of ad-hoc code to print dates and times
...
This is a core module, which requires no additional dependencies.
Change-Id: I0830f022788a5e7b69b0afa462654fabf277e254
6 years ago
Guillem Jover
72d7000151
TT#69200 Use Time::Seconds instead of ad-hoc code to pretty print time offsets
...
This is a core module, which requires no additional dependencies.
Change-Id: I93a2c3fd75fd7790461ccc694ed73c4899a1ef20
6 years ago
Guillem Jover
561e36d08c
TT#69200 Use sprintf instead of ad-hoc code to 0 fill digits
...
Which is also around 300% faster:
Rate had-hoc sprintf
had-hoc 3508772/s -- -75%
sprintf 14084507/s 301% --
Change-Id: I5ebce0058473f9de08c381739646a20e42308a8f
6 years ago