Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Power Measurements Service #1201

Open
wants to merge 367 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
367 commits
Select commit Hold shift + click to select a range
595f1b7
Format fix.
Aug 17, 2023
d83d001
discard and config funcs for sampler init
gralkapk Aug 18, 2023
620d2c4
size fix in ParquetWriter
gralkapk Aug 18, 2023
4346e2a
Merge remote-tracking branch 'origin/format' into lpt
gralkapk Aug 18, 2023
84d2479
formatting fix
gralkapk Aug 18, 2023
d6b0fac
fix for waveform retrieval
gralkapk Aug 21, 2023
7031cc2
clean tracy shutdown and special string handling
gralkapk Aug 21, 2023
88ce44a
Format fix.
Aug 21, 2023
28422f9
the tracy "fix" as extra class
gralkapk Aug 21, 2023
12fc7eb
type alias for context
gralkapk Aug 21, 2023
5b22a10
include ordering
gralkapk Aug 21, 2023
b145377
apperantly this sleep is needed
gralkapk Aug 21, 2023
1676d53
renamed configs
gralkapk Aug 21, 2023
b42b08f
need to stop the acq before starting it
gralkapk Aug 22, 2023
ce49e94
trigger level need to be uniform across devices
gralkapk Aug 23, 2023
0f20aa4
msr discard func
gralkapk Aug 23, 2023
bb866fd
add missing include
gralkapk Aug 25, 2023
51b7d12
fix C++20 comparison operators
moritz-h Aug 25, 2023
0f770c0
Merge branch 'master' into lpt
moritz-h Aug 25, 2023
9429a69
update tracy port
moritz-h Aug 25, 2023
ecc47d9
fix hash
moritz-h Aug 25, 2023
3138bda
fix log
moritz-h Aug 25, 2023
8da595a
fix C++20 comparison operators again
moritz-h Aug 25, 2023
e219322
metadata output
gralkapk Sep 26, 2023
379416d
wip
gralkapk Oct 3, 2023
9c03162
runtimeinfo as resource
gralkapk Oct 5, 2023
e5b746a
running runtimeinfo_service
gralkapk Oct 5, 2023
5e37724
extended runtimeinfo
gralkapk Oct 9, 2023
48652d4
adapted service
gralkapk Oct 9, 2023
2cd8164
runtime fix for cinematicview
gralkapk Oct 9, 2023
4ff3907
Format fix.
Oct 9, 2023
c72f06e
some linux info
gralkapk Oct 10, 2023
c40b604
Merge remote-tracking branch 'gralkapk/runtimeinfo' into lpt
gralkapk Oct 10, 2023
ede94a8
store additional meta data
gralkapk Oct 10, 2023
a693cf5
wip token storage
gralkapk Oct 10, 2023
07034dd
Format fix.
Oct 10, 2023
1d2dd63
protected memory class
gralkapk Oct 11, 2023
4f8194c
crypt token class
gralkapk Oct 11, 2023
ce90c9a
wip hmc sensors
gralkapk Oct 11, 2023
52fed60
Format fix.
Oct 11, 2023
20bff95
dataversewriter init
gralkapk Oct 11, 2023
b9b45b0
dataverse vcpkg port
gralkapk Oct 12, 2023
7dadc62
import dataversepp
gralkapk Oct 13, 2023
211cef1
wip dataversepp integration
gralkapk Oct 13, 2023
bba8bfe
wrapper to collect different finished signals
gralkapk Oct 13, 2023
c2fe906
wip dataverse
gralkapk Oct 13, 2023
2024e61
fix for long measure sequences
gralkapk Oct 13, 2023
0cbca93
dataversepp version
gralkapk Oct 14, 2023
26a5e1d
fixed rtx parquet output
gralkapk Oct 14, 2023
3985522
segment count fix
gralkapk Oct 16, 2023
51f988d
note timescale
gralkapk Oct 16, 2023
b9b9e37
updated dependencies
gralkapk Oct 17, 2023
dbd24b0
reset fix
gralkapk Oct 18, 2023
a32e84a
sample only power
gralkapk Oct 18, 2023
8ab894e
rta config
gralkapk Oct 19, 2023
c01a3d9
update power overwhelming
gralkapk Oct 19, 2023
3495048
archive old configs
gralkapk Oct 19, 2023
d0581ac
full rig config
gralkapk Oct 19, 2023
75b2d4d
timestamp fix
gralkapk Oct 19, 2023
2b7bb42
wip switch to filetime
gralkapk Oct 19, 2023
cb7f34a
optimized trigger
gralkapk Oct 19, 2023
02fc5f6
wip sampler refactoring
gralkapk Oct 19, 2023
fdc0694
wip sampler refactoring
gralkapk Oct 23, 2023
cde7a7a
wip sampler refactoring
gralkapk Oct 23, 2023
a73fc06
serialize megamol graph into meta properties
gralkapk Oct 23, 2023
455fc4c
cleanup
gralkapk Oct 23, 2023
3434d75
add adl sensor
gralkapk Oct 23, 2023
13a450a
wip sampler refactoring
gralkapk Oct 24, 2023
cf29d51
wip sampler refactoring
gralkapk Oct 24, 2023
920877a
wip sampler refactoring
gralkapk Oct 24, 2023
572f40a
dispatcher for different sensor types
gralkapk Oct 26, 2023
2c86909
refactoring of dispatcher
gralkapk Oct 27, 2023
8371881
separate dispatcher to different file
gralkapk Oct 27, 2023
449b841
cleanup
gralkapk Oct 27, 2023
37b6f5a
register hmc callbacks with trigger
gralkapk Oct 27, 2023
6d4b785
serialize oszi configs to meta information
gralkapk Oct 27, 2023
08f4f99
additional config callbacks
gralkapk Oct 27, 2023
800dc94
wip
gralkapk Oct 30, 2023
4e16fee
samplers cleared in close
gralkapk Oct 30, 2023
e2496c1
use tracy with filetime
gralkapk Oct 30, 2023
37ef956
correct filetime offsets
gralkapk Oct 30, 2023
620108b
explicit filetime type
gralkapk Oct 30, 2023
3f8a7f4
wip hmc paths
gralkapk Oct 31, 2023
e46c999
wip hmc paths
gralkapk Oct 31, 2023
bea0ae3
reverse segment order
gralkapk Oct 31, 2023
1dd6369
longer grace period in trigger sequence
gralkapk Oct 31, 2023
591d2fa
wip cleanup of hmc result
gralkapk Oct 31, 2023
9529ed0
wip cleanup hmc file
gralkapk Oct 31, 2023
0e07e56
wip cleanup hmc file
gralkapk Oct 31, 2023
8be2a65
wip hmc file
gralkapk Nov 2, 2023
4890cf8
wip hmc file
gralkapk Nov 2, 2023
bec46b3
wip hmc file parsing
gralkapk Nov 3, 2023
ced2820
wip hmc file parsing
gralkapk Nov 3, 2023
616e5e1
wmiutil fix
gralkapk Nov 3, 2023
7bcddd2
hmc file parsing
gralkapk Nov 3, 2023
50ba599
wip time refactoring
gralkapk Nov 3, 2023
780f3f7
remove walltime from sample buffer
gralkapk Nov 3, 2023
f6dbbc7
removed walltime for rtx samples
gralkapk Nov 3, 2023
d3bd80b
cleanup
gralkapk Nov 3, 2023
4e7255a
enforce UTC time and use UTC clock to parse hmc file
gralkapk Nov 3, 2023
493bac2
cleanup
gralkapk Nov 3, 2023
66e6a05
wip code conversion
gralkapk Nov 3, 2023
00b774e
cleanup
gralkapk Nov 4, 2023
6405ed2
cont cleanup
gralkapk Nov 4, 2023
2085d8b
wip writer refactoring
gralkapk Nov 4, 2023
d2a26ec
wip analysis script
gralkapk Nov 6, 2023
8bd8565
wip map tinkerforge names
gralkapk Nov 6, 2023
bde7b53
wip transform nvml name
gralkapk Nov 6, 2023
0a4faf4
comments
gralkapk Nov 6, 2023
4b6cdf9
comments
gralkapk Nov 6, 2023
b784d5a
wip refactoring writer functions
gralkapk Nov 6, 2023
8bfaae1
cleanup
gralkapk Nov 6, 2023
d02b97a
only timestamps as output
gralkapk Nov 6, 2023
e47ddf4
parquet naming should use the globals as well
gralkapk Nov 6, 2023
81f0a2a
cleanup
gralkapk Nov 6, 2023
54ed289
no osci name prefix
gralkapk Nov 6, 2023
9d57985
updated configs
gralkapk Nov 7, 2023
ce8a797
recipes for later analysis
gralkapk Nov 7, 2023
8836796
embed recipes in parquet files
gralkapk Nov 7, 2023
1f30040
added missing epoch offset
gralkapk Nov 7, 2023
3bbf780
fixed recipe
gralkapk Nov 7, 2023
5329b34
updated analysis script to understand recipes
gralkapk Nov 7, 2023
fde018c
refactoring trigger timings
gralkapk Nov 9, 2023
5b044f6
update pwrowg version
gralkapk Nov 9, 2023
1cc37df
fixes for hmc scheduling and trigger sequence
gralkapk Nov 13, 2023
f444690
optix version guard
gralkapk Nov 13, 2023
06c1f66
updated rtb01 config
gralkapk Nov 13, 2023
cc8e88b
updated pwrowg version
gralkapk Nov 13, 2023
08889a7
added missing error checker
gralkapk Nov 13, 2023
5937b63
optix version guard
gralkapk Nov 13, 2023
73d17ce
wider trigger signal and nvml,adl sampling rate
gralkapk Nov 13, 2023
bd1b3d5
beep
gralkapk Nov 13, 2023
ba63953
increased trigger signal width
gralkapk Nov 14, 2023
eb7a4f7
embed trigger timestamp in parquet files
gralkapk Nov 14, 2023
791940c
capture trigger timestamp before triggering
gralkapk Nov 14, 2023
edb630e
we need all trigger ts
gralkapk Nov 14, 2023
f29c3f6
fixed formatting
gralkapk Nov 14, 2023
02179af
wip analysis script
gralkapk Nov 14, 2023
d335dd0
increased trigger signal width
gralkapk Nov 15, 2023
f134e43
use soft trigger
gralkapk Nov 15, 2023
4761ed1
atomic trigger state
gralkapk Nov 15, 2023
268cf3e
wip analysis script
gralkapk Nov 15, 2023
fe27a73
rather use matplotlib
gralkapk Nov 16, 2023
6b66f05
updated and optimized analysis script
gralkapk Nov 16, 2023
c3e83d2
tracy markers for analysis
gralkapk Nov 17, 2023
f9afc92
reset width as long as soft trigger is used
gralkapk Nov 17, 2023
52a14a8
additional tracy gpu zones
gralkapk Nov 17, 2023
0e39e11
update pwr owg version
gralkapk Nov 28, 2023
96db906
filtering of adl sensors
gralkapk Nov 28, 2023
163205f
wip analysis script
gralkapk Nov 28, 2023
88a2942
ContextToCPU
gralkapk Nov 30, 2023
1ccd25e
wip timeline
gralkapk Nov 30, 2023
15dcae4
timeline fix
gralkapk Dec 1, 2023
5fee50b
updated analysis script
gralkapk Dec 5, 2023
2c16ff7
have the nogl path signal frame borders as well
gralkapk Dec 5, 2023
ce672d9
updated pwrowg version
gralkapk Dec 6, 2023
d17606d
sol callback for channel offset
gralkapk Dec 6, 2023
065db06
current config files
gralkapk Dec 6, 2023
93d28f7
tinker config files for 2 or 3 peg slots
gralkapk Dec 6, 2023
9b96d00
fixed msr rename
gralkapk Dec 7, 2023
4dde707
sub in recipes
gralkapk Dec 7, 2023
f9347b8
updated configs
gralkapk Dec 7, 2023
23fe1dc
new default tinker recipe
gralkapk Dec 7, 2023
0afbd7e
wip analysis script
gralkapk Dec 7, 2023
71b3849
measurement updates
gralkapk Dec 14, 2023
b4ae6c7
resync tinkerforge clock
gralkapk Dec 14, 2023
a8d9b13
updated analysis script
gralkapk Dec 18, 2023
a77b4c1
minor changes
gralkapk Dec 18, 2023
4069800
zero_adjust
gralkapk Dec 18, 2023
d9088ed
gl flush and finish
gralkapk Feb 8, 2024
ac2d7bb
fixed power service init
gralkapk Feb 8, 2024
64531ad
update osci config
gralkapk Feb 8, 2024
381eda2
changed ADL discard and naming convention
gralkapk Feb 13, 2024
72bef53
more output and Tinker json fix
gralkapk Feb 13, 2024
5a73cce
updated PWROWG version
gralkapk Feb 13, 2024
354cec8
updated osci configs
gralkapk Feb 14, 2024
ba983b6
updated analysis script for gpuz input
gralkapk Feb 16, 2024
51bb885
analysis with hwinfo input
gralkapk Feb 21, 2024
c142195
updated analysis script
gralkapk Feb 26, 2024
c0b528b
updated analysis script
gralkapk Mar 7, 2024
e37525a
sub config
gralkapk Mar 7, 2024
f116702
compile fix for megamol without power flag enabled
gralkapk Apr 2, 2024
000b7b4
fixed pwrowg version
gralkapk Apr 4, 2024
76266aa
updated osci configs
gralkapk Apr 4, 2024
9cf0559
Merge remote-tracking branch 'origin/master' into lpt
gralkapk May 16, 2024
6fc980d
Format fix.
Jun 25, 2024
c3b3a6e
fixed deprecated debug option issue
gralkapk Jun 25, 2024
31b9ae8
back to regular Tracy
gralkapk Jun 25, 2024
fd04a07
cleanup error messages
gralkapk Jun 25, 2024
021803d
fixed win32 issue in CryptToken
gralkapk Jun 26, 2024
f95bb78
removed CUDA to CPU modules for different PR
gralkapk Jun 26, 2024
370de9c
removed analysis scripts
gralkapk Jun 26, 2024
307ad16
cleanup and moved configs together
gralkapk Jun 26, 2024
ce87c64
cleanup and fixed multiple PEGAUX entries in rtx recipe
gralkapk Jun 26, 2024
11de7e6
removed string container class
gralkapk Jun 26, 2024
e8533e6
cleanup
gralkapk Jun 26, 2024
caf534a
Format fix.
Jun 26, 2024
3a7d7a2
wip
gralkapk Jun 26, 2024
b135a8f
linux compile fix
gralkapk Jun 26, 2024
9c00274
cleanup and comments
gralkapk Jun 26, 2024
d57b424
cleanup and comments
gralkapk Jun 26, 2024
7d7f7e3
wip
gralkapk Jun 26, 2024
c14c372
wip
gralkapk Jun 26, 2024
ea11cf1
cleanup and comments
gralkapk Jun 26, 2024
d6bf69f
cleanup and comments
gralkapk Jun 26, 2024
fc4a74c
Comments in SignalBroker. Fixed container type in the class.
gralkapk Jun 27, 2024
c2c3134
Cleanup and comments in SamplerUtility.
gralkapk Jun 27, 2024
29dd4f7
Cleanup and comments.
gralkapk Jun 27, 2024
110bd4d
Cleanup and comments.
gralkapk Jun 27, 2024
af6e1ef
vs comment style
moritz-h Jun 27, 2024
59380b6
update dataversepp port
moritz-h Jun 28, 2024
7343f9a
format
moritz-h Jun 28, 2024
c90defc
Cleanup and comments.
gralkapk Jun 28, 2024
b5985bc
Cleanup and comments.
gralkapk Jun 28, 2024
bca38de
Cleanup and comments.
gralkapk Jun 28, 2024
01eb558
update dataversepp
moritz-h Jun 28, 2024
0b29827
Cleanup and comments.
gralkapk Jun 28, 2024
802d7d8
Cleanup and comments. Dataverse writer should be Windows only currently.
gralkapk Jun 28, 2024
a7656bf
Cleanup of comments.
gralkapk Jun 28, 2024
1561c8d
Cleanup and comments.
gralkapk Jun 28, 2024
8bfb986
Mask Win32 functions
gralkapk Jun 28, 2024
0f28241
add use_power to azure CI
gralkapk Jun 28, 2024
9351fe0
Format fix.
Jun 28, 2024
e36efc6
Merge remote-tracking branch 'origin/master' into lpt
gralkapk Jul 1, 2024
c9dc8b6
update power-overwhelming
moritz-h Jul 1, 2024
ca13ac6
Merge branch 'master' into lpt
moritz-h Jul 1, 2024
500c1d2
fix feature option
moritz-h Jul 1, 2024
e1c99f6
fix power-overwhelming port using fetchcontent
moritz-h Jul 1, 2024
f80343e
make flush finish a runtime option
moritz-h Jul 1, 2024
c7de301
cleanup memleak option
moritz-h Jul 1, 2024
fd1d470
fix gcc11 include, cleanup
moritz-h Jul 1, 2024
7baa03d
enable power in vcpkg cache
moritz-h Jul 1, 2024
9293c98
update power-overwhelming
moritz-h Jul 1, 2024
6764a8b
Merge remote-tracking branch 'origin/master' into lpt
gralkapk Jul 5, 2024
539535d
avoid windows types
moritz-h Jul 5, 2024
e7df26c
remove using_resolution
moritz-h Jul 5, 2024
7790963
new embed ptx function
gralkapk Jul 5, 2024
988e572
partial fix cmake file
gralkapk Jul 5, 2024
7813359
fixed optix compile
gralkapk Jul 5, 2024
e2f0bf6
updated findoptix, add lineinfo to ptx debug compile, cleanup
gralkapk Jul 6, 2024
f7972ab
fixes for BVH
gralkapk Jul 9, 2024
97b93be
fixed some warnings
gralkapk Jul 6, 2024
bbc9400
cleanup of cuda-specific cmake options
gralkapk Jul 9, 2024
7b8f1d0
currently no need for occlusion ray
gralkapk Jul 10, 2024
0f2a74c
Merge branch 'master' into lpt
moritz-h Jul 24, 2024
c9ad921
Merge branch 'vcpkg' into lpt
moritz-h Jul 25, 2024
56b23fb
Merge branch 'master' into lpt
moritz-h Jul 26, 2024
a597a37
update dataversepp
moritz-h Jul 27, 2024
1d16cbc
workaround unsupported C++20 features
moritz-h Jul 27, 2024
191b897
Merge branch 'master' into lpt
moritz-h Aug 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
# https://devblogs.microsoft.com/cppblog/doxygen-and-xml-doc-comment-support/
vc_generate_documentation_comments = doxygen_slash_star

[*.json]
indent_size = 2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
-DMEGAMOL_WARNING_LEVEL="Off"
-DMEGAMOL_PLUGIN_MEGAMOL101_GL=ON
-DMEGAMOL_USE_CGAL=ON
-DMEGAMOL_USE_POWER=ON
-DMEGAMOL_USE_PROFILING=ON
-DMEGAMOL_USE_STACKTRACE=ON
-DMEGAMOL_USE_TRACY=ON
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) 2020, MegaMol Dev Team
# All rights reserved.
#
cmake_minimum_required(VERSION 3.19...3.29 FATAL_ERROR)
cmake_minimum_required(VERSION 3.24...3.29 FATAL_ERROR)

# Vcpkg setup
set(MEGAMOL_VCPKG_VERSION "2024.07.12") # Update default-registry baseline in vcpkg.json when changing!
Expand All @@ -27,6 +27,7 @@ megamol_feature_option(VTKM "Enable VTK-m support." OFF)
megamol_feature_option(CUESDK "Enable Corsair CUESDK support." OFF "WIN32")
megamol_feature_option(OPENGL_DEBUGGROUPS "Inject OpenGL debug groups into calls." OFF "MEGAMOL_USE_OPENGL")
megamol_feature_option(POWER_VISA "Enable power measurement VISA sensors." OFF "MEGAMOL_USE_POWER")
megamol_feature_option(TRACY_TIME_PLOT "Enable custom Tracy timed plotting capabilities." OFF "MEGAMOL_USE_TRACY")
megamol_feature_option(VR_INTEROP "Enable MegaMol-Unity VR Interop via Spout2." OFF "WIN32;MEGAMOL_USE_OPENGL")

# Disable in source build
Expand Down
10 changes: 9 additions & 1 deletion cmake/megamol_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ endif ()
add_compile_definitions("$<$<CONFIG:DEBUG>:DEBUG>")
add_compile_definitions("$<$<CONFIG:DEBUG>:_DEBUG>")

# MEMLEAK
cmake_dependent_option(MEGAMOL_DETECT_MEMLEAK "Enable to use Memleak detection (MSVC only)" OFF "MSVC" OFF)
if (MEGAMOL_DETECT_MEMLEAK)
add_compile_definitions("$<$<CONFIG:DEBUG>:MEGAMOL_DETECT_MEMLEAK>")
endif()

# Compiler flags
# Note: special C++ and C-Compiler flags should be set for each language separately as done below.
# Otherwise, a possible compilation with CUDA will propagate those flags to the CUDA-Compiler and lead to a crash.
Expand Down Expand Up @@ -95,8 +101,10 @@ endif ()

# CUDA
if (MEGAMOL_USE_CUDA)
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_ARCHITECTURES native)
endif()
enable_language(CUDA)
set(CMAKE_CUDA_ARCHITECTURES FALSE)
endif ()

# MPI
Expand Down
30 changes: 30 additions & 0 deletions cmake/vcpkg_ports/dataversepp/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO UniStuttgart-VISUS/dataversepp
REF 4857d61a899443ae77641e3df730d2b8c26607dc # master on 2024-07-27
SHA512 801b2f43ea42698f295ad36069f30495da8891acee5dda23127168b7d989e8d9a67b45f794288ed3747c5333109fbbcb6a78051b46fcf46273de91a46750dd55
HEAD_REF master
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DDATAVERSE_BuildCli=OFF
-DDATAVERSE_DownloadThirdParty=OFF
-DDATAVERSE_BuildTests=OFF
-DDATAVERSE_Unicode=OFF
)

vcpkg_cmake_install()

vcpkg_cmake_config_fixup(
PACKAGE_NAME dataversepp
CONFIG_PATH lib/cmake/dataverse
)

vcpkg_copy_pdbs()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENCE")
32 changes: 32 additions & 0 deletions cmake/vcpkg_ports/dataversepp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "dataversepp",
"version-date": "2024-07-27",
"description": "Framework for dataverse data transfer.",
"homepage": "https://github.com/UniStuttgart-VISUS/dataversepp",
"license": "MIT",
"dependencies": [
{
"name": "curl",
"features": [
"ssl"
]
},
{
"name": "icu",
"platform": "!windows"
},
"nlohmann-json",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
},
{
"name": "wil",
"platform": "windows"
}
]
}
4 changes: 3 additions & 1 deletion core/include/mmcore/utility/graphics/ScreenShotComments.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

#include <png.h>

#include "RuntimeInfo.h"

namespace megamol::core::utility::graphics {

class ScreenShotComments {
Expand All @@ -26,7 +28,7 @@ class ScreenShotComments {
* constructor and later get out the png_text you need for feeding libpng. Note that the returned png_text array
* is only valid as long as the ScreenShotComments instance is in scope!
*/
ScreenShotComments(std::string const& project_configuration,
ScreenShotComments(std::string const& project_configuration, megamol::frontend_resources::RuntimeInfo const* ri,
const std::optional<comments_storage_map>& additional_comments = std::nullopt);

png_comments GetComments() const;
Expand Down
48 changes: 48 additions & 0 deletions core/include/mmcore/utility/platform/RuntimeInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
#pragma once

#include <mutex>
#include <string>

#include "WMIUtil.h"
Expand All @@ -15,25 +16,60 @@ class RuntimeInfo {
public:
static std::string GetHardwareInfo() {
if (m_hardware_info.empty()) {
std::lock_guard<std::mutex> lock(write_mtx_);
get_hardware_info();
}
return m_hardware_info;
}

static std::string GetOsInfo() {
if (m_os_info.empty()) {
std::lock_guard<std::mutex> lock(write_mtx_);
get_os_info();
}
return m_os_info;
}

static std::string GetRuntimeLibraries() {
if (m_runtime_libraries.empty()) {
std::lock_guard<std::mutex> lock(write_mtx_);
get_runtime_libraries();
}
return m_runtime_libraries;
}

static std::string GetSMBIOSInfo() {
if (smbios_.empty()) {
std::lock_guard<std::mutex> lock(write_mtx_);
get_smbios_info();
}
return smbios_;
}

static std::string GetCPUInfo() {
if (cpu_.empty()) {
std::lock_guard<std::mutex> lock(write_mtx_);
get_cpu_info();
}
return cpu_;
}

static std::string GetGPUInfo() {
if (gpu_.empty()) {
std::lock_guard<std::mutex> lock(write_mtx_);
get_gpu_info();
}
return gpu_;
}

static std::string GetOSInfo() {
if (os_.empty()) {
std::lock_guard<std::mutex> lock(write_mtx_);
get_OS_info();
}
return os_;
}


private:
static void get_hardware_info();
Expand All @@ -45,6 +81,18 @@ class RuntimeInfo {
inline static std::string m_os_info;
inline static std::string m_hardware_info;

static void get_smbios_info(bool serial = false);
static void get_cpu_info();
static void get_gpu_info();
static void get_OS_info();

inline static std::string smbios_;
inline static std::string cpu_;
inline static std::string gpu_;
inline static std::string os_;

inline static std::mutex write_mtx_;

#ifdef _WIN32
inline static WMIUtil wmi;
#endif
Expand Down
7 changes: 5 additions & 2 deletions core/include/mmcore/utility/platform/WMIUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#ifdef _WIN32

#include <iostream>
#include <wil/com.h>

#define _WIN32_DCOM
#include <Wbemidl.h>
Expand All @@ -27,8 +28,10 @@ class WMIUtil {
std::string get_value(const std::string& wmi_class, const std::string& attribute);

private:
IWbemLocator* locator = nullptr;
IWbemServices* service = nullptr;
//IWbemLocator* locator = nullptr;
//IWbemServices* service = nullptr;
wil::com_ptr<IWbemServices> service;
//wil::unique_couninitialize_call cleanup;
};
} // namespace megamol::core::utility::platform

Expand Down
14 changes: 9 additions & 5 deletions core/src/utility/graphics/ScreenShotComments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@

namespace mcu_graphics = megamol::core::utility::graphics;

mcu_graphics::ScreenShotComments::ScreenShotComments(
std::string const& project_configuration, const std::optional<comments_storage_map>& additional_comments) {
mcu_graphics::ScreenShotComments::ScreenShotComments(std::string const& project_configuration,
megamol::frontend_resources::RuntimeInfo const* ri,
const std::optional<comments_storage_map>& additional_comments) {

the_comments["Title"] = "MegaMol Screen Capture " + utility::DateTime::CurrentDateTimeFormatted();
//the_comments["Author"] = "";
Expand All @@ -34,11 +35,14 @@ mcu_graphics::ScreenShotComments::ScreenShotComments(

the_comments["Remote Branch"] = megamol::core::utility::buildinfo::MEGAMOL_GIT_BRANCH_NAME_FULL();
the_comments["Remote URL"] = megamol::core::utility::buildinfo::MEGAMOL_GIT_REMOTE_URL();
the_comments["Software Environment"] = platform::RuntimeInfo::GetRuntimeLibraries();
the_comments["Hardware Environment"] = platform::RuntimeInfo::GetHardwareInfo();
the_comments["CMakeCache"] = megamol::core::utility::buildinfo::MEGAMOL_CMAKE_CACHE();
the_comments["Git Diff"] = megamol::core::utility::buildinfo::MEGAMOL_GIT_DIFF();
the_comments["Operating System"] = platform::RuntimeInfo::GetOsInfo();

if (ri) {
the_comments["Hardware Environment"] = ri->get_hardware_info();
the_comments["Operating System"] = ri->get_os_info();
the_comments["Software Environment"] = ri->get_runtime_libraries();
}

//the_comments["Disclaimer"] = "";
//the_comments["Warning"] = "";
Expand Down
Loading
Loading