From 315284c12a188759fca7c793af8d78ecabee8466 Mon Sep 17 00:00:00 2001 From: Matthew Territo Date: Tue, 18 Jul 2017 10:48:04 -0600 Subject: [PATCH 1/3] Replace spaces with underscores in node names --- src/performance/performancemanager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/performance/performancemanager.cpp b/src/performance/performancemanager.cpp index beaa9cba0d..21e1fdf066 100644 --- a/src/performance/performancemanager.cpp +++ b/src/performance/performancemanager.cpp @@ -255,6 +255,8 @@ void PerformanceManager::writeData(std::ofstream& out, const std::vector& std::string PerformanceManager::formatLogName(std::string nodeName) { // Replace any colons with dashes std::replace(nodeName.begin(), nodeName.end(), ':', '-'); + // Replace spaces with underscore + std::replace(nodeName.begin(), nodeName.end(), ' ', '_'); return _logDir + "/" + _prefix + nodeName + _suffix + "." + _ext; } From f14af630ed7b5df07e2788d5a1048eb9bd2f8b2f Mon Sep 17 00:00:00 2001 From: Matthew Territo Date: Tue, 18 Jul 2017 14:51:26 -0600 Subject: [PATCH 2/3] Write remaining PerformanceMeasurement logs on destruction, even when there is not a multiple of the PerformanceLayout::NumberValues --- src/performance/performancemanager.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/performance/performancemanager.cpp b/src/performance/performancemanager.cpp index 21e1fdf066..708cbdc5db 100644 --- a/src/performance/performancemanager.cpp +++ b/src/performance/performancemanager.cpp @@ -172,6 +172,10 @@ PerformanceManager::PerformanceManager() } PerformanceManager::~PerformanceManager() { + if (loggingEnabled()) { + outputLogs(); + } + if (_performanceMemory) { ghoul::SharedMemory sharedMemory(GlobalSharedMemoryName); sharedMemory.acquireLock(); @@ -207,6 +211,7 @@ void PerformanceManager::outputLogs() { // Log Layout values PerformanceLayout* layout = performanceData(); + const size_t writeStart = (PerformanceLayout::NumberValues - 1) - _tick; // Log function performance for (size_t n = 0; n < layout->nFunctionEntries; n++) { @@ -215,7 +220,7 @@ void PerformanceManager::outputLogs() { std::ofstream out = std::ofstream(absPath(filename), std::ofstream::out | std::ofstream::app); // Comma separate data - for (size_t i = 0; i < PerformanceLayout::NumberValues; i++) { + for (size_t i = writeStart; i < PerformanceLayout::NumberValues; i++) { const std::vector data = { function.time[i] }; writeData(out, data); } @@ -231,7 +236,7 @@ void PerformanceManager::outputLogs() { std::ofstream out = std::ofstream(absPath(filename), std::ofstream::out | std::ofstream::app); // Comma separate data - for (size_t i = 0; i < PerformanceLayout::NumberValues; i++) { + for (size_t i = writeStart; i < PerformanceLayout::NumberValues; i++) { const std::vector data = { node.renderTime[i], node.updateRenderable[i], From 51be0629bcd480d50428805b526bbb5bff08896c Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 19 Jul 2017 00:57:50 -0400 Subject: [PATCH 3/3] Create CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..e38b6a04d6 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,38 @@ +# Contributor Covenant Code of Conduct +In the interest of fostering an open and welcoming environment, we as contributors and maintainers work towards making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards +Examples of behavior that contributes to creating a positive environment include: + + - Using welcoming and inclusive language + - Being respectful of differing viewpoints and experiences + - Gracefully accepting constructive criticism + - Focusing on what is best for the community + - Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + + - The use of sexualized language or imagery and unwelcome sexual attention or advances + - Trolling, insulting/derogatory comments, and personal or political attacks + - Public or private harassment + - Publishing others' private information, such as a physical or electronic address, without explicit permission + - Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at alexander.bock@me.com or vivian@amnh.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/