-
Notifications
You must be signed in to change notification settings - Fork 8
/
_help
executable file
·76 lines (72 loc) · 4.77 KB
/
_help
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/env bash
# vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=bash
# -*- mode: sh; indent-tabs-mode: nil; sh-basic-offset: 4 -*-
function help() {
echo "Usage:"
echo " crucible <command> [command-specific-options]"
echo ""
echo "The following commands are supported"
echo ""
echo "help | Show this help message"
echo "run | Run a benchmark"
echo "log | Manage with the crucible log"
echo "repo | Get info on the crucible and subproject git repos"
echo "update | Update all or part of the crucible software"
echo "console | Run user supplied programs inside a crucible wrapper for logging purposes"
echo "wrapper | Run a crucible subproject command directly, within a crucible container"
echo "get result | Get a result summary for all runs in ES"
echo "get result --run <id> | Get a result summary for run matching the id provided"
echo " | - run-id can be found in ${var_run_crucible}/<your-run>/run/rickshaw-run.json[.xz]"
echo "get metric --run <id> | Get a metric from benchmark or tool."
echo " | - Other arguments are required:"
echo " | --source <tool or benchmark> and --type <tool/bench-specific metric, like Gbps>"
echo " | (see the available source and types shown in a result summary (crucible get result ...)"
echo " | --period <id> or --begin <epoch_ms> --end <epoch_ms "
echo " | (see the available period ids or begin/end shown in a result summary (crucible get result ...)"
echo " | - Other arguments are optional:"
echo " | --breakout <list of one or more breakouts>"
echo " | (found from initial metric query, like cstype or id)"
echo " | --filter <gt|lt:number>"
echo " | (gt = only show metrics greater-then value, lt = onlt show metrics less than value"
echo "index <dir> | Index a result which is already post-processed with run-result-dir argument immediately following 'index'"
echo "rm --run <id> | Remove a run from ES (required if you want to re-post-process/index a result already in ES)"
echo "postprocess | Post-process (and index) a result with run-result-dir argument immediately following 'index'"
echo "es init | Completely delete and init ES, leaving ES with only empty indices"
echo "es rebuild | Completely delete and init ES, then post-process and index all runs found in ${var_run_crucible}"
echo "extract | Extract data from a run directory:"
echo " run-id <dir> | - Such as the run ID"
echo " primary-periods <dir> | - Or a list of the primary period IDs"
echo "ls | List the run results with optional arguments"
echo "tags | Manage the tags associated with run results"
echo "notify test | Check if the notification service is working properly"
echo "archive <dir> | Create an archive of the run result pointed to by <dir> and remove it from the run directory"
echo "unarchive <archive> | Unpack an archive named <archive> and put it back in the run directory"
echo "start es|httpd|redis | Start the specified service manually. Not required, Crucible will start the services it needs when it needs them."
echo "stop es|httpd|redis | Stop the specified service manually."
echo "reset [hard] | Clear the log and re-initialize ES. If the optional hard parameter is specified then all run data is also deleted."
echo "run-ci | Run crucible-ci stage1. For development testing purposes only!"
echo ""
echo "For more detailed help for each command, try:"
echo " crucible help <command>"
echo ""
}
{
CRUCIBLE_HOME="${1}"
shift
if [ -z "${CRUCIBLE_HOME}" -o ! -e "${CRUCIBLE_HOME}" ]; then
echo "ERROR: Could not find ${CRUCIBLE_HOME}, exiting."
exit 1
fi
. $CRUCIBLE_HOME/bin/base
if [ "${1}" == "log" ]; then
${CRUCIBLE_HOME}/bin/log help
elif [ "${1}" == "repo" ]; then
${CRUCIBLE_HOME}/bin/repo help
elif [ "${1}" == "update" ]; then
${CRUCIBLE_HOME}/bin/update help
elif [ "${1}" == "run" ]; then
echo "please see https://github.com/perftool-incubator/crucible/tree/master/doc"
else
help
fi
} | less -S -F