你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-06 04:26:52 +08:00
use process_time to measure only process execution time
这个提交包含在:
@@ -22,7 +22,7 @@ import itertools
|
|||||||
import os
|
import os
|
||||||
import psutil
|
import psutil
|
||||||
import sys
|
import sys
|
||||||
from time import perf_counter
|
from time import process_time
|
||||||
|
|
||||||
from colorama import init
|
from colorama import init
|
||||||
from colorama import Fore
|
from colorama import Fore
|
||||||
@@ -417,7 +417,7 @@ def solve_cpu(currentmodelrun, modelend, G):
|
|||||||
tsolve (float): Time taken to execute solving
|
tsolve (float): Time taken to execute solving
|
||||||
"""
|
"""
|
||||||
|
|
||||||
tsolvestart = perf_counter()
|
tsolvestart = process_time()
|
||||||
|
|
||||||
for iteration in tqdm(range(G.iterations), desc='Running simulation, model ' + str(currentmodelrun) + '/' + str(modelend), ncols=get_terminal_width() - 1, file=sys.stdout, disable=not G.progressbars):
|
for iteration in tqdm(range(G.iterations), desc='Running simulation, model ' + str(currentmodelrun) + '/' + str(modelend), ncols=get_terminal_width() - 1, file=sys.stdout, disable=not G.progressbars):
|
||||||
# Store field component values for every receiver and transmission line
|
# Store field component values for every receiver and transmission line
|
||||||
@@ -467,7 +467,7 @@ def solve_cpu(currentmodelrun, modelend, G):
|
|||||||
elif Material.maxpoles > 1:
|
elif Material.maxpoles > 1:
|
||||||
update_electric_dispersive_multipole_B(G.nx, G.ny, G.nz, G.nthreads, Material.maxpoles, G.updatecoeffsdispersive, G.ID, G.Tx, G.Ty, G.Tz, G.Ex, G.Ey, G.Ez)
|
update_electric_dispersive_multipole_B(G.nx, G.ny, G.nz, G.nthreads, Material.maxpoles, G.updatecoeffsdispersive, G.ID, G.Tx, G.Ty, G.Tz, G.Ex, G.Ey, G.Ez)
|
||||||
|
|
||||||
tsolve = perf_counter() - tsolvestart
|
tsolve = process_time() - tsolvestart
|
||||||
|
|
||||||
return tsolve
|
return tsolve
|
||||||
|
|
||||||
|
在新工单中引用
屏蔽一个用户