Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Protracktor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nimesh
Protracktor
Commits
45630b14
Commit
45630b14
authored
Nov 18, 2020
by
Nimesh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated
parent
07489627
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
40 additions
and
16 deletions
+40
-16
Protracktor/results/ActivityTracker/csv/2020_11_18_11_38_40.csv
...cktor/results/ActivityTracker/csv/2020_11_18_11_38_40.csv
+5
-0
Protracktor/results/ActivityTracker/text/2020_11_18_11_38_40.txt
...ktor/results/ActivityTracker/text/2020_11_18_11_38_40.txt
+27
-0
Protracktor/results/ActivityTracker/usage_graph/2020_11_18_11_38_40.png
...sults/ActivityTracker/usage_graph/2020_11_18_11_38_40.png
+0
-0
Protracktor/results/DataUsage/601_18-11-2020_11:07:11.json
Protracktor/results/DataUsage/601_18-11-2020_11:07:11.json
+7
-0
Protracktor/results/DataUsage/601_18-11-2020_11:07:12plt.png
Protracktor/results/DataUsage/601_18-11-2020_11:07:12plt.png
+0
-0
Protracktor/results/ScreenRecordings/601_18-11-2020_10:45:02.avi
...ktor/results/ScreenRecordings/601_18-11-2020_10:45:02.avi
+0
-0
Protracktor/results/ScreenRecordings/601_18-11-2020_10:47:29.avi
...ktor/results/ScreenRecordings/601_18-11-2020_10:47:29.avi
+0
-0
Protracktor/results/ScreenRecordings/601_18-11-2020_11:06:53.avi
...ktor/results/ScreenRecordings/601_18-11-2020_11:06:53.avi
+0
-0
Protracktor/results/ScreenRecordings/_18-11-2020_10:27:28.avi
...racktor/results/ScreenRecordings/_18-11-2020_10:27:28.avi
+0
-0
Protracktor/results/ScreenRecordings/_18-11-2020_10:29:21.avi
...racktor/results/ScreenRecordings/_18-11-2020_10:29:21.avi
+0
-0
Protracktor/source/__pycache__/screen.cpython-36.pyc
Protracktor/source/__pycache__/screen.cpython-36.pyc
+0
-0
Protracktor/source/__pycache__/webcam.cpython-36.pyc
Protracktor/source/__pycache__/webcam.cpython-36.pyc
+0
-0
Protracktor/source/__pycache__/window_activity.cpython-36.pyc
...racktor/source/__pycache__/window_activity.cpython-36.pyc
+0
-0
Protracktor/source/window_activity.py
Protracktor/source/window_activity.py
+1
-16
No files found.
Protracktor/results/ActivityTracker/csv/2020_11_18_11_38_40.csv
0 → 100644
View file @
45630b14
Application,Time,Percentage
chrome,0:05:14,86
code,0:00:42,11
python3,0:00:06,2
gnome-terminal,0:00:04,1
Protracktor/results/ActivityTracker/text/2020_11_18_11_38_40.txt
0 → 100644
View file @
45630b14
------------------------------------------------------------
chrome
0:05:14 (86%)
------------------------------------------------------------
0:02:53 (55%) Read Library of Heaven’s Path - Chapter 707: Start of the Hunt online free - Novel Full - Google Chrome
0:02:16 (43%) Read Library of Heaven’s Path - Chapter 706: Elder Mo online free - Novel Full - Google Chrome
0:00:03 (1%) Protracktor/source/window_activity.py · master · Nimesh / Protracktor · GitLab - Google Chrome
0:00:02 (1%) (4) WhatsApp - Google Chrome
------------------------------------------------------------
code
0:00:42 (11%)
------------------------------------------------------------
0:00:42 (100%) window_activity.py - source - Visual Studio Code
------------------------------------------------------------
python3
0:00:06 (2%)
------------------------------------------------------------
0:00:06 (100%) Close Window
------------------------------------------------------------
gnome-terminal
0:00:04 (1%)
------------------------------------------------------------
0:00:04 (100%) sony@sony-SVF15212SNW: ~/CS699/Protracktor/source
============================================================
started: 2020-11-18 11:38:40 updated: 2020-11-18 11:45:20
============================================================
\ No newline at end of file
Protracktor/results/ActivityTracker/usage_graph/2020_11_18_11_38_40.png
0 → 100644
View file @
45630b14
31.7 KB
Protracktor/results/DataUsage/601_18-11-2020_11:07:11.json
0 → 100644
View file @
45630b14
{
"python3"
:
{
"Upload"
:
0.0031004
,
"Download"
:
0.0495367
,
"total"
:
0.052637100000000006
}
}
\ No newline at end of file
Protracktor/results/DataUsage/601_18-11-2020_11:07:12plt.png
0 → 100644
View file @
45630b14
21.3 KB
Protracktor/results/ScreenRecordings/601_18-11-2020_10:45:02.avi
0 → 100644
View file @
45630b14
File added
Protracktor/results/ScreenRecordings/601_18-11-2020_10:47:29.avi
0 → 100644
View file @
45630b14
File added
Protracktor/results/ScreenRecordings/601_18-11-2020_11:06:53.avi
0 → 100644
View file @
45630b14
File added
Protracktor/results/ScreenRecordings/_18-11-2020_10:27:28.avi
0 → 100644
View file @
45630b14
File added
Protracktor/results/ScreenRecordings/_18-11-2020_10:29:21.avi
0 → 100644
View file @
45630b14
File added
Protracktor/source/__pycache__/screen.cpython-36.pyc
View file @
45630b14
No preview for this file type
Protracktor/source/__pycache__/webcam.cpython-36.pyc
View file @
45630b14
No preview for this file type
Protracktor/source/__pycache__/window_activity.cpython-36.pyc
View file @
45630b14
No preview for this file type
Protracktor/source/window_activity.py
View file @
45630b14
...
...
@@ -23,12 +23,9 @@ pltdir = "../results/ActivityTracker/usage_graph"
def
currtime
(
tformat
=
None
):
'''
This method checks for the file and returns the time in respective format.
:param tformat: string argument
:returns: date and time
'''
return
time
.
strftime
(
"
%
Y_
%
m_
%
d_
%
H_
%
M_
%
S"
)
if
tformat
==
"file"
\
else
time
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
try
:
...
...
@@ -51,12 +48,9 @@ log2 = csvdir+"/"+read_config()+currtime("file")+".csv"; startt = currtime()
def
get
(
command
):
'''
This method gets the output of the command and converts it into utf-8 format
:param command: list argument
:returns: output of command in utf-8 format
'''
try
:
return
subprocess
.
check_output
(
command
)
.
decode
(
"utf-8"
)
.
strip
()
except
subprocess
.
CalledProcessError
:
...
...
@@ -65,12 +59,9 @@ def get(command):
def
time_format
(
s
):
'''
This method coverts cumulative time in seconds into HH:MM:SS
:param s: total seconds time
:returns: time in HH:MM:SS format
'''
m
,
s
=
divmod
(
s
,
60
);
h
,
m
=
divmod
(
m
,
60
)
return
"
%
d:
%02
d:
%02
d"
%
(
h
,
m
,
s
)
...
...
@@ -78,7 +69,6 @@ def summarize(t,winlist,applist):
'''
This is heart of the program it lists the applications and corresponding duration of usage for each application
'''
with
open
(
log1
,
"wt"
)
as
report
:
totaltime
=
sum
([
it
[
2
]
for
it
in
winlist
])
report
.
write
(
""
)
...
...
@@ -121,11 +111,10 @@ def plot():
This method is used for plotting the bar graph from the final csv file
generated by summarize() method
'''
try
:
data
=
pd
.
read_csv
(
log2
)
except
FileNotFoundError
:
return
return
df
=
pd
.
DataFrame
(
data
)
name
=
df
[
'Application'
]
perc
=
df
[
'Percentage'
]
...
...
@@ -150,12 +139,10 @@ class myThread4 (threading.Thread):
'''
It is a threading class which is controlled by our main application file
'''
def
__init__
(
self
):
'''
Initiates the window activity tracking process
'''
threading
.
Thread
.
__init__
(
self
)
self
.
flag
=
0
self
.
t
=
0
...
...
@@ -166,13 +153,11 @@ class myThread4 (threading.Thread):
'''
This method triggers to close the thread
'''
self
.
flag
=
1
def
run
(
self
):
'''
This method initiates and continuosly runs the activity tracking with the help of other methods
'''
while
True
:
time
.
sleep
(
period
)
if
self
.
flag
==
1
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment