nodes/stats is useful to view the performance of ingest nodes pipelines, showing how many events and how long it took to process events through the different processors. Nodes stats always shows the processors in the same order in which they are defined. However due to some internal code level reasons the name of the processor and type of the processor may be misleading when an `if` condition is present. 

Given the following time pipeline (the script is designed to be slow to show the time it took)

```
PUT _ingest/pipeline/mypipeline
{
  "processors": [
    {
      "set": {
        "field": "a",
        "value": "bl"
      }
    },
    {
      "script": {
        "if": "true",
        "source": " String a = ''; for(int i =0 ;i < 2147483647/10000; i ++){ a = a + 'x'}"
      }
    },
    {
      "uppercase": {
        "if": "true",
        "field": "a",
        "on_failure": [
          {
            "set": {
              "field": "error",
              "value": "true"
            }
          }
        ]
      }
    }
  ]
}

PUT test/_doc/1?pipeline=mypipeline
{}

GET _nodes/stats?filter_path=nodes.**.pipelines.mypipeline
```

Will result in : 
```
{
  "nodes" : {
    "xSq7F7CDR7mlUTgw4zu2pg" : {
      "ingest" : {
        "pipelines" : {
          "mypipeline" : {
            "count" : 1,
            "time_in_millis" : 5406,
            "current" : 0,
            "failed" : 0,
            "processors" : [
              {
                "set" : {
                  "type" : "set",
                  "stats" : {
                    "count" : 1,
                    "time_in_millis" : 0,
                    "current" : 0,
                    "failed" : 0
                  }
                }
              },
              {
                "script" : {
                  "type" : "conditional",
                  "stats" : {
                    "count" : 1,
                    "time_in_millis" : 5406,
                    "current" : 0,
                    "failed" : 0
                  }
                }
              },
              {
                "compound:CompoundProcessor-null-null" : {
                  "type" : "conditional",
                  "stats" : {
                    "count" : 1,
                    "time_in_millis" : 0,
                    "current" : 0,
                    "failed" : 0
                  }
                }
              }
            ]
          }
        }
      }
    }
  }
}
```
The first processor output is correct. 
The second processor shows `"type" : "conditional"`
The third processor also shows `"type" : "conditional"`, but also has the name `compound:CompoundProcessor-null-null` (it should be "uppercase" in reference to the processor name)

This is due to how the conditional 'if' is implemented as well as the on-failure handler. 

As a work around, one can identify which processor the stats are for by counting top down, it will be the same order as the pipeline is defined. 

server/src/main/java/org/elasticsearch/ingest/IngestService.java
}
                    }
                    indexRequest.setPipeline(Objects.requireNonNullElse(defaultPipeline, NOOP_PIPELINE_NAME));
                    indexRequest.setFinalPipeline(Objects.requireNonNullElse(finalPipeline, NOOP_PIPELINE_NAME));
                }
            }
            if (requestPipeline != null) {
                indexRequest.setPipeline(requestPipeline);
            }
            /*
             * We have to track whether or not the pipeline for this request has already been resolved. It can happen that the
             * pipeline for this request has already been derived yet we execute this loop again. That occurs if the bulk request
             * has been forwarded by a non-ingest coordinating node to an ingest node. In this case, the coordinating node will have
             * already resolved the pipeline for this request. It is important that we are able to distinguish this situation as we
             * can not double-resolve the pipeline because we will not be able to distinguish the case of the pipeline having been
             * set from a request pipeline parameter versus having been set by the resolution. We need to be able to distinguish
             * these cases as we need to reject the request if the pipeline was set by a required pipeline and there is a request
             * pipeline parameter too.
             */
            indexRequest.isPipelineResolved(true);
        }
        
        return NOOP_PIPELINE_NAME.equals(indexRequest.getPipeline()) == false
            || NOOP_PIPELINE_NAME.equals(indexRequest.getFinalPipeline()) == false;
    }
    public ClusterService getClusterService() {
        return clusterService;
    }
    public ScriptService getScriptService() {
        return scriptService;