Skip to content

Commit b868a36

Browse files
authored
Merge pull request #5728 from aldbr/cherry-pick-2-ceace18b8-integration
[sweep:integration] feat (wms): use db12 package to compute cpu power
2 parents e6692dc + 9b0098f commit b868a36

File tree

4 files changed

+6
-261
lines changed

4 files changed

+6
-261
lines changed

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ dependencies:
1616
- cachetools
1717
- certifi
1818
- cmreshandler >1.0.0b4
19+
- db12
1920
- elasticsearch <7.14
2021
- elasticsearch-dsl
2122
- fts3

src/DIRAC/WorkloadManagementSystem/Client/CPUNormalization.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212

1313
import os
1414
from urllib.request import urlopen
15+
from db12 import single_dirac_benchmark
1516

1617
import DIRAC
1718
from DIRAC import gConfig, gLogger, S_OK, S_ERROR
1819
from DIRAC.ConfigurationSystem.Client.Helpers.Resources import getCESiteMapping
1920
from DIRAC.Resources.Computing.BatchSystems.TimeLeft.TimeLeft import TimeLeft
20-
from DIRAC.WorkloadManagementSystem.Client.DIRACbenchmark import singleDiracBenchmark
2121

2222
__RCSID__ = "$Id$"
2323

@@ -162,7 +162,7 @@ def getCPUNormalization(reference="HS06", iterations=1):
162162

163163
corr = Operations().getValue("JobScheduling/CPUNormalizationCorrection", 1.0)
164164

165-
result = singleDiracBenchmark(iterations)
165+
result = single_dirac_benchmark(iterations)
166166

167167
if result is None:
168168
return S_ERROR("Cannot get benchmark measurements")

src/DIRAC/WorkloadManagementSystem/Client/DIRACbenchmark.py

Lines changed: 0 additions & 257 deletions
This file was deleted.

src/DIRAC/WorkloadManagementSystem/scripts/dirac_wms_cpu_normalization.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@
2020

2121
__RCSID__ = "$Id$"
2222

23+
from db12 import single_dirac_benchmark
24+
2325
import DIRAC
2426
from DIRAC.Core.Utilities.DIRACScript import DIRACScript as Script
2527

2628
from DIRAC import gLogger, gConfig
27-
from DIRAC.WorkloadManagementSystem.Client.DIRACbenchmark import singleDiracBenchmark
2829
from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations
2930

3031

@@ -43,7 +44,7 @@ def main():
4344
elif unprocSw[0] in ("R", "Reconfig"):
4445
configFile = unprocSw[1]
4546

46-
result = singleDiracBenchmark(1)
47+
result = single_dirac_benchmark()
4748

4849
if result is None:
4950
gLogger.error("Cannot make benchmark measurements")

0 commit comments

Comments
 (0)