Commit Graph

64 Commits

Author SHA1 Message Date
versat 20814d37d0 donate-cpu-server.py: Fix wrong detection of invalid messageIds.
Packages now can contain something like:
```
    head results:
    Checking temp/openvdb/Platform.cc: __GNUC__=1...
    [New Thread 7892.0x91c]
```
"New Thread 7892.0x91c" was wrongly identified as messageId in the HEAD
report.
This commit adds code to skip lines that start with `[` or where the
messageId contains at least one space.
2019-04-03 11:46:45 +02:00
versat a05cdadbf4 donate-cpu-server.py: Remove obsolete experimental "fast" code.
Since the directory for the results does no longer exist on the server,
the server currently crashes every time older clients try to upload
experimental fast results via "write-fast" command.
Now this command is just ignored so the server is instantly ready
again after a "write-fast" command.
2019-03-29 12:52:27 +01:00
Oliver Stöneberg 36950d7d0d donate-cpu-server.py: added stale report / cleanups (#1767)
* donate-cpu.server.py: increased "Package" column width for latest report and small cleanup

* donate-cpu.server.py: added date and time to crash report

* donate-cpu.server.py: simplified strDateTime()

* donate-cpu.server.py: add stale report to show results which are older than 30 days

* donate-cpu-server.py: added version and some logging
2019-03-29 12:12:16 +01:00
versat e64fc279f0 donate-cpu-server.py: Format total times like the package times.
Without formatting it could happen sometimes that the time is printed
like this: 245.099999999, now only one digit after the decimal point
is shown.
2019-02-28 13:46:40 +01:00
Sebastian c10ddaef4a
donate-cpu-server.py: Replace syntax that is deprecated in Python 3. (#1712)
The function `iteritems()` of `dict`s is deprecated. The recommended
alternative is to use `items()`, this function also works with Python 2.

The next issue is that lambdas can no longer unpack tuple parameters
in Python 3. It would be possible to use some workaround and still use
a lambda, but using `operator.itemgetter(1)` instead is faster and the
recommended method in such a case.

The syntax is now compatible with Python 2 and 3 but the server script
still does not work with Python 3. For example `socket.recv()` returns
`bytes` in Python 3 and `str` in Python 2. Currently `str` is expected
so it does not work with Python 3.
2019-02-28 13:34:23 +01:00
Sebastian 4e90922e5b Donate CPU: Also use and accept .tar.bz2 package files. (#1707)
In my tests there were about 1500 additional packages
available as bz2 on the server.
For some packages a newer version is now used if it is
only available as .tar.bz2 archive.
The donate-cpu.py client is tested to work with .tar.bz2
files under Python 2.7.15 and 3.6.8.
2019-02-28 08:40:07 +01:00
Sebastian 8a9f97b5c8
donate-cpu-server.py: Verify compared Cppcheck version (#1673)
Ignore normal results (not fast or info) where the diff was made against the wrong OLD_VERSION. This avoids unwanted results when some client still analyzes an old package but the OLD_VERSION in the server script is changed for example.
Results missing the Cppcheck version info completely are also ignored.
Tested locally with correct and wrong version numbers.
2019-02-18 10:13:18 +01:00
versat a41e663cd1 Donate CPU: Optimize `list` and `dict` initialization
Initialization with `[]` and `{}` is faster than with `list()` and `dict()`.
Details:
https://stackoverflow.com/questions/30216000/why-is-faster-than-list
2019-02-12 09:47:57 +01:00
versat a1d0509d61 donate-cpu-server.py: Optimize checkLibrary* report generation
Use lists that are joined in the end instead of slower string concatenations with `+`.
Tested locally
2019-02-12 08:53:03 +01:00
Daniel Marjamäki 78ea6d71ac donate-cpu: run cppcheck with --experimental-fast also 2019-02-09 22:05:12 +01:00
versat 6a592d18ab donate-cpu-server.py: Set OLD_VERSION to 1.87 2019-02-09 15:18:17 +01:00
Sebastian 36e174f8f3
donate-cpu-server.py: Add logging of uncaught exceptions (to file and console) (#1646)
Two logging handler are added. One just prints all output with at least INFO severity to the console. The other only prints ERROR severity and above to a rotating file. The file size is limited to 100 kB. Since one backup file is used that results in a maximum of 200 kB disk usage.
The log file is saved in the directory where the server script is.
Hopefully this way some issues can be found more easily.
Tested locally.
2019-02-09 12:41:02 +01:00
Sebastian 92d492e35d
donate-cpu-server.py: Limit number of functions shown in checkLibrary reports (#1641)
The checkLibraryFunction report is currently about 15 MB in size, lists more than 140000 functions and takes a long time to be generated.
Limiting the functions that are shown should save bandwidth, time and other resources on the server (and client that downloads the report).
Tested locally.
2019-02-05 10:39:40 +01:00
Sebastian 598cd468f1
donate-cpu-server.py: Add checkLibraryUseIgnore report (#1642) 2019-02-04 15:53:51 +01:00
versat 00eb6185fa donate-cpu-server.py: Clarify "Total time" output in time report. 2019-02-04 12:39:22 +01:00
Sebastian bcfd7c0919
donate-cpu-server.py: Fix that results of package "crash" can not be … (#1620)
* donate-cpu-server.py: Fix that results of package "crash" can not be viewed

Rename crash report page from "crash" to "crash.html" so the url ending with "crash" shows the results of package "crash".

* Also rename "diff" and "head" reports to *.html

In case there would be such packages in the future this avoids conflicts.
2019-01-24 12:02:45 +01:00
Sebastian a410cea59a
Donate CPU: Collect information messages and provide checkLibrary reports (#1610)
Related trac ticket: https://trac.cppcheck.net/ticket/8947
Enable information messages and "--check-library" in the Cppcheck
parameters.
Store the information messages and the rest of the messages in different
variables and upload them separately.
The server stores the information messages in a sub-directory similarly
to the normal issue messages in one file per package.
Reports for "checkLibraryFunction" and "checkLibraryNoReturn" message ids
are generated by the server now.
2019-01-22 15:27:13 +01:00
Sebastian 7281a886e2
donate-cpu-server.py: Enhance formatting of latest.html output (#1605)
Column width can now be easily changed via the `column_width` array.
Increased column width for the packages column so it is more likely that the date is not dropped.
Increased the column width for the number of results since there are packages which have about 100000 results.
2019-01-15 11:39:47 +01:00
versat 0c93e0c8cb donate-cpu-server.py: Increase max accepted result size to 2 MB 2019-01-11 14:58:27 +01:00
Sebastian e8fb3c0546
donate-cpu-server.py: Time report: Further improvements and fixes (#1586)
Changes:
- Rename "time" page to "time.html" to avoid conflict with "time" package
- Output content as HTML instead of plain text
- Format head row of preformatted table bold
- Show factor for total time now too

Tested locally
2019-01-11 10:05:19 +01:00
Sebastian fd9ca16e51
donate-cpu-server.py: Time report: Format output, add showing factor (#1582)
Format the time output so the columns have the same width (as long as a text is not too long).
Add showing the factor of the time difference so very suspicious differences can be seen instantly.
Made the function body more PEP 8 conform by using lowercase variable names with underscores as delimiters.
Tested locally.
2019-01-10 19:10:56 +01:00
Sebastian 1dc5ff022e
donate-cpu-server.py: Fix PEP 8 and other warnings (#1578)
There should be no functional changes.
Tested locally.
2019-01-09 18:39:42 +01:00
Sebastian 44135ef926
donate-cpu-server.py: Provide HEAD report (similar to diff report) (#1572)
Tested on local server.
2019-01-09 10:47:58 +01:00
Sebastian 30d53a911e
donate-cpu-server.py: Fix package names in time output. (#1570)
The package names contained the whole path, so the leading "resultPath" is now removed to only show the package names.
Tested on local server.
2019-01-07 19:31:34 +01:00
Sebastian 164a46f8cd donate-cpu-server.py: Fix date/time in report is not found. (#1562)
Instead of searching for a specific year (which could change) the script searches now for the current and last year to find the date and time information in the results.
2019-01-04 11:51:32 +01:00
Sebastian a4a3373838 donate-cpu-server.py: Fix wrong number of "+" diffs in latest results. (#1517)
This should fix the issue that the number after the "+" in the "Diff" column is always one too large.
2018-12-10 20:05:34 +01:00
Daniel Marjamäki 49e500d6bf donate-cpu: use 1.86 as base version 2018-12-08 11:39:44 +01:00
Daniel Marjamäki f0826ed9d9 donate-cpu-server: restore handling of crashes. do not recheck. 2018-12-02 07:10:23 +01:00
Daniel Marjamäki 5532d1f877 donate-cpu: Add GetCppcheckVersions command 2018-11-29 21:19:45 +01:00
Daniel Marjamäki e11afb7b0c donate-cpu-server: refactor 2018-11-29 06:23:29 +01:00
Daniel Marjamäki 6b4f5026f7 donate-cpu-server: show crash history 2018-11-28 20:36:19 +01:00
Daniel Marjamäki bbcadb0f9b donate-cpu-server: try to track crashes better 2018-11-28 14:03:54 +01:00
IOBYTE 8e6013c8af Allow daca to display latest results of packages with a plus in their name. (#1496) 2018-11-28 06:09:29 +01:00
Daniel Marjamäki af60b6f125 donate-cpu-server: save crash history 2018-11-27 19:08:52 +01:00
Daniel Marjamäki 347c46491a donate-cpu-server: try to handle uploaded crash results better 2018-11-19 10:57:04 +01:00
Daniel Marjamäki e8ac45a5a7 donate-cpu-server.py: Recheck crashes more frequently 2018-11-17 19:32:10 +01:00
Daniel Marjamäki f72847530e Donate CPU: make server more robust when latest results are missing 2018-10-15 11:01:51 +02:00
Daniel Marjamäki 441d50df25 donate-cpu: use 1.85 as base version 2018-10-14 16:31:13 +02:00
Daniel Marjamäki 4a4d4fd2be Donate CPU: Improve diff report so changes from today can be seen separately 2018-09-06 17:31:07 +02:00
Daniel Marjamäki ee104303b7 Donate CPU: create diff report for todays results 2018-09-06 06:53:40 +02:00
Sebastian 220c06e356 Donate CPU Server: Fix broken links in crash report. (#1364) 2018-09-03 13:07:47 +02:00
Daniel Marjamäki f88326c51f Donate CPU: let the server remember latest packages when restarting 2018-09-02 14:08:09 +02:00
Daniel Marjamäki c6369e6519 Donate CPU: Added a simple time report 2018-09-02 09:35:38 +02:00
Daniel Marjamäki 215bc3b303 Donate CPU:
* timeout after 30 seconds
 * added content for http://cppcheck.osuosl.org:8000/
2018-09-02 07:28:25 +02:00
Daniel Marjamäki 5767a0ed6f Donate CPU: Added crash report 2018-08-31 14:28:01 +02:00
Daniel Marjamäki ec5a13d351 Donate CPU: Fix old path 2018-08-27 18:44:17 +02:00
Daniel Marjamäki 4002fcd3e3 Donate CPU: Improved the server, now you can see diff 2018-08-27 18:21:16 +02:00
Daniel Marjamäki bbebdf0ab4 Donate CPU: Updated the 'latest.html' report 2018-08-26 16:57:09 +02:00
Daniel Marjamäki 629639f6ae Donate CPU: Updated scripts 2018-08-26 16:47:20 +02:00
Daniel Marjamäki 08837b2232 Donate CPU: Use CRLF in HTTP responses 2018-08-26 11:17:18 +02:00