[jira] [Commented] (MINIFICPP-652) Add monitored threads to stacks protocol

2018-11-02 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MINIFICPP-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16673375#comment-16673375
 ] 

ASF GitHub Bot commented on MINIFICPP-652:
--

Github user asfgit closed the pull request at:

https://github.com/apache/nifi-minifi-cpp/pull/428


> Add monitored threads to stacks protocol
> 
>
> Key: MINIFICPP-652
> URL: https://issues.apache.org/jira/browse/MINIFICPP-652
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Mr TheSegfault
>Assignee: Mr TheSegfault
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (MINIFICPP-652) Add monitored threads to stacks protocol

2018-10-29 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MINIFICPP-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1923#comment-1923
 ] 

ASF GitHub Bot commented on MINIFICPP-652:
--

Github user arpadboda commented on a diff in the pull request:

https://github.com/apache/nifi-minifi-cpp/pull/428#discussion_r228855333
  
--- Diff: libminifi/src/FlowController.cpp ---
@@ -911,11 +911,18 @@ uint64_t FlowController::getUptime() {
 }
 
 std::vector FlowController::getTraces() {
-std::vector traces;
+  std::vector traces;
   auto timer_driven = timer_scheduler_->getTraces();
   traces.insert(traces.end(), 
std::make_move_iterator(timer_driven.begin()), 
std::make_move_iterator(timer_driven.end()));
   auto event_driven = event_scheduler_->getTraces();
   traces.insert(traces.end(), 
std::make_move_iterator(event_driven.begin()), 
std::make_move_iterator(event_driven.end()));
+  // repositories
+  auto prov_repo_trace = provenance_repo_->getTraces();
+  traces.emplace_back(std::move(prov_repo_trace));
--- End diff --

Just for the record as I have already approved the PR, this is fine as is. 

push_back also supports move, so in such case there is no difference.

The reason I prefer to avoid emplace in such cases is calling explicit 
ctors:
```
class A
{
  public:
  bool mb;
  explicit A(bool b): mb(b) {}
};

int main()
{
  A* ap = new A(false);
  std::vector vec;
  vec.emplace_back(ap); 
  std::cout << vec[0].mb; //prints true
}
```


> Add monitored threads to stacks protocol
> 
>
> Key: MINIFICPP-652
> URL: https://issues.apache.org/jira/browse/MINIFICPP-652
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Mr TheSegfault
>Assignee: Mr TheSegfault
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (MINIFICPP-652) Add monitored threads to stacks protocol

2018-10-29 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MINIFICPP-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1907#comment-1907
 ] 

ASF GitHub Bot commented on MINIFICPP-652:
--

Github user arpadboda commented on a diff in the pull request:

https://github.com/apache/nifi-minifi-cpp/pull/428#discussion_r228848961
  
--- Diff: libminifi/include/core/TraceableResource.h ---
@@ -0,0 +1,53 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef LIBMINIFI_INCLUDE_CORE_TRACEABLERESOURCE_H_
--- End diff --

I don't think it's important to immediately change the project as it works, 
however for newly introduced files I would prefer pragma given it cannot be 
mistyped. 


> Add monitored threads to stacks protocol
> 
>
> Key: MINIFICPP-652
> URL: https://issues.apache.org/jira/browse/MINIFICPP-652
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Mr TheSegfault
>Assignee: Mr TheSegfault
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (MINIFICPP-652) Add monitored threads to stacks protocol

2018-10-29 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MINIFICPP-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1904#comment-1904
 ] 

ASF GitHub Bot commented on MINIFICPP-652:
--

Github user arpadboda commented on a diff in the pull request:

https://github.com/apache/nifi-minifi-cpp/pull/428#discussion_r228848352
  
--- Diff: libminifi/src/FlowController.cpp ---
@@ -911,11 +911,18 @@ uint64_t FlowController::getUptime() {
 }
 
 std::vector FlowController::getTraces() {
-std::vector traces;
+  std::vector traces;
   auto timer_driven = timer_scheduler_->getTraces();
   traces.insert(traces.end(), 
std::make_move_iterator(timer_driven.begin()), 
std::make_move_iterator(timer_driven.end()));
   auto event_driven = event_scheduler_->getTraces();
   traces.insert(traces.end(), 
std::make_move_iterator(event_driven.begin()), 
std::make_move_iterator(event_driven.end()));
--- End diff --

Okay, I can live with that. 


> Add monitored threads to stacks protocol
> 
>
> Key: MINIFICPP-652
> URL: https://issues.apache.org/jira/browse/MINIFICPP-652
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Mr TheSegfault
>Assignee: Mr TheSegfault
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (MINIFICPP-652) Add monitored threads to stacks protocol

2018-10-28 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MINIFICPP-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1556#comment-1556
 ] 

ASF GitHub Bot commented on MINIFICPP-652:
--

Github user phrocker commented on a diff in the pull request:

https://github.com/apache/nifi-minifi-cpp/pull/428#discussion_r228764823
  
--- Diff: libminifi/src/FlowController.cpp ---
@@ -911,11 +911,18 @@ uint64_t FlowController::getUptime() {
 }
 
 std::vector FlowController::getTraces() {
-std::vector traces;
+  std::vector traces;
   auto timer_driven = timer_scheduler_->getTraces();
   traces.insert(traces.end(), 
std::make_move_iterator(timer_driven.begin()), 
std::make_move_iterator(timer_driven.end()));
   auto event_driven = event_scheduler_->getTraces();
   traces.insert(traces.end(), 
std::make_move_iterator(event_driven.begin()), 
std::make_move_iterator(event_driven.end()));
--- End diff --

I think both work. I've always preferred the way I do it because of the 
explicit naming of the move iterator -- it has resulted in less confusion with 
newer developers, but again I recognize everyone has a different style, so I 
won't attempt to push any style onto you. I even double checked after you 
comment -- assembly output is identical, so I'm not sure I have a real 
preference as I'm more 'function over style'


> Add monitored threads to stacks protocol
> 
>
> Key: MINIFICPP-652
> URL: https://issues.apache.org/jira/browse/MINIFICPP-652
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Mr TheSegfault
>Assignee: Mr TheSegfault
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (MINIFICPP-652) Add monitored threads to stacks protocol

2018-10-28 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MINIFICPP-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1554#comment-1554
 ] 

ASF GitHub Bot commented on MINIFICPP-652:
--

Github user phrocker commented on a diff in the pull request:

https://github.com/apache/nifi-minifi-cpp/pull/428#discussion_r228764771
  
--- Diff: libminifi/src/FlowController.cpp ---
@@ -911,11 +911,18 @@ uint64_t FlowController::getUptime() {
 }
 
 std::vector FlowController::getTraces() {
-std::vector traces;
+  std::vector traces;
   auto timer_driven = timer_scheduler_->getTraces();
   traces.insert(traces.end(), 
std::make_move_iterator(timer_driven.begin()), 
std::make_move_iterator(timer_driven.end()));
   auto event_driven = event_scheduler_->getTraces();
   traces.insert(traces.end(), 
std::make_move_iterator(event_driven.begin()), 
std::make_move_iterator(event_driven.end()));
+  // repositories
+  auto prov_repo_trace = provenance_repo_->getTraces();
+  traces.emplace_back(std::move(prov_repo_trace));
--- End diff --

I don't agree. it's an in place move construction; however, do agree that 
other developers have different styles. 


> Add monitored threads to stacks protocol
> 
>
> Key: MINIFICPP-652
> URL: https://issues.apache.org/jira/browse/MINIFICPP-652
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Mr TheSegfault
>Assignee: Mr TheSegfault
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (MINIFICPP-652) Add monitored threads to stacks protocol

2018-10-28 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MINIFICPP-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1552#comment-1552
 ] 

ASF GitHub Bot commented on MINIFICPP-652:
--

Github user phrocker commented on a diff in the pull request:

https://github.com/apache/nifi-minifi-cpp/pull/428#discussion_r228764724
  
--- Diff: libminifi/include/core/TraceableResource.h ---
@@ -0,0 +1,53 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef LIBMINIFI_INCLUDE_CORE_TRACEABLERESOURCE_H_
--- End diff --

include guards have existed since the project's inception and before my 
arrival. If you feel this is important enough to discuss and make the large 
number of changes then feel free to E-mail the dev mailing list. I, for one, 
don't have strong preferences over this and think it's developer preference.


> Add monitored threads to stacks protocol
> 
>
> Key: MINIFICPP-652
> URL: https://issues.apache.org/jira/browse/MINIFICPP-652
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Mr TheSegfault
>Assignee: Mr TheSegfault
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (MINIFICPP-652) Add monitored threads to stacks protocol

2018-10-28 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MINIFICPP-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1550#comment-1550
 ] 

ASF GitHub Bot commented on MINIFICPP-652:
--

Github user arpadboda commented on a diff in the pull request:

https://github.com/apache/nifi-minifi-cpp/pull/428#discussion_r228763896
  
--- Diff: libminifi/include/core/TraceableResource.h ---
@@ -0,0 +1,53 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef LIBMINIFI_INCLUDE_CORE_TRACEABLERESOURCE_H_
--- End diff --

Why not simply pragma once?


> Add monitored threads to stacks protocol
> 
>
> Key: MINIFICPP-652
> URL: https://issues.apache.org/jira/browse/MINIFICPP-652
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Mr TheSegfault
>Assignee: Mr TheSegfault
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (MINIFICPP-652) Add monitored threads to stacks protocol

2018-10-28 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MINIFICPP-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1548#comment-1548
 ] 

ASF GitHub Bot commented on MINIFICPP-652:
--

Github user arpadboda commented on a diff in the pull request:

https://github.com/apache/nifi-minifi-cpp/pull/428#discussion_r228764156
  
--- Diff: libminifi/src/FlowController.cpp ---
@@ -911,11 +911,18 @@ uint64_t FlowController::getUptime() {
 }
 
 std::vector FlowController::getTraces() {
-std::vector traces;
+  std::vector traces;
   auto timer_driven = timer_scheduler_->getTraces();
   traces.insert(traces.end(), 
std::make_move_iterator(timer_driven.begin()), 
std::make_move_iterator(timer_driven.end()));
   auto event_driven = event_scheduler_->getTraces();
   traces.insert(traces.end(), 
std::make_move_iterator(event_driven.begin()), 
std::make_move_iterator(event_driven.end()));
--- End diff --

This is not a new line, but it's:
```
std::move(event_driven.begin(), event_driven.end(), 
std::back_inserter(traces));
```


> Add monitored threads to stacks protocol
> 
>
> Key: MINIFICPP-652
> URL: https://issues.apache.org/jira/browse/MINIFICPP-652
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Mr TheSegfault
>Assignee: Mr TheSegfault
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (MINIFICPP-652) Add monitored threads to stacks protocol

2018-10-28 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MINIFICPP-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1549#comment-1549
 ] 

ASF GitHub Bot commented on MINIFICPP-652:
--

Github user arpadboda commented on a diff in the pull request:

https://github.com/apache/nifi-minifi-cpp/pull/428#discussion_r228764104
  
--- Diff: libminifi/src/FlowController.cpp ---
@@ -911,11 +911,18 @@ uint64_t FlowController::getUptime() {
 }
 
 std::vector FlowController::getTraces() {
-std::vector traces;
+  std::vector traces;
   auto timer_driven = timer_scheduler_->getTraces();
   traces.insert(traces.end(), 
std::make_move_iterator(timer_driven.begin()), 
std::make_move_iterator(timer_driven.end()));
   auto event_driven = event_scheduler_->getTraces();
   traces.insert(traces.end(), 
std::make_move_iterator(event_driven.begin()), 
std::make_move_iterator(event_driven.end()));
+  // repositories
+  auto prov_repo_trace = provenance_repo_->getTraces();
+  traces.emplace_back(std::move(prov_repo_trace));
--- End diff --

Emplacing doesn't make sense in case the argument type is the same as the 
container template type. 


> Add monitored threads to stacks protocol
> 
>
> Key: MINIFICPP-652
> URL: https://issues.apache.org/jira/browse/MINIFICPP-652
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Mr TheSegfault
>Assignee: Mr TheSegfault
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (MINIFICPP-652) Add monitored threads to stacks protocol

2018-10-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MINIFICPP-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16665778#comment-16665778
 ] 

ASF GitHub Bot commented on MINIFICPP-652:
--

GitHub user phrocker opened a pull request:

https://github.com/apache/nifi-minifi-cpp/pull/428

MINIFICPP-652: Add traceability to repositories and flow controller

Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

### For all changes:
- [ ] Is there a JIRA ticket associated with this PR? Is it referenced
 in the commit message?

- [ ] Does your PR title start with MINIFICPP- where  is the JIRA 
number you are trying to resolve? Pay particular attention to the hyphen "-" 
character.

- [ ] Has your PR been rebased against the latest commit within the target 
branch (typically master)?

- [ ] Is your initial contribution a single, squashed commit?

### For code changes:
- [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the LICENSE file?
- [ ] If applicable, have you updated the NOTICE file?

### For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in 
which it is rendered?

### Note:
Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/phrocker/nifi-minifi-cpp MINIFICPP-652-b

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/nifi-minifi-cpp/pull/428.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #428


commit 5fe24701cbe690e9bc2df95ea638271d22cf8812
Author: Marc Parisi 
Date:   2018-10-22T17:21:46Z

MINIFICPP-652: Add traceability to repositories and flow controller




> Add monitored threads to stacks protocol
> 
>
> Key: MINIFICPP-652
> URL: https://issues.apache.org/jira/browse/MINIFICPP-652
> Project: NiFi MiNiFi C++
>  Issue Type: Improvement
>Reporter: Mr TheSegfault
>Assignee: Mr TheSegfault
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)