Skip to content

Commit

Permalink
extrusion output proably fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tg44 committed Apr 9, 2021
1 parent 52ee0cb commit 5a3d788
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions octoprint_prometheus_exporter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,9 @@ def gcodephase_hook(self, comm_instance, phase, cmd, cmd_type, gcode, subcode=No
if phase == "sent":
parse_result = self.parser.process_line(cmd)
if parse_result == "movement":
# extrusion_print is modeled as a gauge so we can reset it after every print
self.extrusion_print.set(self.parser.extrusion_counter)

if self.parser.extrusion_counter > self.last_extrusion_counter:
# extrusion_total is monotonically increasing for the lifetime of the plugin
self.extrusion_print.inc(self.parser.extrusion_counter - self.last_extrusion_counter)
self.extrusion_total.inc(self.parser.extrusion_counter - self.last_extrusion_counter)
self.last_extrusion_counter = self.parser.extrusion_counter

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "OctoPrint-Prometheus-Exporter"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "0.1.6"
plugin_version = "0.1.7"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit 5a3d788

Please sign in to comment.