sh_open shash_get shash_set shash_cset shash_keys_array shash_group_get_hash);
use JSON::XS qw(encode_json decode_json);
use File::Temp qw(tempdir);
use File::Path qw(rmtree);
use Carp qw(croak carp);
join('-', 'k', $name, $self->_format_labels($labels));
shash_set($self->{_shash}, $key, encode_json([$value, $timestamp]));
return;
}
sub add {
my ($self, $name, $diff, $labels) = @_;
unle
}, $key);
if ($ov) {
my $ar = decode_json($ov);
$ar->[0] += $diff;
$nv = encode_json($ar);
}
else {
$nv = encode_json([$diff]);
}
} until shash_cset($self->{_