The usage statistics [kactivities, baloo, ktp, plasma]

Vishesh Handa me at vhanda.in
Mon Oct 20 15:24:02 UTC 2014


On Mon, Oct 13, 2014 at 6:59 PM, Ivan Čukić <ivan.cukic at kde.org> wrote:
>
> 3. What will be needed
> ================
>
> Integration with baloo. It will require patches on both sides if we are to
> support all the use-cases without cross-queries. We will need accessible
> file
> types via sqlite (on baloo side) and baloo identifiers or something on kamd
> side.
>

* The Baloo identifiers will only work for indexed files. Given that we're
not enforcing users to index everything (nor should we). We need a
different approach.
* This would also require Baloo to stick with sqlite.

Appendix 1: Formula for the resource scoring:
> ===============================
>
> LaTeX formatted:
>     S = \sum _{i = 1} ^ n
>         e^{-d_i} e^{k_i \log(l_i)}
>
> Haskell-like formatted, whichever you find easier to read :)
>     sum [
>         exp (-di) * exp ( ki * log li )     | i <- [1..n]
>     ]
>
> where d_i is the time that passed since the i-th event, k_i coefficient
> depending on the type of the event, l_i length of the event (time distance
> between open and close for example, or focus in and out)
>
> It can be rewritten to look prettier (exp log = id and so on), but this
> conveys the meaning in a nicer way by separating the terms according to
> their
> meaning.
>
> The main ideas behind the formula are:
>  - score degrades with the time, so if a document was kept open in okular
> for
> an hour yesterday, it will have a significantly higher score than a
> document
> that was kept open for a whole day a year ago;
>  - different events have different meanings;
>  - event time interval is measured on a logarithmic scale, so that there
> is a
> greater difference between 1hr and 2hrs, than between 11hrs and 12hrs;
>  - can be calculated quickly by only processing new events since the last
> score update.
>

I don't understand all of the math, but this sounds quite ideal. Currently
in KRunner we have a global run count which affects the score of all the
result, and that score doesn't degrade over time. This seems like something
nice to replace it with, if we can make it super fast that is.

-- 
Vishesh Handa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20141020/0ffaf6af/attachment.html>


More information about the Plasma-devel mailing list