Search in sources :

Example 1 with Metric

use of org.stepik.api.objects.metrics.Metric in project intellij-plugins by StepicOrg.

the class Metrics method postSimpleMetric.

private static void postSimpleMetric(@NotNull Project project, @NotNull String action, @NotNull MetricsStatus status) {
    Metric metric = new Metric();
    metric.addTags("action", action);
    postMetrics(project, metric, status);
}
Also used : Metric(org.stepik.api.objects.metrics.Metric)

Example 2 with Metric

use of org.stepik.api.objects.metrics.Metric in project intellij-plugins by StepicOrg.

the class Metrics method stepAction.

private static void stepAction(@NotNull String actionName, @NotNull Project project, @NotNull StepNode stepNode, @NotNull MetricsStatus status) {
    Metric metric = new Metric();
    metric.addTags("action", actionName);
    metric.addData("step_id", stepNode.getId());
    metric.addTags("step_programming_language", stepNode.getCurrentLang().getName());
    StepType stepType = stepNode.getType();
    metric.addTags("step_type", stepType.getName());
    postMetrics(project, metric, status);
}
Also used : StepType(org.stepik.core.courseFormat.StepType) Metric(org.stepik.api.objects.metrics.Metric)

Aggregations

Metric (org.stepik.api.objects.metrics.Metric)2 StepType (org.stepik.core.courseFormat.StepType)1