1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 02:41:11 +01:00
Commit Graph

38 Commits

Author SHA1 Message Date
Marc Bonnici
aa4df95a69 pep8: Ignore line break before binary operator
PEP8 has switched its guidance [1] for where a line break should occur
in relation to a binary operator, so don't raise this warning for
new code and update the code base to follow the new style.

[1] https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator
2020-10-30 11:49:54 +00:00
Marc Bonnici
83da20ce9f ouput_processor/postgres: Fix events sql command 2020-06-15 15:30:56 +01:00
Marc Bonnici
ab5d12be72 output_processors/cpustates: Improve handling of missing cpuinfo data
Improve checking of whether cpu idle state information is available for
processing.
Add debug message to inform user if the cpuidle module is not detected
on the target.
2019-10-15 15:17:02 +01:00
Marc Bonnici
298bc3a7f3 output_processors/cpustates: Deal with cpufreq data being unavailable
If the `cpufreq` module is not detected as present then warn the user
and processes the remaining data instead of crashing.
2019-10-15 15:17:02 +01:00
Sergei Trofimov
2f231b5ce5 fw/target: detect module variations in TargetInfo
- Add modules entry to TargetInfo
- When retrieving TargetInfo from cache, make sure info modules match
  those for the current target, otherwise mark info as stale and
  re-generate.
2019-09-12 15:27:23 +01:00
Marc Bonnici
062be6d544 output_processors/postgresql: Don't reconnect if not initialised
Update check to clarify that we should not attempt to reconnect to
the database if the initialisation of the output processor failed.
2019-08-28 11:33:46 +01:00
Marc Bonnici
c1e095be51 output_processors/postgresql: Ensure still connected to the database
Before exporting output to ensure that we are still connected to the
database. The connection may be dropped so reconnect if necessary, this
is a more of an issue with longer running jobs.
2019-08-28 11:33:46 +01:00
Marc Bonnici
eeebd010b9 output_processors/postgresql: Group database connection operations
Refactors connection operations into the `connect_to_database`
method.
2019-08-28 11:33:46 +01:00
Marc Bonnici
68e1806c07 output_processors/postgresql: Add support for new directory Artifacts
Reflecting the addition to being able to store directories as Artifacts
enable uploading of a directory as a compressed tar file rather than
storing the file directly.
2019-07-19 16:36:11 +01:00
Marc Bonnici
f19ebb79ee output_processors/postgresql: Add missing system_id field
When storing the `TargetInfo` the `system_id` attribute was ommited.
2019-07-19 16:36:11 +01:00
Marc Bonnici
ac5819da8e output_processors/postgres: Fix incorrect dict keys 2019-07-19 16:36:11 +01:00
Marc Bonnici
2ce8d6fc95 output_processors/postgresql: Add missing default
In the case of no screen resolution being present ensure that a default
is used instead of `None`.
2019-02-14 10:51:38 +00:00
Marc Bonnici
31a5a95803 output_processors/postgresql: Ensure screen resolution is a list
Ensure that the screen resolution is converted to a list to prevent
casting errors.
2019-01-30 15:46:54 +00:00
Marc Bonnici
f2d6f351cb output_processors/postgres: Fix incorrect parameter
When verifying the database schema the connection instead of a cursor
should be passed.
2018-12-07 10:51:18 +00:00
Marc Bonnici
0426a966da utils/postgres: Relocate functions to retrieve schema information
Move the functions to retrieve schema information to general utilities to
be used in other classes.
2018-12-07 09:55:17 +00:00
Marc Bonnici
250bf61c4b postgres: Update schema to v1.2
Update the postgres database schema:
    - Rename "resourcegetters" schema to "resource_getters" for
      consistency
    - Rename "retreies" colum to "retry" to better relflect it purpose
    - Store additional information including:
        - POD serialization data
        - Missing target information
        - JSON formatted runstate
2018-12-07 09:55:17 +00:00
Marc Bonnici
64f7c2431e utils/postgres: Rename postgres_covert to house more general methods
Rename the postgres_covert file to allow for place more general postgres
utility functions.
2018-12-07 09:55:17 +00:00
Marc Bonnici
423882a8e6 output_processors/postgres: Update target info to use POD representation
Instead of taking values directly when storing target information use
the POD representation to allow for restoring the state.
2018-12-07 09:55:17 +00:00
Marc Bonnici
2d7dc61686 output_processors/postgresql: Serialize parameters in json
To make it easier to deserialize the data again ensure that the data is
converted to json rather than using the built in string representation.
2018-12-07 09:55:17 +00:00
Marc Bonnici
281eb6adf9 output_processors/postgresql: Refactor and fix uploading duplication
Previously run level artifacts would be added with a particular job_id,
and updated artifacts would be stored as new objects each time. Refactor
to remove unnecessary instance variables, only provide a job_id when
required and add an update capability for largeobjects to ensure this
does not happen.
2018-10-24 10:42:28 +01:00
Marc Bonnici
576df80379 output_processors/postgres: Move logging message
Print the debug message warning about writing a large object to the
database before writing the object.
2018-10-24 10:42:28 +01:00
Marc Bonnici
6632223ac5 output_processors: Move variable initialization to __init__
In the case of a failure in the initialization of one output_processor the
remaining `initialize` methods may not get called causing variables to
not be initialized correctly.
2018-09-21 15:06:30 +01:00
Marc Bonnici
5dcac0c8ef output_processors/postgres: Do not process output if not connected
Only try to process the run output if the processor is connected to a
database.
2018-09-21 15:06:30 +01:00
Waleed El-Geresy
6d654157b2 Add Postgres Output Processor
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.
2018-09-12 10:13:34 +01:00
Waleed El-Geresy
718f2c1c90 Expose context in OP initialize and finalize
Expose the context to the initialize and finalize functions for Output
Processors. This was found to be necessary for the upcoming PostgreSQL
Output Processor.
2018-09-05 14:40:42 +01:00
Sergei Trofimov
c410d2e1a1 I lint, therefore I am
Implement fixes for the most recent pylint version.
2018-07-09 15:59:40 +01:00
Marc Bonnici
925bc8b719 wa: pep8 fixes 2018-07-06 14:39:41 +01:00
Marc Bonnici
30471613de wa/output_processors: pylint fixes 2018-07-06 14:39:41 +01:00
Marc Bonnici
7f9737a844 wa/output_processors: Fix pep8 2018-07-06 14:39:41 +01:00
Sergei Trofimov
8878cc20d4 Update copyright headers.
- 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.
2018-07-04 16:33:31 +01:00
Marc Bonnici
452d91b2d6 output_processors/sqlite: Fix incorrect error type and import 2018-07-04 16:33:08 +01:00
Waleed El-Geresy
ae0b7c9894 output_processor/sqlite: Fix typo in function name
Correct the word connecton to connection.
2018-06-22 09:53:19 +01:00
Sergei Trofimov
b3de85455a Add support for Python 3
Add support for running under Python 3, while maintaining compatibility
with Python 2.

See http://python-future.org/compatible_idioms.html for more details
behind these changes.
2018-06-07 14:48:40 +01:00
Sergei Trofimov
a2b0705ff0 processors: add cpustates
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".
2018-05-14 17:05:06 +01:00
Marc Bonnici
4f1c1d3b38 processors/uxperf: Adds description to processor 2018-04-10 18:07:20 +01:00
Sergei Trofimov
723b24306b proc/sqlite: fix writing runtime/boot_params
Make sure runtime_params and boot_params are to_pod()'d when they get
written, as they are obj_dict's that json serializer does not know how
to handle otherwise.
2018-03-29 18:01:28 +01:00
Sergei Trofimov
e6f7d3fcde output_processors: add sqlite processor
This is WA2 sqlite result processor ported to WA3 output processor API.
It is schema-compatible with the WA2 version (in fact, there are *no*
schema changes).

Note: There is a medium-term goal of adding a more generic SQL database
exporter with a more complete schema sitting on top of something like
sqlalchemy to make it agnostic of DBMS implementations. At point, this
will likely be deprecated.
2018-03-12 17:12:53 +00:00
Marc Bonnici
538cd8d332 wa: Rename results_processors to output_processors
For clarity and to better reflect their purpose, rename
`results_processors` to `output_processors`.
2018-01-15 10:24:03 +00:00