D28260: [QML] Set the remaining time in the monitor more reliably

2020-03-25 Thread Stefan Brüns
This revision was automatically updated to reflect the committed changes.
Closed by commit R293:6eecf5e7af29: [QML] Set the remaining time in the monitor 
more reliably (authored by bruns).

REPOSITORY
  R293 Baloo

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28260?vs=78410=78475

REVISION DETAIL
  https://phabricator.kde.org/D28260

AFFECTED FILES
  src/qml/experimental/monitor.cpp
  src/qml/experimental/monitor.h

To: bruns, #baloo, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, GB_2, domson, ashaposhnikov, michaelh, astippich, spoorun, 
ngraham, bruns, abrahams


D28260: [QML] Set the remaining time in the monitor more reliably

2020-03-25 Thread Nathaniel Graham
ngraham accepted this revision.
ngraham added a comment.
This revision is now accepted and ready to land.


  Thanks for the explanation.

REPOSITORY
  R293 Baloo

BRANCH
  config_rework

REVISION DETAIL
  https://phabricator.kde.org/D28260

To: bruns, #baloo, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, GB_2, domson, ashaposhnikov, michaelh, astippich, spoorun, 
ngraham, bruns, abrahams


D28260: [QML] Set the remaining time in the monitor more reliably

2020-03-24 Thread Stefan Brüns
bruns added a comment.


  For the remaining time to be really updated once per second (not only once 
per batch=40), this also needs D28258 , 
D28267 

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D28260

To: bruns, #baloo, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, GB_2, domson, ashaposhnikov, michaelh, astippich, spoorun, 
ngraham, bruns, abrahams


D28260: [QML] Set the remaining time in the monitor more reliably

2020-03-24 Thread Stefan Brüns
bruns added a comment.


  In D28260#633929 , @ngraham wrote:
  
  > Much nicer! Should the timer be destroyed when indexing is finished, though?
  
  
  QElapsedTimer is basically a timestamp with is updated on `{re}start()`.  So 
we have to start it at least once, and reset it on `elapsed() > 1s`. Everything 
else does not matter much.

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D28260

To: bruns, #baloo, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, GB_2, domson, ashaposhnikov, michaelh, astippich, spoorun, 
ngraham, bruns, abrahams


D28260: [QML] Set the remaining time in the monitor more reliably

2020-03-24 Thread Nathaniel Graham
ngraham added a comment.


  Much nicer! Should the timer be destroyed when indexing is finished, though?

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D28260

To: bruns, #baloo, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, GB_2, domson, ashaposhnikov, michaelh, astippich, spoorun, 
ngraham, bruns, abrahams


D28260: [QML] Set the remaining time in the monitor more reliably

2020-03-24 Thread Stefan Brüns
bruns created this revision.
bruns added reviewers: Baloo, ngraham.
Herald added projects: Frameworks, Baloo.
Herald added a subscriber: kde-frameworks-devel.
bruns requested review of this revision.

REVISION SUMMARY
  The remaining time was only updated when the count of indexed files
  modulo 100 is 0. I.e. if already 1295 files are indexed, and 90 of these
  files are changed the indexed count goes down to 1205 and the update
  is never triggered.
  
  Use a QElapsedTimer to update the time when the file count changes, but
  at most once per second.

TEST PLAN
  Before:
  Check the "Total files indexed" from `balooctl status`
  Touch some large files (so the indexed count does not cross xx00)
  The "remaining time" in kinfocenter is not updated
  
  After:
  The remaining time is updated after ~1 second.

REPOSITORY
  R293 Baloo

BRANCH
  config_rework

REVISION DETAIL
  https://phabricator.kde.org/D28260

AFFECTED FILES
  src/qml/experimental/monitor.cpp
  src/qml/experimental/monitor.h

To: bruns, #baloo, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, GB_2, domson, ashaposhnikov, michaelh, astippich, spoorun, 
ngraham, bruns, abrahams