Skip to content

Commit 4084083

Browse files
committed
Make process example more Google Colab friendly
1 parent 6e88a2a commit 4084083

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

system_information.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@
343343
"outputs": [],
344344
"source": [
345345
"for process in psutil.process_iter():\n",
346-
" if 'bash' in process.name():\n",
346+
" if 'python' in process.name():\n",
347347
" cpu_times = process.cpu_times()\n",
348348
" thread_str = f'threads: {process.num_threads()}'\n",
349349
" cpu_str = f'user: {cpu_times.user}, sys: {cpu_times.system}'\n",
@@ -372,7 +372,7 @@
372372
"outputs": [],
373373
"source": [
374374
"for process in psutil.process_iter():\n",
375-
" if process.cpu_times().user > 2.5:\n",
375+
" if process.cpu_times().user > 0.1:\n",
376376
" print(f'{process.name()}: {process.cpu_times().user}')"
377377
]
378378
},
@@ -632,7 +632,7 @@
632632
"name": "python",
633633
"nbconvert_exporter": "python",
634634
"pygments_lexer": "ipython3",
635-
"version": "3.7.0"
635+
"version": "3.6.6"
636636
}
637637
},
638638
"nbformat": 4,

0 commit comments

Comments
 (0)