Algorithm-TimelinePacking
view release on metacpan or search on metacpan
"requires" : {
"Test::CPAN::Meta" : "0",
"Test::MinimumVersion::Fast" : "0.04",
"Test::PAUSE::Permissions" : "0.07",
"Test::Pod" : "1.41",
"Test::Spellunker" : "v0.2.7"
}
},
"runtime" : {
"requires" : {
"JSON::XS" : "0",
"List::Util" : "1.33",
"Moo" : "2.000",
"POSIX" : "0",
"Types::Standard" : "1.000",
"perl" : "5.020"
}
},
"test" : {
"requires" : {
"Test::Exception" : "0",
version: '1.4'
name: Algorithm-TimelinePacking
no_index:
directory:
- examples
provides:
Algorithm::TimelinePacking:
file: lib/Algorithm/TimelinePacking.pm
version: '0.01'
requires:
JSON::XS: '0'
List::Util: '1.33'
Moo: '2.000'
POSIX: '0'
Types::Standard: '1.000'
perl: '5.020'
resources:
bugtracker: https://gitlab.com/dmorel69/Algorithm-TimelinePacking/issues
homepage: https://gitlab.com/dmorel69/Algorithm-TimelinePacking
repository: https://gitlab.com/dmorel69/Algorithm-TimelinePacking.git
version: '0.01'
requires 'perl', '5.020';
requires 'Moo', '2.000';
requires 'Types::Standard', '1.000';
requires 'List::Util', '1.33';
requires 'POSIX';
requires 'JSON::XS';
on 'test' => sub {
requires 'Test::More', '0.98';
requires 'Test::Exception';
};
cpanfile.snapshot view on Meta::CPAN
pathname: T/TO/TOBYINK/Exporter-Tiny-1.006003.tar.gz
provides:
Exporter::Shiny 1.006003
Exporter::Tiny 1.006003
requirements:
ExtUtils::MakeMaker 6.17
perl 5.006001
JSON-XS-4.04
pathname: M/ML/MLEHMANN/JSON-XS-4.04.tar.gz
provides:
JSON::XS 4.04
requirements:
Canary::Stability 0
ExtUtils::MakeMaker 6.52
Types::Serialiser 0
common::sense 0
Moo-2.005005
pathname: H/HA/HAARG/Moo-2.005005.tar.gz
provides:
Method::Generate::Accessor undef
Method::Generate::BuildAll undef
examples/generate_demo.pl view on Meta::CPAN
#
# Generate a demo HTML file showing timeline visualization
# Usage: carton exec perl examples/generate_demo.pl > examples/demo.html
#
use strict;
use warnings;
use FindBin qw($RealBin);
use lib "$RealBin/../lib";
use Algorithm::TimelinePacking;
use JSON::XS;
# Generate sample job data simulating a Hadoop cluster
my @users = qw(alice bob carol dave eve);
my @slices;
# Base timestamp (arbitrary, will be normalized anyway)
my $base = 1700000000;
# Generate 50 random jobs
srand(42); # reproducible results
examples/generate_demo.pl view on Meta::CPAN
my $reduces = 1 + int(rand(500));
push @slices, [$start, $end, "job_$i", $user, $maps, $reduces];
}
# Arrange slices using Timeline
my $timeline = Algorithm::TimelinePacking->new(space => 2);
my ($lines, $latest) = $timeline->arrange_slices(\@slices);
# Convert to JSON
my $json = JSON::XS->new->utf8->pretty->encode($lines);
my $width = 1200;
# Generate complete HTML document
print <<"HTML";
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Timeline Demo</title>
<script src="https://d3js.org/d3.v7.min.js"></script>
( run in 0.935 second using v1.01-cache-2.11-cpan-e1769b4cff6 )