aboutsummaryrefslogtreecommitdiffstats
path: root/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/servicedump/ArtifactProducer.java
blob: 0394756cc779f810ff63c153d9102c0e0b87e2ce (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.admin.maintenance.servicedump;

import com.yahoo.vespa.hosted.node.admin.task.util.fs.ContainerPath;
import com.yahoo.vespa.hosted.node.admin.task.util.process.CommandResult;

import java.util.List;
import java.util.OptionalDouble;

/**
 * Produces service dump artifacts.
 *
 * @author bjorncs
 */
interface ArtifactProducer {

    String artifactName();
    String description();
    List<Artifact> produceArtifacts(Context ctx);

    interface Context {
        String serviceId();
        int servicePid();
        CommandResult executeCommandInNode(List<String> command, boolean logOutput);
        ContainerPath outputContainerPath();
        ContainerPath containerPathUnderVespaHome(String relativePath);
        Options options();

        interface Options {
            OptionalDouble duration();
            boolean callGraphRecording();
            boolean sendProfilingSignal();
        }
    }


}