- change magic string literal to a b'' string so that the comparison
works in python 3
- expand timestamp tuples (struct.unpack always returns a tuple) before
attempting to cast to float.
The Output processor which is used to upload the results found in the
wa_output folder to a Postgres database, whose schema is defined by the
WA Create Database command.
- Change how "source" and "dest" are handled inside merge() to be more
sane and less confusing, ensuring that disabling toggles are merged
correctly.
- Do not drop disabling values during merge, to ensure that merging
is a transitive operation.
- Add unit tests for the above fixes.
- Add copyright headers to files that did not already have them
- Update the year to the last year the file was modified in files with
existing headers.
Consider headers when calculating column widths. This will ensure proper
alignment in cases where the column header is wider than any of the
column values.
The ValueError does not given enough information in the case of an empty file
extension. Add a special case to handle files with no extension and
prompt the user.
This should have been handled by the @total_ordering decorator, but
isn't due to
https://bugs.python.org/issue25732
(briefly, total_ordering is back-ported from Python 3, where the base
object provides the default implementation of __ne__ based on __eq__, so
total_ordering did not override it; this, however does not happen in
Python 2).
Also update unit tests to catch this edge case.
During Python 3 migration, the izip call inside diff_interrupt_files has
been replaced with a zip call (zip returning an iterator in Python 3).
Import zip from builtins to ensure that it also produces an iterator in
Python 2.
Also fix the associated unit test by importing the correct function.
Fix a regression introduced with Python 3 port -- JSON deserializer
should check for basestring rather than str when deciding whether to try
to decode a custom type.
The implementation of the `counter` was duplicated in both
`wa.utils.counters` and `wa.utils.types.counter` the latter of which is
currently unsed, therefore port missing functionality to the former and
remove.
Previously the `once_per_instance` used the output of `__repr__` to
identify the class of where the decorated method was called from. For
classes that override this method to produce the same output for
different instances of the same class this caused different instances to
be mistakenly treated as one. Now use the hash of the containing class
instead of the string representation and update the tests to catch this
error.
Add a cpu_mask type to allow for users to use a consistent way of representing a
cpus mask with properties to provide conversions between the various required
forms. The mask can be specified directly as a mask, as a list of cpus indexes
or a sysfs-style string.
Also add support for the type to be serialized/deserialzed for the json
and yaml serializers.
Add cpustates output processor. This is more-or-less a port of the
cpustates processor from WA, however there are some differences:
- Idle states are now tracked individually per-CPU. This will fix
processing traces from targets that have different number of idle
states on different clusters.
- Simplify the parameter list for report_power_stats:
- Replace paths to individual report files with a path to a single
directory. A subdirectory will be created under it which will
contain all the reports.
- Replace the individual bits bits of information about CPUs (core
names, idle states, etc) with a list of CpuInfo objects.
- Clean up and simplify the code a bit:
- Make all reports mandatory -- the marginal cost of generating
an additional report is minimal compared to tracking power states
in the first place.
- Standardize the interface for Reporters and Reports.
- Rename some of the reports to something a bit more meaningful.
- The stand-alone command line interface is not ported for now, as it
is now possible to run this offline on existing results using
"wa process".
Move the check_for_markers and events parameters from parser() to
__init__(). These parameters control the behavior of the parser, and do
not relate to a particular trace file, so it makes more sense to have
them there.
- Use indentcontext inside initialize_run to make sure log level
is dedented on error.
- Ensure Executor postamble always runs, event if runner errors.
- Fix format_duration() to handle sub-second timedeltas.
Ensure buffered records are indented properly by saving the indent level
at the time the record was generated as part of the record, and
preferring that over the current indent level inside LineFormatter.
Buffer early log records until a log file becomes available, flush
records to said file afterwards. This ensures that early log output,
which, among other things, contains plugin discovery logging, is not
lost. Buffer capacity is configurable via an environment variable.
Add support for "~~" special value that indicates that, when merging
into another set, all values from that set should in fact be dropped.
Apart from the unique merge semantics, "~~" just like any other "~"
value.
- The merge_with and merge_into implementation was reversed. Fix this, so that
it is implemented correctly, i.e. that
a.merge_with(b) === merge(a, b)
a.merge_into(b) === merge(b, a)
- Ensure that in case of merge_into(), a toggle_set is always returned.